{"id":29220142,"url":"https://github.com/fvdavid/angular-starter","last_synced_at":"2025-08-18T11:09:46.575Z","repository":{"id":296283302,"uuid":"992812003","full_name":"fvdavid/angular-starter","owner":"fvdavid","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-03T00:22:22.000Z","size":167,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-03T02:43:34.280Z","etag":null,"topics":["angular","angular20","material-ui","ngrx","ngrx-store","tailwindcss","testing-library"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fvdavid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-29T18:48:25.000Z","updated_at":"2025-06-03T00:53:16.000Z","dependencies_parsed_at":"2025-05-29T21:42:37.818Z","dependency_job_id":"c60b37a7-a91c-4ea2-a503-2222db8f2688","html_url":"https://github.com/fvdavid/angular-starter","commit_stats":null,"previous_names":["fvdavid/angular-starter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fvdavid/angular-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvdavid%2Fangular-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvdavid%2Fangular-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvdavid%2Fangular-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvdavid%2Fangular-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fvdavid","download_url":"https://codeload.github.com/fvdavid/angular-starter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvdavid%2Fangular-starter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270982194,"owners_count":24679447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","angular20","material-ui","ngrx","ngrx-store","tailwindcss","testing-library"],"created_at":"2025-07-03T02:38:03.067Z","updated_at":"2025-08-18T11:09:46.553Z","avatar_url":"https://github.com/fvdavid.png","language":"TypeScript","readme":"# Angular 20 Project Setup\n\n## Installation\n\n```sh\npnpm create @angular@latest [project-name]\n```\n\nIn this case:\n\n- Do you want to create a 'zoneless' application without zone.js (Developer Preview)? Yes\n- Which stylesheet format would you like to use? Sass (SCSS) [ https://sass-lang.com/documentation/syntax#scss]\n- Do you want to enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering)? No\n\nManually add the following props to the angular.json\n\n- \"changeDetection: \"OnPush\"\n\n```json\n\"schematics\": {\n  \"@schematics/angular:component\": {\n    \"style\": \"scss\",\n    \"changeDetection\": \"OnPush\"\n  }\n},\n```\n\n## UI\n\n### 1. Tailwind CSS 4\n\n```sh\npnpm add tailwindcss @tailwindcss/postcss postcss\n```\n\n- Configure PostCSS: Create a .postcssrc.json file in the root of your project and add the Tailwind CSS plugin:\n\n```json\n{\n  \"plugins\": {\n    \"@tailwindcss/postcss\": {}\n  }\n}\n```\n\n- Import Tailwind CSS: Add the following import statement to your src/styles.scss file:\n\n```scss\n@use \"tailwindcss\";\n```\n\n- Start Using Tailwind: You can now use Tailwind CSS utility classes in your Angular components, such as:\n\n```html\n\u003cdiv class=\"bg-red-300\"\u003e\n  \u003ch1 class=\"text-3xl font-bold underline text-center mt-10\"\u003eAngular v20 + Tailwind CSS 4\u003c/h1\u003e\n\u003c/div\u003e\n```\n\n### 2. Material UI\n\n```sh\npnpm ng add @angular/material\n```\n\n```html\n\u003cdiv class=\"text-center mt-10\"\u003e\n  \u003cbutton matFab extended\u003e\n    \u003cmat-icon\u003efavorite\u003c/mat-icon\u003e\n    from Material UI\n  \u003c/button\u003e\n\u003c/div\u003e\n```\n\n### 3. Setting up Tailwind v4 in Visual Code (autocomplete)\n\n\u003e Open Setting \u003e Search \"tailwindCSS.experimental.configFile\" \u003e Edit in setting.json\n\u003e then make sure something like this:\n\n```json\n\"tailwindCSS.experimental.configFile\": \"src/styles.scss\"\n```\n\nor if you want available with tailwind v3\n\n```json\n\"tailwindCSS.experimental.configFile\": {\n  \".config/tailwind.config.js\",\n  \"src/styles.scss\"\n}\n```\n\n## Testing\n\nInstall the Angular Testing Library along the user-event library:\n\n```sh\npnpm i -D @testing-library/angular @testing-library/dom @testing-library/user-event\n```\n\nNext, install Playwright and install the accompanying browsers:\n\n```sh\npnpm i -D @playwright/test\npnpm playwright install\n```\n\n## Code Quality\n\nFor code quality, we install `angular-eslint`, `eslint-plugin-unused-imports`, `husky`, `prettier`,`lint-staged` and Sheriff.\n\n```bash\npnpm ng add @angular-eslint/schematics\npnpm i -D eslint-plugin-unused-imports husky prettier lint-staged @softarc/{sheriff-core,eslint-plugin-sheriff}\n```\n\nTo integrate `eslint-plugin-unused-imports` and sheriff into ESLint, add the following to `eslint.config.js`:\n\n```javascript\n// exsting imports...\n\nconst sheriff = require(\"@softarc/eslint-plugin-sheriff\");\nconst unusedImports = require(\"eslint-plugin-unused-imports\");\n\nmodule.exports = tseslint.config(\n  // exsting setup...\n  {\n    files: [\"**/*.ts\"],\n    extends: [sheriff.configs.all],\n  },\n  {\n    plugins: { \"unused-imports\": unusedImports },\n    rules: {\n      \"@typescript-eslint/no-unused-vars\": \"off\",\n      \"unused-imports/no-unused-imports\": \"error\",\n      \"unused-imports/no-unused-vars\": [\n        \"warn\",\n        {\n          vars: \"all\",\n          varsIgnorePattern: \"^_\",\n          args: \"after-used\",\n          argsIgnorePattern: \"^_\",\n        },\n      ],\n    },\n  },\n);\n```\n\nFor defining barrel-less modulesyou can initialize the Sheriff configuration by running the following command:\n\n```bash\npnpm sheriff init\n```\n\nCode formatting will be done by prettier, but only for staged files and before a commit:\n\n```bash\npnpm husky init\n```\n\nCreate the `.lintstagedrc` with the following content:\n\n```text\n{\n  \"*.{js,ts,json,html,scss,css,md}\": [\n    \"prettier --write\"\n  ]\n}\n\n```\n\n`.husky/pre-commit`, should have the following content:\n\n```bash\npnpm ng lint\npnpm ng test --watch=false\npnpm lint-staged --allow-empty\n```\n\nWhen running the 'git commit', the project will be tested before committing to GitHub\n\n## State Management\n\nNext on the list is state management with the NgRx SignalStore. We also include the devtools extension for debugging purposes:\n\n```bash\npnpm i @ngrx/signals @angular-architects/ngrx-toolkit\n```\n\nIt is also important to use the official ESLint rules for NgRx:\n\n```bash\npnpm i -D @ngrx/eslint-plugin\n```\n\nAdd the following to the ESLint configuration `eslint.config.js`:\n\n```javascript\n// existing imports...\nconst ngrx = require(\"@ngrx/eslint-plugin/v9\");\n\nmodule.exports = tseslint.config(\n  // existing config...\n  {\n    files: [\"**/*.ts\"],\n    extends: [...ngrx.configs.signals],\n  },\n);\n```\n\n## Package Manager\n\nThis example using PNPM as a package manager.\nPNPM is Performant NPM, a package manager for Node.js that aims to address some of the limitations of traditional package managers like npm and Yarn, particularly concerning disk space and installation speed.\n\n---\n\n**Enjoy your new Angular project setup! 🚀**\n\n---\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffvdavid%2Fangular-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffvdavid%2Fangular-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffvdavid%2Fangular-starter/lists"}