Skip to content
Snippets Groups Projects
Commit 87dbd293 authored by thibault.capt's avatar thibault.capt
Browse files

(feat): init frontend

parent 7d2ac33c
No related branches found
No related tags found
No related merge requests found
Showing
with 9892 additions and 5821 deletions
...@@ -10,6 +10,7 @@ trim_trailing_whitespace = true ...@@ -10,6 +10,7 @@ trim_trailing_whitespace = true
[*.ts] [*.ts]
quote_type = single quote_type = single
ij_typescript_use_double_quotes = false
[*.md] [*.md]
max_line_length = off max_line_length = off
......
{
"env": {
"browser": true,
"es2022": true
},
"root": true,
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": ["tsconfig.json"],
"createDefaultProgram": true
},
"extends": [
"eslint:recommended",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/recommended",
"prettier"
],
"rules": {
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "app",
"style": "camelCase"
}
]
}
},
{
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {}
}
]
}
v22.11.0 v20.11.1
dist/
node_modules/
package-lock.json
{}
# Frontend # Frontend
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 18.1.4. This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.0.0.
## Development server ## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. To start a local development server, run:
```bash
ng serve
```
Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.
## Code scaffolding ## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
```bash
ng generate component component-name
```
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
```bash
ng generate --help
```
## Build ## Building
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. To build the project run:
```bash
ng build
```
This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.
## Running unit tests ## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
```bash
ng test
```
## Running end-to-end tests ## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. For end-to-end (e2e) testing, run:
```bash
ng e2e
```
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
## Further help ## Additional Resources
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page. For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
...@@ -3,37 +3,39 @@ ...@@ -3,37 +3,39 @@
"version": 1, "version": 1,
"newProjectRoot": "projects", "newProjectRoot": "projects",
"projects": { "projects": {
"volleyhub": { "volleyhub-ui": {
"projectType": "application", "projectType": "application",
"schematics": { "schematics": {
"@schematics/angular:component": { "@schematics/angular:component": {
"style": "scss" "style": "scss"
} }
}, },
"root": "projects/volleyhub", "root": "projects/volleyhub-ui",
"sourceRoot": "projects/volleyhub/src", "sourceRoot": "projects/volleyhub-ui/src",
"prefix": "app", "prefix": "app",
"architect": { "architect": {
"build": { "build": {
"builder": "@angular-devkit/build-angular:application", "builder": "@angular-devkit/build-angular:application",
"options": { "options": {
"outputPath": "dist/volleyhub", "outputPath": "dist/volleyhub-ui",
"index": "projects/volleyhub/src/index.html", "index": "projects/volleyhub-ui/src/index.html",
"browser": "projects/volleyhub/src/main.ts", "browser": "projects/volleyhub-ui/src/main.ts",
"polyfills": [ "polyfills": ["zone.js"],
"zone.js" "tsConfig": "projects/volleyhub-ui/tsconfig.app.json",
],
"tsConfig": "projects/volleyhub/tsconfig.app.json",
"inlineStyleLanguage": "scss", "inlineStyleLanguage": "scss",
"assets": [ "assets": [
{ {
"glob": "**/*", "glob": "**/*",
"input": "projects/volleyhub/public" "input": "projects/tunesphere-ui/public",
"output": "/assets/"
},
{
"glob": "favicon.ico",
"input": "projects/tunesphere-ui/src/public/favicon.ico",
"output": "/"
} }
], ],
"styles": [ "styles": ["projects/volleyhub-ui/src/styles.scss"],
"projects/volleyhub/src/styles.scss"
],
"scripts": [] "scripts": []
}, },
"configurations": { "configurations": {
...@@ -46,8 +48,8 @@ ...@@ -46,8 +48,8 @@
}, },
{ {
"type": "anyComponentStyle", "type": "anyComponentStyle",
"maximumWarning": "2kB", "maximumWarning": "4kB",
"maximumError": "4kB" "maximumError": "8kB"
} }
], ],
"outputHashing": "all" "outputHashing": "all"
...@@ -55,7 +57,13 @@ ...@@ -55,7 +57,13 @@
"development": { "development": {
"optimization": false, "optimization": false,
"extractLicenses": false, "extractLicenses": false,
"sourceMap": true "sourceMap": true,
"fileReplacements": [
{
"replace": "projects/volleyhub-ui/src/environments/environment.ts",
"with": "projects/volleyhub-ui/src/environments/environment.development.ts"
}
]
} }
}, },
"defaultConfiguration": "production" "defaultConfiguration": "production"
...@@ -64,10 +72,10 @@ ...@@ -64,10 +72,10 @@
"builder": "@angular-devkit/build-angular:dev-server", "builder": "@angular-devkit/build-angular:dev-server",
"configurations": { "configurations": {
"production": { "production": {
"buildTarget": "volleyhub:build:production" "buildTarget": "volleyhub-ui:build:production"
}, },
"development": { "development": {
"buildTarget": "volleyhub:build:development" "buildTarget": "volleyhub-ui:build:development"
} }
}, },
"defaultConfiguration": "development" "defaultConfiguration": "development"
...@@ -78,25 +86,40 @@ ...@@ -78,25 +86,40 @@
"test": { "test": {
"builder": "@angular-devkit/build-angular:karma", "builder": "@angular-devkit/build-angular:karma",
"options": { "options": {
"polyfills": [ "polyfills": ["zone.js", "zone.js/testing"],
"zone.js", "tsConfig": "projects/volleyhub-ui/tsconfig.spec.json",
"zone.js/testing"
],
"tsConfig": "projects/volleyhub/tsconfig.spec.json",
"inlineStyleLanguage": "scss", "inlineStyleLanguage": "scss",
"assets": [ "assets": [
{ {
"glob": "**/*", "glob": "**/*",
"input": "projects/volleyhub/public" "input": "projects/tunesphere-ui/public",
"output": "/assets/"
},
{
"glob": "favicon.ico",
"input": "projects/tunesphere-ui/src/public/favicon.ico",
"output": "/"
} }
], ],
"styles": [ "styles": ["projects/volleyhub-ui/src/styles.scss"],
"projects/volleyhub/src/styles.scss"
],
"scripts": [] "scripts": []
} }
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/volleyhub-ui/**/*.ts",
"projects/volleyhub-ui/**/*.html"
],
"eslintConfig": "./.eslintrc.json"
}
} }
} }
} }
},
"cli": {
"schematicCollections": ["@angular-eslint/schematics"],
"analytics": false
} }
} }
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: "",
frameworks: ["jasmine", "@angular-devkit/build-angular"],
plugins: [
require("karma-jasmine"),
require("karma-chrome-launcher"),
require("karma-jasmine-html-reporter"),
require("karma-coverage"),
require("@angular-devkit/build-angular/plugins/karma"),
],
client: {
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
},
clearContext: false, // leave Jasmine Spec Runner output visible in browser
},
jasmineHtmlReporter: {
suppressAll: true, // removes the duplicated traces
},
coverageReporter: {
dir: require("path").join(__dirname, "./coverage/my-app"),
subdir: ".",
reporters: [{ type: "html" }, { type: "text-summary" }],
},
reporters: ["progress", "kjhtml"],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ["Chrome"],
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: "ChromeHeadless",
flags: ["--no-sandbox", "--disable-gpu"],
},
},
singleRun: false,
restartOnFileChange: true,
});
};
Source diff could not be displayed: it is too large. Options to address this: view the blob.
...@@ -4,35 +4,59 @@ ...@@ -4,35 +4,59 @@
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve", "start": "ng serve",
"start:dev": "ng dev",
"build": "ng build", "build": "ng build",
"watch": "ng build --watch --configuration development", "watch": "ng build --watch --configuration development",
"test": "ng test" "test": "ng test",
"test:ci": "ng test --browsers=ChromeHeadlessNoSandbox",
"lint": "ng lint && prettier --check .",
"format": "prettier --write ."
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "^18.1.0", "@angular/animations": "^19.0.0",
"@angular/common": "^18.1.0", "@angular/common": "^19.0.0",
"@angular/compiler": "^18.1.0", "@angular/compiler": "^19.0.0",
"@angular/core": "^18.1.0", "@angular/core": "^19.0.0",
"@angular/forms": "^18.1.0", "@angular/forms": "^19.0.0",
"@angular/platform-browser": "^18.1.0", "@angular/platform-browser": "^19.0.0",
"@angular/platform-browser-dynamic": "^18.1.0", "@angular/platform-browser-dynamic": "^19.0.0",
"@angular/router": "^18.1.0", "@angular/router": "^19.0.0",
"rxjs": "~7.8.0", "rxjs": "~7.8.0",
"tslib": "^2.3.0", "tslib": "^2.3.0",
"zone.js": "~0.14.3" "zone.js": "~0.15.0"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "^18.2.12", "@angular-devkit/build-angular": "^19.0.1",
"@angular/cli": "^18.1.4", "@angular-eslint/eslint-plugin": "^18.4.2",
"@angular/compiler-cli": "^18.1.0", "@angular-eslint/eslint-plugin-template": "^18.4.2",
"@angular/cli": "^19.0.0",
"@angular/compiler-cli": "^19.0.0",
"@eslint/js": "^9.15.0",
"@types/jasmine": "~5.1.0", "@types/jasmine": "~5.1.0",
"jasmine-core": "~5.1.0", "angular-eslint": "18.4.2",
"daisyui": "^4.12.14",
"eslint": "^9.15.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"jasmine-core": "~5.4.0",
"karma": "~6.4.0", "karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0", "karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0", "karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0", "karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0", "karma-jasmine-html-reporter": "~2.1.0",
"typescript": "~5.5.2" "prettier": "^3.3.3",
"prettier-eslint": "^16.3.0",
"tailwindcss": "^3.4.15",
"typescript": "~5.6.2",
"typescript-eslint": "^8.15.0"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*": "prettier --write"
} }
} }
...@@ -36,8 +36,17 @@ ...@@ -36,8 +36,17 @@
--pill-accent: var(--bright-blue); --pill-accent: var(--bright-blue);
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, font-family:
Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Inter",
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
Roboto,
Helvetica,
Arial,
sans-serif,
"Apple Color Emoji",
"Segoe UI Emoji",
"Segoe UI Symbol"; "Segoe UI Symbol";
box-sizing: border-box; box-sizing: border-box;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
...@@ -51,8 +60,17 @@ ...@@ -51,8 +60,17 @@
line-height: 100%; line-height: 100%;
letter-spacing: -0.125rem; letter-spacing: -0.125rem;
margin: 0; margin: 0;
font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, font-family:
Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Inter Tight",
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
Roboto,
Helvetica,
Arial,
sans-serif,
"Apple Color Emoji",
"Segoe UI Emoji",
"Segoe UI Symbol"; "Segoe UI Symbol";
} }
...@@ -231,19 +249,26 @@ ...@@ -231,19 +249,26 @@
<div class="divider" role="separator" aria-label="Divider"></div> <div class="divider" role="separator" aria-label="Divider"></div>
<div class="right-side"> <div class="right-side">
<div class="pill-group"> <div class="pill-group">
@for (item of [ @for (
{ title: 'Explore the Docs', link: 'https://angular.dev' }, item of [
{ title: 'Learn with Tutorials', link: 'https://angular.dev/tutorials' }, { title: "Explore the Docs", link: "https://angular.dev" },
{ title: 'CLI Docs', link: 'https://angular.dev/tools/cli' }, {
{ title: 'Angular Language Service', link: 'https://angular.dev/tools/language-service' }, title: "Learn with Tutorials",
{ title: 'Angular DevTools', link: 'https://angular.dev/tools/devtools' }, link: "https://angular.dev/tutorials",
]; track item.title) { },
<a { title: "CLI Docs", link: "https://angular.dev/tools/cli" },
class="pill" {
[href]="item.link" title: "Angular Language Service",
target="_blank" link: "https://angular.dev/tools/language-service",
rel="noopener" },
> {
title: "Angular DevTools",
link: "https://angular.dev/tools/devtools",
},
];
track item.title
) {
<a class="pill" [href]="item.link" target="_blank" rel="noopener">
<span>{{ item.title }}</span> <span>{{ item.title }}</span>
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
...@@ -332,5 +357,4 @@ ...@@ -332,5 +357,4 @@
<!-- * * * * * * * * * * End of Placeholder * * * * * * * * * * * * --> <!-- * * * * * * * * * * End of Placeholder * * * * * * * * * * * * -->
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * --> <!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
<router-outlet /> <router-outlet />
...@@ -14,16 +14,18 @@ describe('AppComponent', () => { ...@@ -14,16 +14,18 @@ describe('AppComponent', () => {
expect(app).toBeTruthy(); expect(app).toBeTruthy();
}); });
it(`should have the 'volleyhub' title`, () => { it(`should have the 'volleyhub-ui' title`, () => {
const fixture = TestBed.createComponent(AppComponent); const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance; const app = fixture.componentInstance;
expect(app.title).toEqual('volleyhub'); expect(app.title).toEqual('volleyhub-ui');
}); });
it('should render title', () => { it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent); const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges(); fixture.detectChanges();
const compiled = fixture.nativeElement as HTMLElement; const compiled = fixture.nativeElement as HTMLElement;
expect(compiled.querySelector('h1')?.textContent).toContain('Hello, volleyhub'); expect(compiled.querySelector('h1')?.textContent).toContain(
'Hello, volleyhub-ui',
);
}); });
}); });
...@@ -3,11 +3,10 @@ import { RouterOutlet } from '@angular/router'; ...@@ -3,11 +3,10 @@ import { RouterOutlet } from '@angular/router';
@Component({ @Component({
selector: 'app-root', selector: 'app-root',
standalone: true,
imports: [RouterOutlet], imports: [RouterOutlet],
templateUrl: './app.component.html', templateUrl: './app.component.html',
styleUrl: './app.component.scss' styleUrl: './app.component.scss',
}) })
export class AppComponent { export class AppComponent {
title = 'volleyhub'; title = 'volleyhub-ui';
} }
...@@ -4,5 +4,8 @@ import { provideRouter } from '@angular/router'; ...@@ -4,5 +4,8 @@ import { provideRouter } from '@angular/router';
import { routes } from './app.routes'; import { routes } from './app.routes';
export const appConfig: ApplicationConfig = { export const appConfig: ApplicationConfig = {
providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes)] providers: [
provideZoneChangeDetection({ eventCoalescing: true }),
provideRouter(routes),
],
}; };
export const environment = {};
export const environment = {};
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>VolleyhubUi</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
</head>
<body>
<app-root></app-root>
</body>
</html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment