├── .github └── workflows │ ├── frontend-angular.yml │ └── frontend-react.yml ├── LICENSE ├── README.md ├── frontend-angular-19 ├── .editorconfig ├── .github │ └── workflows │ │ └── angular-starter.yml ├── .gitignore ├── LICENSE ├── README.md ├── angular.json ├── eslint.config.js ├── nginx.conf ├── package-lock.json ├── package.json ├── public │ └── favicon.ico ├── server.js ├── src │ ├── app │ │ ├── app.component.css │ │ ├── app.component.html │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ ├── app.config.ts │ │ └── app.routes.ts │ ├── environments │ │ ├── environment.development.ts │ │ └── environment.ts │ ├── index.html │ ├── main.ts │ └── styles.css ├── tsconfig.app.json ├── tsconfig.json └── tsconfig.spec.json ├── frontend-angular ├── .editorconfig ├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── angular.json ├── eslint.config.js ├── nginx.conf ├── package-lock.json ├── package.json ├── public │ ├── favicon.ico │ └── index.html ├── server.js ├── src │ ├── app │ │ ├── app.config.ts │ │ ├── app.css │ │ ├── app.html │ │ ├── app.routes.ts │ │ ├── app.spec.ts │ │ └── app.ts │ ├── environments │ │ ├── environment.development.ts │ │ └── environment.ts │ ├── index.html │ ├── main.ts │ └── styles.css ├── tsconfig.app.json ├── tsconfig.json └── tsconfig.spec.json ├── frontend-react ├── .eslintrc.json ├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── eslint.config.mjs ├── nginx.conf ├── package-lock.json ├── package.json ├── public │ ├── favicon.ico │ ├── index.html │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── robots.txt ├── server.js └── src │ ├── App.css │ ├── App.js │ ├── App.test.js │ ├── index.css │ ├── index.js │ ├── logo.svg │ ├── reportWebVitals.js │ └── setupTests.js └── img ├── ganatan-about-github.png ├── ganatan-angular-starter-github.png └── ganatan-react-starter-github.png /.github/workflows/frontend-angular.yml: -------------------------------------------------------------------------------- 1 | name: frontend-angular 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | pull_request: 7 | branches: [master] 8 | 9 | jobs: 10 | build-frontend: 11 | runs-on: ubuntu-latest 12 | defaults: 13 | run: 14 | working-directory: frontend-angular 15 | steps: 16 | - uses: actions/checkout@v4 17 | - uses: actions/setup-node@v4 18 | with: 19 | node-version: '20' 20 | - run: npm ci 21 | - run: npm run lint 22 | - run: npm run test:headless 23 | - run: npm run build 24 | -------------------------------------------------------------------------------- /.github/workflows/frontend-react.yml: -------------------------------------------------------------------------------- 1 | name: frontend-react 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | pull_request: 7 | branches: [master] 8 | 9 | jobs: 10 | build-frontend: 11 | runs-on: ubuntu-latest 12 | defaults: 13 | run: 14 | working-directory: frontend-react 15 | steps: 16 | - uses: actions/checkout@v4 17 | - uses: actions/setup-node@v4 18 | with: 19 | node-version: '20' 20 | - run: npm ci 21 | - run: npm run lint 22 | - run: npm run test 23 | - run: npm run build 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2017-2025 Ganatan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Angular 20 , React 19 Examples Starter 2 | 3 | 4 | 5 | 49 | 50 |
6 | 7 | Ganatan Angular Example Demo 9 | 10 | 11 | it's part of a repo series designed 12 | 13 | to create a **Web Application with Angular 20** 14 | 15 | * Featuring [**Angular 20.0.0**](https://github.com/angular/angular/releases) & [**Angular CLI 20.0.0**](https://github.com/angular/angular-cli/releases/) 16 | 17 | 18 | * See the [**Angular Live demo**](#angular-live-demo), Test the repo with [**Quick start**](#angular-quick-start) and for more information Read the step by step [**Tutorial**](#angular-tutorial) or read the [**Getting started**](#angular-getting-started) 19 | 20 | 21 | to create a **Web Application with React 19** 22 | 23 | 24 | * Featuring [**React 19.1.0**](https://github.com/facebook/react/releases) & [**Create-react-app 5.0.1**](https://github.com/facebook/create-react-app/releases) 25 | 26 | --- 27 | 28 |
29 | 30 | ## 🔧 Continuous Integration 31 | 32 | [![Frontend Angular CI](https://github.com/ganatan/angular-react-starter/actions/workflows/frontend-angular.yml/badge.svg?branch=master)](https://github.com/ganatan/angular-react-starter/actions/workflows/frontend-angular.yml) 33 | [![Frontend React CI](https://github.com/ganatan/angular-react-starter/actions/workflows/frontend-react.yml/badge.svg?branch=master)](https://github.com/ganatan/angular-react-starter/actions/workflows/frontend-react.yml) 34 | 35 | --- 36 | 37 | ## 📦 Tech Stack 38 | 39 | ![Angular](https://img.shields.io/badge/angular-20-red) 40 | ![React](https://img.shields.io/badge/react-19-blue) 41 | [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/ganatan/angular-react-starter/blob/master/LICENSE) 42 | 43 |
44 | 45 | --- 46 | 47 | 48 |
51 | 52 | # [Angular Live Demo](#angular-live-demo) 53 | Here is a working Angular live demo : https://angular.ganatan.com 54 | 55 |

56 |

57 | 58 | Angular 16 Example 
 59 |       Application 60 | 61 |

62 |

63 | 64 | 65 | # [Angular Quick start](#angular-quick-start) 66 | 67 | ```bash 68 | # choose a repo 69 | # download the example or clone the repo from github 70 | git clone https://github.com/ganatan/angular-react-starter.git 71 | 72 | # download the example or clone the repo from gitlab 73 | git clone https://gitlab.com/ganatan/angular-react-starter.git 74 | 75 | # change directory 76 | cd angular-react-starter 77 | cd frontend-angular 78 | 79 | # install the repo with npm 80 | npm install 81 | 82 | # start the server 83 | npm start 84 | 85 | ``` 86 | in your browser go to [http://localhost:4200](http://localhost:4200) 87 | 88 | 89 | 90 | # [React Quick start](#react-quick-start) 91 | 92 | ```bash 93 | # choose a repo 94 | # download the example or clone the repo from github 95 | git clone https://github.com/ganatan/angular-react-starter.git 96 | 97 | # download the example or clone the repo from gitlab 98 | git clone https://gitlab.com/ganatan/angular-react-starter.git 99 | 100 | # change directory 101 | cd angular-react-starter 102 | cd frontend-react 103 | 104 | # install the repo with npm 105 | npm install 106 | 107 | # start the server 108 | npm start 109 | 110 | 111 | ``` 112 | 113 | in your browser go to [http://localhost:3000](http://localhost:3000) 114 | 115 | 116 | # [Angular Tutorial](#angular-quick-start) 117 | 118 | Here is a step by step Tutorial : https://www.ganatan.com/en/tutorials/getting-started-with-angular 119 | 120 |

121 | 122 | Demo example 123 | 124 |

125 | 126 | # [Angular Getting started](#angular-getting-started) 127 | 128 | 129 | ## Installation 130 | * `npm install` (installing dependencies) 131 | * `npm outdated` (verifying dependencies) 132 | 133 | ## Development 134 | * `npm run start` 135 | * in your browser go to [http://localhost:4200](http://localhost:4200) 136 | 137 | ## Production 138 | * `npm run build` 139 | 140 | ## Linter 141 | * `npm run lint` 142 | 143 | ## Tests 144 | * `npm run test` 145 | * `npm run coverage` 146 | 147 | 148 | # [React Tutorial](#react-quick-start) 149 | 150 | Here is a step by step Tutorial : https://www.ganatan.com/en/tutorials/getting-started-with-react 151 | 152 |

153 | 154 | Demo example 155 | 156 |

157 | 158 | 159 | # [React Getting started](#react-getting-started) 160 | 161 | 162 | ## Installation 163 | * `npm install` (installing dependencies) 164 | * `npm outdated` (verifying dependencies) 165 | 166 | ## Development 167 | * `npm run start` 168 | * in your browser go to [http://localhost:3000](http://localhost:3000) 169 | 170 | ## Production 171 | * `npm run build` 172 | 173 | ## Linter 174 | * `npm run lint` 175 | 176 | ## Tests 177 | * `npm run test` 178 | * `npm run coverage` 179 | 180 | # [Author](#author) 181 | * Author : danny 182 | 183 | ## [Angular English Tutorials](#english-tutorials) 184 | - Installation - https://www.ganatan.com/en/tutorials/getting-started-with-angular 185 | - Tutorials Step by Step - https://www.ganatan.com/en/tutorials 186 | 187 | ## [React English Tutorials](#english-tutorials) 188 | - Installation - https://www.ganatan.com/en/tutorials/getting-started-with-react 189 | - Tutorials Step by Step - https://www.ganatan.com/en/tutorials 190 | 191 | 192 | ## [Tutoriels Angular en français](#french-tutorials) 193 | - Installation - https://www.ganatan.com/tutorials/demarrer-avec-angular 194 | - Tutoriels Etape par étape - https://www.ganatan.com/tutorials 195 | 196 | ## [Tutoriels React en français](#french-tutorials) 197 | - Installation - https://www.ganatan.com/tutorials/demarrer-avec-react 198 | - Tutoriels Etape par étape - https://www.ganatan.com/tutorials 199 | -------------------------------------------------------------------------------- /frontend-angular-19/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.ts] 12 | quote_type = single 13 | ij_typescript_use_double_quotes = false 14 | 15 | [*.md] 16 | max_line_length = off 17 | trim_trailing_whitespace = false 18 | -------------------------------------------------------------------------------- /frontend-angular-19/.github/workflows/angular-starter.yml: -------------------------------------------------------------------------------- 1 | name: frontend-angular 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | pull_request: 7 | branches: [master] 8 | 9 | jobs: 10 | build-frontend: 11 | runs-on: ubuntu-latest 12 | defaults: 13 | run: 14 | working-directory: angular-starter 15 | steps: 16 | - uses: actions/checkout@v4 17 | - uses: actions/setup-node@v4 18 | with: 19 | node-version: '20' 20 | - run: npm ci 21 | - run: npm run lint 22 | - run: npm run test:headless 23 | - run: npm run build 24 | -------------------------------------------------------------------------------- /frontend-angular-19/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files. 2 | 3 | # Compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | /bazel-out 8 | 9 | # Node 10 | /node_modules 11 | npm-debug.log 12 | yarn-error.log 13 | 14 | # IDEs and editors 15 | .idea/ 16 | .project 17 | .classpath 18 | .c9/ 19 | *.launch 20 | .settings/ 21 | *.sublime-workspace 22 | 23 | # Visual Studio Code 24 | .vscode/* 25 | !.vscode/settings.json 26 | !.vscode/tasks.json 27 | !.vscode/launch.json 28 | !.vscode/extensions.json 29 | .history/* 30 | 31 | # Miscellaneous 32 | /.angular/cache 33 | .sass-cache/ 34 | /connect.lock 35 | /coverage 36 | /libpeerconnection.log 37 | testem.log 38 | /typings 39 | 40 | # System files 41 | .DS_Store 42 | Thumbs.db 43 | -------------------------------------------------------------------------------- /frontend-angular-19/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2017-2025 Ganatan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /frontend-angular-19/README.md: -------------------------------------------------------------------------------- 1 | 2 | ### Installation 3 | * `npm install` (installing dependencies) 4 | * `npm outdated` (verifying dependencies) 5 | 6 | ### Developpement 7 | * `npm run start` 8 | * in your browser [http://localhost:4200](http://localhost:4200) 9 | 10 | ## Linter 11 | * `npm run lint` 12 | 13 | ## Tests 14 | * `npm run test` 15 | * `npm run coverage` 16 | 17 | ### Compilation 18 | * `npm run build` ( without SSR) 19 | 20 | ### Production 21 | * `npm run serve` 22 | * in your browser [http://localhost:4000](http://localhost:4000) 23 | 24 | 25 | ### Author 26 | * Author : danny 27 | -------------------------------------------------------------------------------- /frontend-angular-19/angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "projects": { 6 | "angular-starter": { 7 | "projectType": "application", 8 | "schematics": {}, 9 | "root": "", 10 | "sourceRoot": "src", 11 | "prefix": "app", 12 | "architect": { 13 | "build": { 14 | "builder": "@angular-devkit/build-angular:application", 15 | "options": { 16 | "outputPath": "dist/angular-starter", 17 | "index": "src/index.html", 18 | "browser": "src/main.ts", 19 | "polyfills": [ 20 | "zone.js" 21 | ], 22 | "tsConfig": "tsconfig.app.json", 23 | "assets": [ 24 | { 25 | "glob": "**/*", 26 | "input": "public" 27 | } 28 | ], 29 | "styles": [ 30 | "src/styles.css" 31 | ], 32 | "scripts": [] 33 | }, 34 | "configurations": { 35 | "production": { 36 | "budgets": [ 37 | { 38 | "type": "initial", 39 | "maximumWarning": "500kB", 40 | "maximumError": "1MB" 41 | }, 42 | { 43 | "type": "anyComponentStyle", 44 | "maximumWarning": "4kB", 45 | "maximumError": "8kB" 46 | } 47 | ], 48 | "outputHashing": "all" 49 | }, 50 | "development": { 51 | "optimization": false, 52 | "extractLicenses": false, 53 | "sourceMap": true, 54 | "fileReplacements": [ 55 | { 56 | "replace": "src/environments/environment.ts", 57 | "with": "src/environments/environment.development.ts" 58 | } 59 | ] 60 | } 61 | }, 62 | "defaultConfiguration": "production" 63 | }, 64 | "serve": { 65 | "builder": "@angular-devkit/build-angular:dev-server", 66 | "configurations": { 67 | "production": { 68 | "buildTarget": "angular-starter:build:production" 69 | }, 70 | "development": { 71 | "buildTarget": "angular-starter:build:development" 72 | } 73 | }, 74 | "defaultConfiguration": "development" 75 | }, 76 | "extract-i18n": { 77 | "builder": "@angular-devkit/build-angular:extract-i18n" 78 | }, 79 | "test": { 80 | "builder": "@angular-devkit/build-angular:karma", 81 | "options": { 82 | "polyfills": [ 83 | "zone.js", 84 | "zone.js/testing" 85 | ], 86 | "tsConfig": "tsconfig.spec.json", 87 | "assets": [ 88 | { 89 | "glob": "**/*", 90 | "input": "public" 91 | } 92 | ], 93 | "styles": [ 94 | "src/styles.css" 95 | ], 96 | "scripts": [] 97 | } 98 | }, 99 | "lint": { 100 | "builder": "@angular-eslint/builder:lint", 101 | "options": { 102 | "lintFilePatterns": [ 103 | "src/**/*.ts", 104 | "src/**/*.html" 105 | ] 106 | } 107 | } 108 | } 109 | } 110 | }, 111 | "cli": { 112 | "schematicCollections": [ 113 | "angular-eslint" 114 | ], 115 | "analytics": false 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /frontend-angular-19/eslint.config.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | const eslint = require("@eslint/js"); 3 | const tseslint = require("typescript-eslint"); 4 | const angular = require("angular-eslint"); 5 | 6 | module.exports = tseslint.config( 7 | { 8 | files: ["**/*.ts"], 9 | extends: [ 10 | eslint.configs.recommended, 11 | ...tseslint.configs.recommended, 12 | ...tseslint.configs.stylistic, 13 | ...angular.configs.tsRecommended, 14 | ], 15 | processor: angular.processInlineTemplates, 16 | rules: { 17 | "@angular-eslint/directive-selector": [ 18 | "error", 19 | { 20 | type: "attribute", 21 | prefix: "app", 22 | style: "camelCase", 23 | }, 24 | ], 25 | "@angular-eslint/component-selector": [ 26 | "error", 27 | { 28 | type: "element", 29 | prefix: "app", 30 | style: "kebab-case", 31 | }, 32 | ], 33 | "no-undefined": "error", 34 | "no-var": "error", 35 | "prefer-const": "error", 36 | "func-names": "error", 37 | "id-length": "error", 38 | "newline-before-return": "error", 39 | "space-before-blocks": "error", 40 | "no-alert": "error" 41 | }, 42 | }, 43 | { 44 | files: ["**/*.html"], 45 | extends: [ 46 | ...angular.configs.templateRecommended, 47 | ...angular.configs.templateAccessibility, 48 | ], 49 | rules: {}, 50 | } 51 | ); 52 | -------------------------------------------------------------------------------- /frontend-angular-19/nginx.conf: -------------------------------------------------------------------------------- 1 | user www-data; 2 | worker_processes auto; 3 | pid /run/nginx.pid; 4 | error_log /var/log/nginx/error.log; 5 | include /etc/nginx/modules-enabled/*.conf; 6 | 7 | events { 8 | worker_connections 768; 9 | } 10 | 11 | http { 12 | sendfile on; 13 | tcp_nopush on; 14 | types_hash_max_size 2048; 15 | 16 | include /etc/nginx/mime.types; 17 | default_type application/octet-stream; 18 | 19 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE 20 | ssl_prefer_server_ciphers on; 21 | 22 | access_log /var/log/nginx/access.log; 23 | gzip on; 24 | include /etc/nginx/conf.d/*.conf; 25 | server { 26 | listen 80 default_server; 27 | listen [::]:80 default_server; 28 | 29 | root /var/www/html; 30 | index index.html index.htm index.nginx-debian.html; 31 | server_name _; 32 | location / { 33 | try_files $uri $uri/ =404; 34 | } 35 | 36 | } 37 | } -------------------------------------------------------------------------------- /frontend-angular-19/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-starter", 3 | "version": "19.2.14", 4 | "scripts": { 5 | "ng": "ng", 6 | "dev": "ng serve --port 4200", 7 | "start": "ng serve --port 4200", 8 | "build": "ng build", 9 | "watch": "ng build --watch --configuration development", 10 | "test": "ng test", 11 | "test:headless": "ng test --watch=false --browsers=ChromeHeadless", 12 | "coverage": "ng test --no-watch --code-coverage", 13 | "lint": "ng lint", 14 | "serve": "node server.js" 15 | }, 16 | "keywords": [], 17 | "author": "", 18 | "license": "MIT", 19 | "private": true, 20 | "dependencies": { 21 | "@angular/animations": "19.2.14", 22 | "@angular/common": "19.2.14", 23 | "@angular/compiler": "19.2.14", 24 | "@angular/core": "19.2.14", 25 | "@angular/forms": "19.2.14", 26 | "@angular/platform-browser": "19.2.14", 27 | "@angular/platform-browser-dynamic": "19.2.14", 28 | "@angular/router": "19.2.14", 29 | "rxjs": "7.8.2", 30 | "tslib": "2.8.1", 31 | "zone.js": "0.15.1" 32 | }, 33 | "devDependencies": { 34 | "@angular-devkit/build-angular": "19.2.14", 35 | "@angular/cli": "19.2.14", 36 | "@angular/compiler-cli": "19.2.14", 37 | "@types/jasmine": "5.1.8", 38 | "angular-eslint": "19.6.0", 39 | "eslint": "9.27.0", 40 | "jasmine-core": "5.7.1", 41 | "karma": "6.4.4", 42 | "karma-chrome-launcher": "3.2.0", 43 | "karma-coverage": "2.2.1", 44 | "karma-jasmine": "5.1.0", 45 | "karma-jasmine-html-reporter": "2.1.0", 46 | "typescript": "5.7.3", 47 | "typescript-eslint": "8.33.0" 48 | } 49 | } -------------------------------------------------------------------------------- /frontend-angular-19/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganatan/angular-react-starter/09f6e41dfc0d22f99514fe4aac8748e6054e9c1f/frontend-angular-19/public/favicon.ico -------------------------------------------------------------------------------- /frontend-angular-19/server.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const path = require('path'); 3 | const app = express(); 4 | 5 | app.use(express.static(path.join(__dirname, 'dist/angular-starter/browser'))); 6 | 7 | app.get('/*', function (req, res) { 8 | res.sendFile(path.join(__dirname, 'dist/angular-starter/browser', 'index.html')); 9 | }); 10 | 11 | const port = 4000; 12 | const host = 'localhost'; 13 | app.listen(port, () => { 14 | console.log(`Server running at http://${host}:${port}`); 15 | }) 16 | 17 | -------------------------------------------------------------------------------- /frontend-angular-19/src/app/app.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganatan/angular-react-starter/09f6e41dfc0d22f99514fe4aac8748e6054e9c1f/frontend-angular-19/src/app/app.component.css -------------------------------------------------------------------------------- /frontend-angular-19/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 179 | 180 |
181 |
182 |
183 | 228 |

Hello, {{ title }}

229 |

Congratulations! Your app is running. 🎉

230 |
231 | 232 |
233 |
234 | @for (item of [ 235 | { title: 'Explore the Docs', link: 'https://angular.dev' }, 236 | { title: 'Learn with Tutorials', link: 'https://angular.dev/tutorials' }, 237 | { title: 'CLI Docs', link: 'https://angular.dev/tools/cli' }, 238 | { title: 'Angular Language Service', link: 'https://angular.dev/tools/language-service' }, 239 | { title: 'Angular DevTools', link: 'https://angular.dev/tools/devtools' }, 240 | ]; track item.title) { 241 | 247 | {{ item.title }} 248 | 255 | 258 | 259 | 260 | } 261 |
262 | 323 |
324 |
325 |
326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | -------------------------------------------------------------------------------- /frontend-angular-19/src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { AppComponent } from './app.component'; 3 | 4 | describe('AppComponent', () => { 5 | beforeEach(async () => { 6 | await TestBed.configureTestingModule({ 7 | imports: [AppComponent], 8 | }).compileComponents(); 9 | }); 10 | 11 | it('should create the app', () => { 12 | const fixture = TestBed.createComponent(AppComponent); 13 | const app = fixture.componentInstance; 14 | expect(app).toBeTruthy(); 15 | }); 16 | 17 | it(`should have the 'angular-starter' title`, () => { 18 | const fixture = TestBed.createComponent(AppComponent); 19 | const app = fixture.componentInstance; 20 | expect(app.title).toEqual('angular-starter'); 21 | }); 22 | 23 | it('should render title', () => { 24 | const fixture = TestBed.createComponent(AppComponent); 25 | fixture.detectChanges(); 26 | const compiled = fixture.nativeElement as HTMLElement; 27 | expect(compiled.querySelector('h1')?.textContent).toContain('Hello, angular-starter'); 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /frontend-angular-19/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { RouterOutlet } from '@angular/router'; 3 | 4 | @Component({ 5 | selector: 'app-root', 6 | imports: [RouterOutlet], 7 | templateUrl: './app.component.html', 8 | styleUrl: './app.component.css' 9 | }) 10 | export class AppComponent { 11 | title = 'angular-starter'; 12 | } 13 | -------------------------------------------------------------------------------- /frontend-angular-19/src/app/app.config.ts: -------------------------------------------------------------------------------- 1 | import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core'; 2 | import { provideRouter } from '@angular/router'; 3 | 4 | import { routes } from './app.routes'; 5 | 6 | export const appConfig: ApplicationConfig = { 7 | providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes)] 8 | }; 9 | -------------------------------------------------------------------------------- /frontend-angular-19/src/app/app.routes.ts: -------------------------------------------------------------------------------- 1 | import { Routes } from '@angular/router'; 2 | 3 | export const routes: Routes = []; 4 | -------------------------------------------------------------------------------- /frontend-angular-19/src/environments/environment.development.ts: -------------------------------------------------------------------------------- 1 | export const environment = {}; 2 | -------------------------------------------------------------------------------- /frontend-angular-19/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | export const environment = {}; 2 | -------------------------------------------------------------------------------- /frontend-angular-19/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularStarter 6 | 7 | 8 | 9 | 10 | 11 | 12 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /frontend-angular-19/src/main.ts: -------------------------------------------------------------------------------- 1 | import { bootstrapApplication } from '@angular/platform-browser'; 2 | import { appConfig } from './app/app.config'; 3 | import { AppComponent } from './app/app.component'; 4 | 5 | bootstrapApplication(AppComponent, appConfig) 6 | .catch((err) => console.error(err)); 7 | -------------------------------------------------------------------------------- /frontend-angular-19/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /frontend-angular-19/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */ 2 | /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */ 3 | { 4 | "extends": "./tsconfig.json", 5 | "compilerOptions": { 6 | "outDir": "./out-tsc/app", 7 | "types": [] 8 | }, 9 | "files": [ 10 | "src/main.ts" 11 | ], 12 | "include": [ 13 | "src/**/*.d.ts" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /frontend-angular-19/tsconfig.json: -------------------------------------------------------------------------------- 1 | /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */ 2 | /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */ 3 | { 4 | "compileOnSave": false, 5 | "compilerOptions": { 6 | "outDir": "./dist/out-tsc", 7 | "strict": true, 8 | "noImplicitOverride": true, 9 | "noPropertyAccessFromIndexSignature": true, 10 | "noImplicitReturns": true, 11 | "noFallthroughCasesInSwitch": true, 12 | "skipLibCheck": true, 13 | "isolatedModules": true, 14 | "esModuleInterop": true, 15 | "experimentalDecorators": true, 16 | "moduleResolution": "bundler", 17 | "importHelpers": true, 18 | "target": "ES2022", 19 | "module": "ES2022" 20 | }, 21 | "angularCompilerOptions": { 22 | "enableI18nLegacyMessageIdFormat": false, 23 | "strictInjectionParameters": true, 24 | "strictInputAccessModifiers": true, 25 | "strictTemplates": true 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /frontend-angular-19/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */ 2 | /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */ 3 | { 4 | "extends": "./tsconfig.json", 5 | "compilerOptions": { 6 | "outDir": "./out-tsc/spec", 7 | "types": [ 8 | "jasmine" 9 | ] 10 | }, 11 | "include": [ 12 | "src/**/*.spec.ts", 13 | "src/**/*.d.ts" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /frontend-angular/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.ts] 12 | quote_type = single 13 | ij_typescript_use_double_quotes = false 14 | 15 | [*.md] 16 | max_line_length = off 17 | trim_trailing_whitespace = false 18 | -------------------------------------------------------------------------------- /frontend-angular/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files. 2 | 3 | # Compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | /bazel-out 8 | 9 | # Node 10 | /node_modules 11 | npm-debug.log 12 | yarn-error.log 13 | 14 | # IDEs and editors 15 | .idea/ 16 | .project 17 | .classpath 18 | .c9/ 19 | *.launch 20 | .settings/ 21 | *.sublime-workspace 22 | 23 | # Visual Studio Code 24 | .vscode/* 25 | !.vscode/settings.json 26 | !.vscode/tasks.json 27 | !.vscode/launch.json 28 | !.vscode/extensions.json 29 | .history/* 30 | 31 | # Miscellaneous 32 | /.angular/cache 33 | .sass-cache/ 34 | /connect.lock 35 | /coverage 36 | /libpeerconnection.log 37 | testem.log 38 | /typings 39 | 40 | # System files 41 | .DS_Store 42 | Thumbs.db 43 | -------------------------------------------------------------------------------- /frontend-angular/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:22 2 | 3 | WORKDIR /app 4 | 5 | COPY package*.json ./ 6 | 7 | RUN npm install 8 | 9 | COPY . . 10 | 11 | RUN npm run build 12 | 13 | EXPOSE 4000 14 | 15 | CMD ["npm", "run", "serve"] 16 | -------------------------------------------------------------------------------- /frontend-angular/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2017-2025 Ganatan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /frontend-angular/README.md: -------------------------------------------------------------------------------- 1 | 2 | ### Installation 3 | * `npm install` (installing dependencies) 4 | * `npm outdated` (verifying dependencies) 5 | 6 | ### Developpement 7 | * `npm run start` 8 | * in your browser [http://localhost:4200](http://localhost:4200) 9 | 10 | ## Linter 11 | * `npm run lint` 12 | 13 | ## Tests 14 | * `npm run test` 15 | * `npm run coverage` 16 | 17 | ### Compilation 18 | * `npm run build` ( without SSR) 19 | 20 | ### Production 21 | * `npm run serve` 22 | * in your browser [http://localhost:4000](http://localhost:4000) 23 | 24 | 25 | ### Author 26 | * Author : danny 27 | -------------------------------------------------------------------------------- /frontend-angular/angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "projects": { 6 | "angular-starter": { 7 | "projectType": "application", 8 | "schematics": {}, 9 | "root": "", 10 | "sourceRoot": "src", 11 | "prefix": "app", 12 | "architect": { 13 | "build": { 14 | "builder": "@angular/build:application", 15 | "options": { 16 | "browser": "src/main.ts", 17 | "polyfills": [ 18 | "zone.js" 19 | ], 20 | "tsConfig": "tsconfig.app.json", 21 | "assets": [ 22 | { 23 | "glob": "**/*", 24 | "input": "public" 25 | } 26 | ], 27 | "styles": [ 28 | "src/styles.css" 29 | ] 30 | }, 31 | "configurations": { 32 | "production": { 33 | "budgets": [ 34 | { 35 | "type": "initial", 36 | "maximumWarning": "500kB", 37 | "maximumError": "1MB" 38 | }, 39 | { 40 | "type": "anyComponentStyle", 41 | "maximumWarning": "4kB", 42 | "maximumError": "8kB" 43 | } 44 | ], 45 | "outputHashing": "all" 46 | }, 47 | "development": { 48 | "optimization": false, 49 | "extractLicenses": false, 50 | "sourceMap": true, 51 | "fileReplacements": [ 52 | { 53 | "replace": "src/environments/environment.ts", 54 | "with": "src/environments/environment.development.ts" 55 | } 56 | ] 57 | } 58 | }, 59 | "defaultConfiguration": "production" 60 | }, 61 | "serve": { 62 | "builder": "@angular/build:dev-server", 63 | "configurations": { 64 | "production": { 65 | "buildTarget": "angular-starter:build:production" 66 | }, 67 | "development": { 68 | "buildTarget": "angular-starter:build:development" 69 | } 70 | }, 71 | "defaultConfiguration": "development" 72 | }, 73 | "extract-i18n": { 74 | "builder": "@angular/build:extract-i18n" 75 | }, 76 | "test": { 77 | "builder": "@angular/build:karma", 78 | "options": { 79 | "polyfills": [ 80 | "zone.js", 81 | "zone.js/testing" 82 | ], 83 | "tsConfig": "tsconfig.spec.json", 84 | "assets": [ 85 | { 86 | "glob": "**/*", 87 | "input": "public" 88 | } 89 | ], 90 | "styles": [ 91 | "src/styles.css" 92 | ] 93 | } 94 | }, 95 | "lint": { 96 | "builder": "@angular-eslint/builder:lint", 97 | "options": { 98 | "lintFilePatterns": [ 99 | "src/**/*.ts", 100 | "src/**/*.html" 101 | ] 102 | } 103 | } 104 | } 105 | } 106 | }, 107 | "cli": { 108 | "schematicCollections": [ 109 | "angular-eslint" 110 | ] 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /frontend-angular/eslint.config.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | const eslint = require("@eslint/js"); 3 | const tseslint = require("typescript-eslint"); 4 | const angular = require("angular-eslint"); 5 | 6 | module.exports = tseslint.config( 7 | { 8 | files: ["**/*.ts"], 9 | extends: [ 10 | eslint.configs.recommended, 11 | ...tseslint.configs.recommended, 12 | ...tseslint.configs.stylistic, 13 | ...angular.configs.tsRecommended, 14 | ], 15 | processor: angular.processInlineTemplates, 16 | rules: { 17 | "@angular-eslint/directive-selector": [ 18 | "error", 19 | { 20 | type: "attribute", 21 | prefix: "app", 22 | style: "camelCase", 23 | }, 24 | ], 25 | "@angular-eslint/component-selector": [ 26 | "error", 27 | { 28 | type: "element", 29 | prefix: "app", 30 | style: "kebab-case", 31 | }, 32 | ], 33 | "@angular-eslint/component-class-suffix": [ 34 | "error", 35 | { 36 | suffixes: ["","Component"] 37 | } 38 | ], 39 | "no-undefined": "error", 40 | "no-var": "error", 41 | "prefer-const": "error", 42 | "func-names": "error", 43 | "id-length": "error", 44 | "newline-before-return": "error", 45 | "space-before-blocks": "error", 46 | "no-alert": "error" 47 | }, 48 | }, 49 | { 50 | files: ["**/*.html"], 51 | extends: [ 52 | ...angular.configs.templateRecommended, 53 | ...angular.configs.templateAccessibility, 54 | ], 55 | rules: {}, 56 | } 57 | ); 58 | -------------------------------------------------------------------------------- /frontend-angular/nginx.conf: -------------------------------------------------------------------------------- 1 | user www-data; 2 | worker_processes auto; 3 | pid /run/nginx.pid; 4 | include /etc/nginx/modules-enabled/*.conf; 5 | 6 | events { 7 | worker_connections 768; 8 | } 9 | 10 | http { 11 | sendfile on; 12 | tcp_nopush on; 13 | tcp_nodelay on; 14 | keepalive_timeout 65; 15 | types_hash_max_size 2048; 16 | include /etc/nginx/mime.types; 17 | default_type application/octet-stream; 18 | 19 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE 20 | ssl_prefer_server_ciphers on; 21 | 22 | access_log /var/log/nginx/access.log; 23 | error_log /var/log/nginx/error.log; 24 | 25 | gzip on; 26 | 27 | include /etc/nginx/conf.d/*.conf; 28 | 29 | server { 30 | listen 80 default_server; 31 | listen [::]:80 default_server; 32 | root /var/www/html; 33 | index index.html index.htm index.nginx-debian.html; 34 | 35 | server_name _; 36 | 37 | location / { 38 | try_files $uri $uri/ =404; 39 | } 40 | 41 | } 42 | 43 | } 44 | 45 | -------------------------------------------------------------------------------- /frontend-angular/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-starter", 3 | "version": "20.0.0", 4 | "scripts": { 5 | "ng": "ng", 6 | "dev": "ng serve --port 4200", 7 | "start": "ng serve --port 4200", 8 | "build": "ng build", 9 | "watch": "ng build --watch --configuration development", 10 | "test": "ng test", 11 | "test:headless": "ng test --watch=false --browsers=ChromeHeadless", 12 | "coverage": "ng test --no-watch --code-coverage", 13 | "lint": "ng lint", 14 | "serve": "node server.js", 15 | "docker:list-containers": "docker ps -a", 16 | "docker:list-images": "docker images", 17 | "docker:build": "docker build -t frontend-angular-starter .", 18 | "docker:run": "docker run -p 4000:4000 frontend-angular-starter" 19 | }, 20 | "private": true, 21 | "dependencies": { 22 | "@angular/common": "20.0.0", 23 | "@angular/compiler": "20.0.0", 24 | "@angular/core": "20.0.0", 25 | "@angular/forms": "20.0.0", 26 | "@angular/platform-browser": "20.0.0", 27 | "@angular/router": "20.0.0", 28 | "express": "5.1.0", 29 | "rxjs": "7.8.2", 30 | "tslib": "2.8.1", 31 | "zone.js": "0.15.1" 32 | }, 33 | "devDependencies": { 34 | "@angular/build": "20.0.0", 35 | "@angular/cli": "20.0.0", 36 | "@angular/compiler-cli": "20.0.0", 37 | "@types/jasmine": "5.1.8", 38 | "angular-eslint": "19.7.1", 39 | "eslint": "9.28.0", 40 | "jasmine-core": "5.7.1", 41 | "karma": "6.4.4", 42 | "karma-chrome-launcher": "3.2.0", 43 | "karma-coverage": "2.2.1", 44 | "karma-jasmine": "5.1.0", 45 | "karma-jasmine-html-reporter": "2.1.0", 46 | "typescript": "5.8.3", 47 | "typescript-eslint": "8.33.1" 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /frontend-angular/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganatan/angular-react-starter/09f6e41dfc0d22f99514fe4aac8748e6054e9c1f/frontend-angular/public/favicon.ico -------------------------------------------------------------------------------- /frontend-angular/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Test Express 5 8 | 9 | 10 |

Bienvenue sur Express 5

11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /frontend-angular/server.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const path = require('path'); 3 | const app = express(); 4 | 5 | app.use(express.static(path.join(__dirname, 'dist/angular-starter/browser'))); 6 | 7 | app.get('/', function (req, res) { 8 | res.sendFile(path.join(__dirname, 'dist/angular-starter/browser', 'index.html')); 9 | }); 10 | 11 | const port = 4000; 12 | const host = 'localhost'; 13 | app.listen(port, () => { 14 | console.log(`Server running at http://${host}:${port}`); 15 | }) 16 | 17 | -------------------------------------------------------------------------------- /frontend-angular/src/app/app.config.ts: -------------------------------------------------------------------------------- 1 | import { ApplicationConfig, provideBrowserGlobalErrorListeners, provideZoneChangeDetection } from '@angular/core'; 2 | import { provideRouter } from '@angular/router'; 3 | 4 | import { routes } from './app.routes'; 5 | 6 | export const appConfig: ApplicationConfig = { 7 | providers: [ 8 | provideBrowserGlobalErrorListeners(), 9 | provideZoneChangeDetection({ eventCoalescing: true }), 10 | provideRouter(routes) 11 | ] 12 | }; 13 | -------------------------------------------------------------------------------- /frontend-angular/src/app/app.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganatan/angular-react-starter/09f6e41dfc0d22f99514fe4aac8748e6054e9c1f/frontend-angular/src/app/app.css -------------------------------------------------------------------------------- /frontend-angular/src/app/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 179 | 180 |
181 |
182 |
183 | 228 |

Hello, {{ title }}

229 |

Congratulations! Your app is running. 🎉

230 |
231 | 232 |
233 |
234 | @for (item of [ 235 | { title: 'Explore the Docs', link: 'https://angular.dev' }, 236 | { title: 'Learn with Tutorials', link: 'https://angular.dev/tutorials' }, 237 | { title: 'CLI Docs', link: 'https://angular.dev/tools/cli' }, 238 | { title: 'Angular Language Service', link: 'https://angular.dev/tools/language-service' }, 239 | { title: 'Angular DevTools', link: 'https://angular.dev/tools/devtools' }, 240 | ]; track item.title) { 241 | 247 | {{ item.title }} 248 | 255 | 258 | 259 | 260 | } 261 |
262 | 323 |
324 |
325 |
326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | -------------------------------------------------------------------------------- /frontend-angular/src/app/app.routes.ts: -------------------------------------------------------------------------------- 1 | import { Routes } from '@angular/router'; 2 | 3 | export const routes: Routes = []; 4 | -------------------------------------------------------------------------------- /frontend-angular/src/app/app.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { App } from './app'; 3 | 4 | describe('App', () => { 5 | beforeEach(async () => { 6 | await TestBed.configureTestingModule({ 7 | imports: [App], 8 | }).compileComponents(); 9 | }); 10 | 11 | it('should create the app', () => { 12 | const fixture = TestBed.createComponent(App); 13 | const app = fixture.componentInstance; 14 | expect(app).toBeTruthy(); 15 | }); 16 | 17 | it('should render title', () => { 18 | const fixture = TestBed.createComponent(App); 19 | fixture.detectChanges(); 20 | const compiled = fixture.nativeElement as HTMLElement; 21 | expect(compiled.querySelector('h1')?.textContent).toContain('Hello, angular-starter'); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /frontend-angular/src/app/app.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { RouterOutlet } from '@angular/router'; 3 | 4 | @Component({ 5 | selector: 'app-root', 6 | imports: [RouterOutlet], 7 | templateUrl: './app.html', 8 | styleUrl: './app.css' 9 | }) 10 | export class App { 11 | protected title = 'angular-starter'; 12 | } 13 | -------------------------------------------------------------------------------- /frontend-angular/src/environments/environment.development.ts: -------------------------------------------------------------------------------- 1 | export const environment = {}; 2 | -------------------------------------------------------------------------------- /frontend-angular/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | export const environment = {}; 2 | -------------------------------------------------------------------------------- /frontend-angular/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularStarter 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /frontend-angular/src/main.ts: -------------------------------------------------------------------------------- 1 | import { bootstrapApplication } from '@angular/platform-browser'; 2 | import { appConfig } from './app/app.config'; 3 | import { App } from './app/app'; 4 | 5 | bootstrapApplication(App, appConfig) 6 | .catch((err) => console.error(err)); 7 | -------------------------------------------------------------------------------- /frontend-angular/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /frontend-angular/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */ 2 | /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */ 3 | { 4 | "extends": "./tsconfig.json", 5 | "compilerOptions": { 6 | "outDir": "./out-tsc/app", 7 | "types": [] 8 | }, 9 | "include": [ 10 | "src/**/*.ts" 11 | ], 12 | "exclude": [ 13 | "src/**/*.spec.ts" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /frontend-angular/tsconfig.json: -------------------------------------------------------------------------------- 1 | /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */ 2 | /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */ 3 | { 4 | "compileOnSave": false, 5 | "compilerOptions": { 6 | "strict": true, 7 | "noImplicitOverride": true, 8 | "noPropertyAccessFromIndexSignature": true, 9 | "noImplicitReturns": true, 10 | "noFallthroughCasesInSwitch": true, 11 | "skipLibCheck": true, 12 | "isolatedModules": true, 13 | "experimentalDecorators": true, 14 | "importHelpers": true, 15 | "target": "ES2022", 16 | "module": "preserve" 17 | }, 18 | "angularCompilerOptions": { 19 | "enableI18nLegacyMessageIdFormat": false, 20 | "strictInjectionParameters": true, 21 | "strictInputAccessModifiers": true, 22 | "typeCheckHostBindings": true, 23 | "strictTemplates": true 24 | }, 25 | "files": [], 26 | "references": [ 27 | { 28 | "path": "./tsconfig.app.json" 29 | }, 30 | { 31 | "path": "./tsconfig.spec.json" 32 | } 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /frontend-angular/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */ 2 | /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */ 3 | { 4 | "extends": "./tsconfig.json", 5 | "compilerOptions": { 6 | "outDir": "./out-tsc/spec", 7 | "types": [ 8 | "jasmine" 9 | ] 10 | }, 11 | "include": [ 12 | "src/**/*.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /frontend-react/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "es2021": true, 5 | "jest": true 6 | }, 7 | "extends": [ 8 | "eslint:recommended", 9 | "plugin:react/recommended" 10 | ], 11 | "parserOptions": { 12 | "ecmaFeatures": { 13 | "jsx": true 14 | }, 15 | "ecmaVersion": "latest", 16 | "sourceType": "module" 17 | }, 18 | "plugins": [ 19 | "react" 20 | ], 21 | "rules": { 22 | "linebreak-style": 0, 23 | "no-undefined": "error", 24 | "no-var": "error", 25 | "prefer-const": "error", 26 | "func-names": "error", 27 | "id-length": "error", 28 | "newline-before-return": "error", 29 | "space-before-blocks": "error", 30 | "no-alert": "error", 31 | "react/prop-types": 0, 32 | "indent": [ 33 | "error", 34 | 2 35 | ] 36 | }, 37 | "settings": { 38 | "react": { 39 | "version": "detect" 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /frontend-react/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /frontend-react/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:22 2 | 3 | WORKDIR /app 4 | 5 | COPY package*.json ./ 6 | 7 | RUN npm install 8 | 9 | COPY . . 10 | 11 | RUN npm run build 12 | 13 | EXPOSE 3000 14 | 15 | CMD ["npm", "run", "serve"] 16 | -------------------------------------------------------------------------------- /frontend-react/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2017-2025 Ganatan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /frontend-react/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `npm start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser. 13 | 14 | The page will reload when you make changes.\ 15 | You may also see any lint errors in the console. 16 | 17 | ### `npm test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `npm run build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `npm run eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!** 35 | 36 | If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. 39 | 40 | You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `npm run build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /frontend-react/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import globals from "globals"; 2 | import pluginJs from "@eslint/js"; 3 | import pluginReact from "eslint-plugin-react"; 4 | 5 | /** @type {import('eslint').Linter.Config[]} */ 6 | export default [ 7 | { files: ["**/*.{js,mjs,cjs,jsx}"] }, 8 | { 9 | languageOptions: { 10 | globals: { 11 | ...globals.browser, 12 | ...globals.jest, 13 | }, 14 | }, 15 | settings: { 16 | react: { 17 | version: "detect", 18 | }, 19 | }, 20 | }, 21 | pluginJs.configs.recommended, 22 | pluginReact.configs.flat.recommended, 23 | ]; 24 | -------------------------------------------------------------------------------- /frontend-react/nginx.conf: -------------------------------------------------------------------------------- 1 | user www-data; 2 | worker_processes auto; 3 | pid /run/nginx.pid; 4 | include /etc/nginx/modules-enabled/*.conf; 5 | 6 | events { 7 | worker_connections 768; 8 | } 9 | 10 | http { 11 | sendfile on; 12 | tcp_nopush on; 13 | tcp_nodelay on; 14 | keepalive_timeout 65; 15 | types_hash_max_size 2048; 16 | include /etc/nginx/mime.types; 17 | default_type application/octet-stream; 18 | 19 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE 20 | ssl_prefer_server_ciphers on; 21 | 22 | access_log /var/log/nginx/access.log; 23 | error_log /var/log/nginx/error.log; 24 | 25 | gzip on; 26 | 27 | include /etc/nginx/conf.d/*.conf; 28 | 29 | server { 30 | listen 80 default_server; 31 | listen [::]:80 default_server; 32 | root /var/www/html; 33 | index index.html index.htm index.nginx-debian.html; 34 | 35 | server_name _; 36 | 37 | location / { 38 | try_files $uri $uri/ =404; 39 | } 40 | 41 | } 42 | 43 | } 44 | 45 | -------------------------------------------------------------------------------- /frontend-react/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-starter", 3 | "version": "19.1.0", 4 | "keywords": [], 5 | "author": "", 6 | "license": "MIT", 7 | "private": true, 8 | "dependencies": { 9 | "@testing-library/jest-dom": "6.6.3", 10 | "@testing-library/react": "16.3.0", 11 | "@testing-library/user-event": "14.6.1", 12 | "express": "^5.1.0", 13 | "react": "19.1.0", 14 | "react-dom": "19.1.0", 15 | "react-scripts": "5.0.1", 16 | "web-vitals": "5.0.2" 17 | }, 18 | "scripts": { 19 | "start": "react-scripts start", 20 | "build": "react-scripts build", 21 | "test": "react-scripts test", 22 | "coverage": "react-scripts test --coverage --watchAll=false", 23 | "eject": "react-scripts eject", 24 | "lint": "eslint \"src/**/*.{js,jsx}\"", 25 | "serve": "node server", 26 | "docker:list-containers": "docker ps -a", 27 | "docker:list-images": "docker images", 28 | "docker:build": "docker build -t frontend-react-starter .", 29 | "docker:run": "docker run -p 3000:3000 frontend-react-starter" 30 | }, 31 | "eslintConfig": { 32 | "extends": [ 33 | "react-app", 34 | "react-app/jest" 35 | ] 36 | }, 37 | "browserslist": { 38 | "production": [ 39 | ">0.2%", 40 | "not dead", 41 | "not op_mini all" 42 | ], 43 | "development": [ 44 | "last 1 chrome version", 45 | "last 1 firefox version", 46 | "last 1 safari version" 47 | ] 48 | }, 49 | "devDependencies": { 50 | "@eslint/js": "9.28.0", 51 | "eslint": "9.28.0", 52 | "eslint-plugin-import": "2.31.0", 53 | "eslint-plugin-jsx-a11y": "6.10.2", 54 | "eslint-plugin-react": "7.37.5", 55 | "globals": "16.2.0" 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /frontend-react/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganatan/angular-react-starter/09f6e41dfc0d22f99514fe4aac8748e6054e9c1f/frontend-react/public/favicon.ico -------------------------------------------------------------------------------- /frontend-react/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | ​​​​​​​react-starter 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /frontend-react/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganatan/angular-react-starter/09f6e41dfc0d22f99514fe4aac8748e6054e9c1f/frontend-react/public/logo192.png -------------------------------------------------------------------------------- /frontend-react/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganatan/angular-react-starter/09f6e41dfc0d22f99514fe4aac8748e6054e9c1f/frontend-react/public/logo512.png -------------------------------------------------------------------------------- /frontend-react/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /frontend-react/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /frontend-react/server.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const path = require('path'); 3 | const app = express(); 4 | 5 | app.use(express.static(path.join(__dirname, 'build'))); 6 | 7 | app.get('/', function (req, res) { 8 | res.sendFile(path.join(__dirname, 'build', 'index.html')); 9 | }); 10 | 11 | const port = 3000; 12 | const host = 'localhost'; 13 | app.listen(port, () => { 14 | console.log(`Server running at http://${host}:${port}`); 15 | }) 16 | -------------------------------------------------------------------------------- /frontend-react/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /frontend-react/src/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import logo from './logo.svg'; 3 | import './App.css'; 4 | 5 | function App() { 6 | return ( 7 |
8 |
9 | logo 10 |

11 | Edit src/App.js and save to reload. 12 |

13 | 19 | Learn React 20 | 21 |
22 |
23 | ); 24 | } 25 | 26 | export default App; 27 | -------------------------------------------------------------------------------- /frontend-react/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { render, screen } from '@testing-library/react'; 3 | import App from './App'; 4 | 5 | test('renders learn react link', () => { 6 | render(); 7 | const linkElement = screen.getByText(/learn react/i); 8 | expect(linkElement).toBeInTheDocument(); 9 | }); 10 | -------------------------------------------------------------------------------- /frontend-react/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /frontend-react/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import './index.css'; 4 | import App from './App'; 5 | import reportWebVitals from './reportWebVitals'; 6 | 7 | const root = ReactDOM.createRoot(document.getElementById('root')); 8 | root.render( 9 | 10 | 11 | 12 | ); 13 | 14 | // If you want to start measuring performance in your app, pass a function 15 | // to log results (for example: reportWebVitals(console.log)) 16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 17 | reportWebVitals(); 18 | -------------------------------------------------------------------------------- /frontend-react/src/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend-react/src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /frontend-react/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /img/ganatan-about-github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganatan/angular-react-starter/09f6e41dfc0d22f99514fe4aac8748e6054e9c1f/img/ganatan-about-github.png -------------------------------------------------------------------------------- /img/ganatan-angular-starter-github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganatan/angular-react-starter/09f6e41dfc0d22f99514fe4aac8748e6054e9c1f/img/ganatan-angular-starter-github.png -------------------------------------------------------------------------------- /img/ganatan-react-starter-github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganatan/angular-react-starter/09f6e41dfc0d22f99514fe4aac8748e6054e9c1f/img/ganatan-react-starter-github.png --------------------------------------------------------------------------------