Some checks failed
Build and Deploy / build-and-push (push) Has been cancelled
Build and Deploy / deploy (push) Has been cancelled
Build and Deploy / test-backend (push) Has been cancelled
PR Checks / security-sast (pull_request) Successful in 32s
PR Checks / test-backend (pull_request) Successful in 28s
PR Checks / test-frontend (pull_request) Successful in 1m4s
PR Checks / prettier-autofix (pull_request) Failing after 12s
Build and Deploy / test-frontend (push) Has been cancelled
Print Calculator Frontend
This is a modern Angular application designed with a Clean Architecture approach (Core, Shared, Features) and Design Tokens for easy theming.
Project Structure
- Core: Singleton services, global layout components (Navbar, Footer), guards.
- Shared: Reusable dumb UI components (Buttons, Cards, Inputs). No business logic.
- Features: Lazy-loaded modules (Calculator, Shop, About). Each contains its own pages, components, and services.
- Styles: Design tokens and theming layer.
Getting Started
-
Install Dependencies:
npm install -
Run Development Server:
ng serveNavigate to
http://localhost:4200/.
Theming
The application uses CSS Variables defined in src/styles/tokens.scss and mapped in src/styles/theme.scss.
- Change Colors: Edit
src/styles/tokens.scss. - Create New Theme:
- Duplicate
src/styles/theme.scss(e.g.,theme-dark.scss). - Override the semantic variables (e.g.,
--color-bg,--color-text). - Load the new theme file or switch classes on the body tag.
- Duplicate
Adding a New Feature
- Create Directory:
src/app/features/my-feature. - Create Routes: Create
my-feature.routes.tsexporting aRoutesarray. - Register Route: Add to
src/app/app.routes.tsusing lazy loading:{ path: 'my-feature', loadChildren: () => import('./features/my-feature/my-feature.routes').then(m => m.MY_FEATURE_ROUTES) }
Internationalization (i18n)
Translations are stored in src/assets/i18n/.
it.json(Italian - Default)en.json(English)
To add a language, create the JSON file and update LanguageService in src/app/core/services/language.service.ts.