Angular 22 starter app with strict TS rules, linting, Optimus UI, API caller, OpenAPI, etc. Easily modifiable, non-intrusive, great for bootstrapping ideas and prototypes. LLM steering files included.
  • TypeScript 35.5%
  • SCSS 26.7%
  • HTML 23.1%
  • JavaScript 13.5%
  • Dockerfile 0.8%
  • Other 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-16 22:10:27 +01:00
.claude/skills/codegen Initial commit 2026-11-16 20:46:05 +01:00
.vscode Initial commit 2026-11-16 20:46:05 +01:00
docs Update to Angular v22 and Optimus UI (instead of PrimeNG) 2026-11-16 22:10:27 +01:00
git-hooks Initial commit 2026-11-16 20:46:05 +01:00
public Update to Angular v22 and Optimus UI (instead of PrimeNG) 2026-11-16 22:10:27 +01:00
src Update to Angular v22 and Optimus UI (instead of PrimeNG) 2026-11-16 22:10:27 +01:00
.dockerignore Initial commit 2026-11-16 20:46:05 +01:00
.editorconfig Initial commit 2026-11-16 20:46:05 +01:00
.gitignore Initial commit 2026-11-16 20:46:05 +01:00
.prettierignore Initial commit 2026-11-16 20:46:05 +01:00
.prettierrc Initial commit 2026-11-16 20:46:05 +01:00
.stylelintrc.json Initial commit 2026-11-16 20:46:05 +01:00
AGENTS.md Update to Angular v22 and Optimus UI (instead of PrimeNG) 2026-11-16 22:10:27 +01:00
angular.json Update to Angular v22 and Optimus UI (instead of PrimeNG) 2026-11-16 22:10:27 +01:00
Dockerfile Initial commit 2026-11-16 20:46:05 +01:00
eslint.config.mjs Update to Angular v22 and Optimus UI (instead of PrimeNG) 2026-11-16 22:10:27 +01:00
jest.config.js Initial commit 2026-11-16 20:46:05 +01:00
nginx.conf Initial commit 2026-11-16 20:46:05 +01:00
package-lock.json Update to Angular v22 and Optimus UI (instead of PrimeNG) 2026-11-16 22:10:27 +01:00
package.json Update to Angular v22 and Optimus UI (instead of PrimeNG) 2026-11-16 22:10:27 +01:00
README.md Update to Angular v22 and Optimus UI (instead of PrimeNG) 2026-11-16 22:10:27 +01:00
tsconfig.app.json Update to Angular v22 and Optimus UI (instead of PrimeNG) 2026-11-16 22:10:27 +01:00
tsconfig.json Update to Angular v22 and Optimus UI (instead of PrimeNG) 2026-11-16 22:10:27 +01:00
tsconfig.spec.json Initial commit 2026-11-16 20:46:05 +01:00

Angular 22 Project Bootstrap (Optimus UI + LLM)

This is a starter project you can use to bootstrap your Angular frontend with Optimus UI as the UI component library.

The demo module can be removed completely (src/app/feature/demo) without losing any preset functionality. No need to figure out how the things are interconnected to get a clean project.

Preset features

Code quality settings

.editorconfig

The default .editorconfig extended with HTML specific settings.

eslint.config.mjs

ESLint flat config with a strict rule set including @angular-eslint, @typescript-eslint (strict + type-checked), airbnb-extended/legacy, and no-null. Notable rules: complexity max 6, max-lines-per-function 75, OnPush change detection enforced.

.prettierrc

Feel free to rely on autoformatting by prettier. The recommended vscode extensions will make sure it will be in sync with linter rules.

tsconfig.json

Based on the strictest TypeScript configurations (strict, noUncheckedIndexedAccess, exactOptionalPropertyTypes).

.stylelintrc.json

Standard SCSS rules with prettier integration. Restricts allowed at-rules and disallows vendor prefixes (except appearance).

Unit testing

The project includes both the Angular native test runner (@angular/build:unit-test, invoked via npm test) and a Jest configuration (jest.config.js with jest-preset-angular). Some example unit tests are included.

Lint staged

A process available to set up in git commit hook. It considers *.ts files (linting) and *.scss files (stylelint).

By issuing npm install in this repo will set the hooks directory to ./git-hooks which has the commit hook set already.

Static files content

index.html contains some shiny things, like noscript fallback, color-scheme aware loading progress indicator shown on slow networks (with fade-in effect), adjusted viewport, favicons you may want to replace.

manifest.json with some basic properties.

Theme setup

Optimus UI components and Aura theme

The project uses Optimus UI v2 with the Aura theme preset from @openng/optimus-ui-themes. The theme is configured in src/theme/app-theme.ts using definePreset(Aura, ...) with component-level design token overrides (chip, accordion, card). Optimus UI is initialized via provideOptimus in app.module.ts.

A semantic color palette (grey, foreground, background maps for light/dark) is defined in src/styles/app-theme.scss, derived from HSL-based palette definitions in src/styles/m3-theme.scss. Visualization chart color palettes are available in src/styles/charts.scss.

Fonts and icons

DM Sans is used as the primary font. Current woff2 files (weights 100-900, normal + italic) are served from /public/assets/fonts for offline/restricted-network support.

Material Symbols (outlined) snapshot is also served from /public/assets/fonts and is used for application and component icons.

To sum it up: your app should work and look fine in a restricted network as well.

CSS Reset

A (more) Modern CSS Reset by Andy Bell, updated 2023-09-18.

Mixins

Several mixins are available in src/styles/mixins.scss:

mq - short-hand for media query with meaningful device name maps:

    @include mq(tablet) {
      flex-direction: column-reverse;
      align-items: center;
    }

smart-scale - size elements proportionally within a screen size range. This will scale the padding between 30px and 100px in a range from 320px to 1440px wide screen (this range is the default):

.class {
  padding-top: smart-scale(30, 100);
  padding-top: smart-scale(30, 100, 320, 1440);
}

Combined together: above tablet size, it will be scaled between 50 and 100, below tablet size: 30 and 50.

.class {
  padding-top: smart-scale(50, 100, map_get($breakpoints, tablet), 1440);

  @include mq(tablet) {
    padding-top: smart-scale(30, 50, 320, map_get($breakpoints, tablet));
  }
}

light / dark - color-scheme aware mixins for targeting light or dark mode styles.

State management

Preinstalled and setup state management packages with dev tools. immer is also installed for simplify state management with deeper objects.

Additional produceOn helper added in @shared folder to be able to build reducers with immer.

Build configuration in angular.json

  • @angular/build:application builder
  • global styles separated into named bundles (styles, app-theme.components)
  • style preprocessor include path: src/styles
  • inline component styles use SCSS
  • manifest, favicon, assets served from public/
  • production budgets: 500kB warn / 1MB error for initial bundle

Module path aliases

Defined 4 aliases for the following directories (in tsconfig):

  • src/environments/ shorthand: @env/
  • src/app/shared/ shorthand: @shared/
  • src/app/feature/ shorthand: @feature/
  • src/theme/ shorthand: @theme/
  • Angular Language Service
  • Editorconfig for VS Code
  • Prettier - Code formatter
  • ESLint
  • Prettier ESLint
  • SCSS IntelliSense
  • Stylelint

Custom packages usually needed

Api caller

SPAs often deal with API calls with JSON payloads back and forth. @deejayy/api-handler library is to ease the handling of these kind of tasks and add a consistent backend communication approach.

You can choose from quick and dirty (fetch from a random API endpoint and deal with the reponse, no error handling, disposable result) to fully managed (api catalog, global error handling, central config, etc.).

It supports token based authentication, json communication, binary up/download.

Refer to @deejayy/api-handler.

Reactive config

Some application-specific settings need to be bundled with the app together. The old way was to put these settings (e.g. api endpoint url, feature flags, etc) into the environment.ts file and import whenever required. Drawback is, the settings are compiled into the application bundle statically, "hardcoded".

Reactive config aims to elevate the configuration handling to a new level: load the config when the application loads. It either can be a config.json in the assets folder or even an API endpoint somewhere on the internet: it will be loaded before the app starts.

You can load, reload, get and set whatever properties you want to keep in the configuration.

Check @deejayy/reactive-config for more info.

Runtime localizer

This bootstrap application is set up for localization, translation files already put in place (with some placeholder tokens), necessary packages installed. The default behaviour of Angular Localization package is to generate as many bundles of the app as languages you want to cover, but I don't see it as the ideal approach. With runtime localizer you can have your translations in a simple JSON file and load it from either /assets/messages/ or from any API endpoint.

Works with templates and TS code as well.

See @deejayy/runtime-localizer for details.

Demo page

Clone this repo & ng serve: there is a demo page showcasing Optimus UI components, state management, API caller, mixins, and runtime localization.