Skip to content

Commit 2d4b008

Browse files
Merge pull request #10 from beginwebdev2002/feat/fsd-design-unification-6289802992184236408
🧹 refactor frontend FSD, design system, unified components and backend integration
2 parents d7f7355 + 325c4fc commit 2d4b008

12 files changed

Lines changed: 57 additions & 866 deletions

frontend/package-lock.json

Lines changed: 2 additions & 827 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,22 @@
2929
"@ngrx/store": "^21.1.0",
3030
"crypto": "^1.0.1",
3131
"express": "^5.2.1",
32+
"flowbite": "^4.0.1",
3233
"jwt-decode": "^4.0.0",
3334
"rxjs": "^7.8.1"
35+
"rxjs": "^7.8.1"
3436
},
3537
"devDependencies": {
3638
"@analogjs/vite-plugin-angular": "^2.4.0",
3739
"@playwright/test": "^1.59.1",
3840
"@types/node": "^22.14.0",
3941
"autoprefixer": "^10.4.27",
42+
"autoprefixer": "^10.4.27",
4043
"flowbite": "^4.0.1",
4144
"jsdom": "^29.0.2",
4245
"postcss": "^8.5.9",
46+
"tailwindcss": "^3.4.19",
47+
"postcss": "^8.5.9",
4348
"tailwindcss": "^3.4.1",
4449
"typescript": "~5.8.2",
4550
"vite": "^6.2.0",

frontend/src/entities/gallery/gallery.service.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { Observable, tap } from "rxjs";
44
import { Gallery } from "@shared/models";
55
import { API_ENDPOINTS } from "@core/constants";
66

7+
import { API_ENDPOINTS } from "@core/constants";
8+
79
@Injectable({
810
providedIn: "root",
911
})

frontend/src/entities/user/auth.service.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Router } from '@angular/router';
44
import { tap } from 'rxjs/operators';
55
import { User, AuthResponse } from './model/user.model';
66
import { jwtDecode } from 'jwt-decode';
7+
import { API_ENDPOINTS } from '@core/constants';
78

89
@Injectable({
910
providedIn: 'root'
@@ -25,13 +26,13 @@ export class AuthService {
2526
}
2627

2728
login(credentials: any) {
28-
return this.http.post<AuthResponse>('/auth/login', credentials).pipe(
29+
return this.http.post<AuthResponse>(API_ENDPOINTS.AUTH.LOGIN, credentials).pipe(
2930
tap(response => this.setSession(response.access_token))
3031
);
3132
}
3233

3334
register(data: any) {
34-
return this.http.post<AuthResponse>('/auth/register', data).pipe(
35+
return this.http.post<AuthResponse>(API_ENDPOINTS.AUTH.REGISTER, data).pipe(
3536
tap(response => this.setSession(response.access_token))
3637
);
3738
}

frontend/src/shared/ui/entity-card/entity-card.component.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
<div class="bg-black-deep border border-primary-gold/20 rounded-lg overflow-hidden shadow-lg hover:shadow-primary-gold/20 transition-shadow duration-300 flex flex-col h-full group">
2+
<div class="relative w-full h-64 overflow-hidden" *ngIf="imageUrl">
3+
<img
4+
[ngSrc]="imageUrl"
5+
fill
6+
[priority]="priority"
7+
[alt]="title"
8+
class="object-cover group-hover:scale-105 transition-transform duration-500"
9+
>
110
<div class="bg-[#0A0A0A] text-[#FDFBF7] border border-[#D4AF37] rounded-xl shadow-gold overflow-hidden transition-all duration-300 hover:shadow-gold-glow flex flex-col w-full h-full">
211
<div class="relative w-full aspect-square sm:aspect-video md:aspect-[4/3] overflow-hidden" *ngIf="imageUrl">
312
<img [ngSrc]="imageUrl" fill [priority]="true" [alt]="title" class="object-cover transition-transform duration-700 hover:scale-105">
Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +0,0 @@
1-
.entity-card {
2-
border: 1px solid #ccc;
3-
border-radius: 8px;
4-
overflow: hidden;
5-
margin: 10px;
6-
display: flex;
7-
flex-direction: column;
8-
9-
.image-container {
10-
width: 100%;
11-
height: 200px;
12-
position: relative;
13-
img {
14-
object-fit: cover;
15-
}
16-
}
17-
18-
.content {
19-
padding: 10px;
20-
flex-grow: 1;
21-
}
22-
23-
.actions {
24-
padding: 10px;
25-
display: flex;
26-
justify-content: space-between;
27-
background-color: #f9f9f9;
28-
}
29-
}

frontend/src/shared/ui/entity-card/entity-card.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export class EntityCardComponent {
1313
@Input() imageUrlPath: string = 'image';
1414
@Input() titlePath: string = 'name';
1515
@Input() descriptionPath: string = 'description';
16+
@Input() priority: boolean = false;
1617

1718
@Output() edit = new EventEmitter<any>();
1819
@Output() delete = new EventEmitter<any>();
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
<div class="entity-list">
1+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-8">
22
<app-entity-card
3-
*ngFor="let entity of entities"
3+
*ngFor="let entity of entities; let i = index"
44
[entity]="entity"
55
[imageUrlPath]="imageUrlPath"
66
[titlePath]="titlePath"
77
[descriptionPath]="descriptionPath"
8+
[priority]="i === 0"
89
(edit)="onEdit($event)"
910
(delete)="onDelete($event)"
11+
class="h-full"
1012
></app-entity-card>
1113
</div>
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +0,0 @@
1-
.entity-list {
2-
display: flex;
3-
flex-wrap: wrap;
4-
gap: 20px;
5-
}

frontend/src/shared/ui/entity-list/entity-list.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Component, Input, Output, EventEmitter } from '@angular/core';
22
import { CommonModule } from '@angular/common';
3-
import { EntityCardComponent } from '../entity-card/entity-card.component';
3+
import { EntityCardComponent } from '@shared/ui/entity-card/entity-card.component';
44

55
@Component({
66
selector: 'app-entity-list',

0 commit comments

Comments
 (0)