Skip to content
/ jet Public template

Angular starter-kit for building quality web apps fast. Now with Supabase.

License

Notifications You must be signed in to change notification settings

karmasakshi/jet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jet

Angular starter-kit for building quality web apps fast. Now with Supabase.


Logo


GitHub License Mozilla HTTP Observatory Grade
GitHub commit activity GitHub last commit Static Badge
GitHub Release GitHub package.json prod dependency version GitHub package.json prod dependency version GitHub package.json prod dependency version
X (formerly Twitter) Follow Static Badge

Get started in 30 seconds

Static Badge

  • Click the button, create the repository, then clone it
  • Create a copy of .env.example and name it .env
  • Delete ./.github/FUNDING.yml, ./CHANGELOG.md (a fresh one will be created on your first release), and ./LICENSE
  • Delete license property in ./package.json
  • Update the version property in both ./package.json and ./package-lock.json to 0.0.0
  • Run npm install - this will also enable Husky
  • Run ng serve

Nice to do:


Star History Chart


Contents


↑ Back to Contents

Features

  • Modern Angular: Signals, new template syntax, Zoneless, Standalone, and more.
  • Strict linting and formatting: Strict configurations for ESLint, Prettier and TypeScript.
  • Performant: Modular and tree-shakeable. 80+ on PageSpeed Insights.
  • Secure: Locked-down CSP and other security headers. 80+ on Mozilla Observatory.
  • Always up-to-date: Actively maintained and regularly built from the ground-up. See 1000+ commits.

↑ Back to Contents

Integrations


↑ Back to Contents

Components


↑ Back to Contents

Constants


↑ Back to Contents

Directives


↑ Back to Contents

Enums


↑ Back to Contents

Guards


↑ Back to Contents

Interceptors


↑ Back to Contents

Services


↑ Back to Contents

GitHub Actions


↑ Back to Contents

GitHub Issue Templates

Guides

If you need help with something not listed here, create a new issue.


↑ Back to Contents

Add elements

Use ng g as you would in any other Angular project.


↑ Back to Contents

Add a component

  • Run ng g c components/<component-name>
  • In the @Component() decorator:
    • Set changeDetection: ChangeDetectionStrategy.OnPush
    • Set imports: [TranslocoModule]
  • In the class:
    • Set readonly #loggerService = inject(LoggerService);
    • As a convention, at the end of the constructor, set this.#loggerService.logComponentInitialization('<ClassName>');
  • As a convention, add the component selector as a key in en.json and other translation files
  • Update spec

In the template, wrap the contents in:

<ng-container *transloco="let t"> ... </ng-container>

↑ Back to Contents

Add a page component

  • Run ng g c components/<component-name>
  • In the @Component() decorator:
    • Set changeDetection: ChangeDetectionStrategy.OnPush
    • Set imports: [TranslocoModule, PageComponent]
  • In the class:
    • Set readonly #loggerService = inject(LoggerService);
    • As a convention, at the end of the constructor, set this.#loggerService.logComponentInitialization('<ClassName>');
  • As a convention, add the component selector as a key in en.json and other translation files
  • Update spec
  • Add a route to it in app.routes.ts
  • Update sitemap-main.xml
  • If required, add an icon and navigation link to it in NAVIGATION_MENU_ITEMS

In the template, wrap the contents in:

<ng-container *transloco="let t">
  <jet-page
    [seoDescription]="t('<component-selector>.seo.description')"
    [seoKeywords]="t('<component-selector>.seo.keywords')"
    [seoTitle]="t('<component-selector>.seo.title')"
    [toolbarTitle]="t('<component-selector>.toolbar-title')"
  >
    ...
  </jet-page>
</ng-container>

↑ Back to Contents

Add a service

  • Run ng g s services/<service-name>/<service-name>
  • In the class:
    • Set readonly #loggerService = inject(LoggerService);
    • As a convention, at the end of the constructor, set this.#loggerService.logServiceInitialization('<ClassName>');
  • Add mock
  • Update spec

↑ Back to Contents

Manage code

When enabled, Husky prevents pushing code that fails linting or building.


↑ Back to Contents

Format code

Run npm run format-staged to format staged files. This runs automatically before every commit via Husky and Lint Staged.

Run npm run format to format all files.


↑ Back to Contents

Lint code

Run ng lint. This runs automatically before every commit via Husky and ESLint.


↑ Back to Contents

Test code

Run ng test.


↑ Back to Contents

Commit code

Run npm run commit, or commit directly with a valid commit message.

Commit messages that don't follow Conventional Commits will be blocked by Husky and Commitlint.


↑ Back to Contents

Update commit scopes

In .commitlintrc.json, update "scope-enum": [2, "always", ["general", "main", "<your-scope-1>", ..., "<your-scope-n>"]].


↑ Back to Contents

Update precommit tasks

Update pre-commit. As a good practice, ensure every task is defined package.json and can be run independently.

More tasks mean longer commit times.


↑ Back to Contents

Update dependencies

Run npm run reinstall-dependencies. It runs the following subscripts to remove all dependencies, then install their latest versions: x:uninstall-devDependencies, x:uninstall-dependencies, x:install-dependencies, x:install-devDependencies. You shouldn't have to run these subscripts yourself.

For this to work, ensure the subscripts are updated every time a dependency is added or removed.


↑ Back to Contents

Manage icons

Jet uses Material Symbols for icons. Instead of downloading the entire font, each icon is explicitly specified in index.html. To add or remove icons, update the icon names alphabetically in the <link> element (read more about this requirement here).

Custom SVG icons can be loaded in _setIcons() in AppComponent.


↑ Back to Contents

Manage styles


↑ Back to Contents

Add styles


↑ Back to Contents

Generate a Material theme


↑ Back to Contents

Override Material styles


↑ Back to Contents

Manage i18n


↑ Back to Contents

Add a language


↑ Back to Contents

Change the default language


↑ Back to Contents

Remove a language


↑ Back to Contents

Manage environments


↑ Back to Contents

Add an environment


↑ Back to Contents

Add an environment variable


↑ Back to Contents

Manage releases


↑ Back to Contents

Set up Release Please

  • Generate a Personal Access Token token with no expiry
  • Save it to Actions > Secrets as RELEASE_PLEASE_TOKEN

↑ Back to Contents

Cut a release


↑ Back to Contents

Cut a major release


↑ Back to Contents

Deploy


↑ Back to Contents

Vercel


↑ Back to Contents

Supabase


↑ Back to Contents

Set up Supabase

  • Set project_id in config.toml to something unique to the project

↑ Back to Contents

Link a Supabase project


↑ Back to Contents

Run Supabase locally


↑ Back to Contents

Remove Supabase


↑ Back to Contents

Sponsors

byjokese   dipenpradhan   lohiaad   singhamit089

Support development of Jet. Pay what you like.

License

This project is licensed under the MIT License. See LICENSE for details.