Skip to content

Commit 6b11b8d

Browse files
Merge branch 'main' into fix-veil-form-console-logs-5073749963444319208
2 parents f1df6a0 + c7e3637 commit 6b11b8d

44 files changed

Lines changed: 2366 additions & 155 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Mavluda Beauty - Full Stack Application
2+
3+
## Overview
4+
This is a full-stack application for Mavluda Beauty. The backend is built with NestJS and provides a robust, modular API. The frontend is built with Angular 19+ and features a modern, reactive UI using Signals and NgRx.
5+
6+
## Architecture
7+
8+
The system consists of three main components:
9+
1. **Frontend (Angular):** Handles user interactions, displaying the catalog, gallery, and admin dashboard.
10+
2. **Backend (NestJS):** Provides RESTful API endpoints, business logic, authentication, and database interactions.
11+
3. **Database (MongoDB):** Stores all persistent data, such as users, treatments, veils, and gallery items.
12+
4. **Cache (Redis):** Used for session management and caching where appropriate.
13+
14+
```mermaid
15+
graph TD
16+
Client[Client Browser/Angular App] -->|HTTP/REST| API[NestJS Backend API]
17+
API -->|Mongoose| MongoDB[(MongoDB Database)]
18+
API -->|Redis Client| Redis[(Redis Cache)]
19+
```
20+
21+
## Setup & Running
22+
23+
### Docker (Recommended)
24+
You can run the entire stack using Docker Compose:
25+
26+
```bash
27+
docker-compose up --build
28+
```
29+
This will start the Frontend (port 80), Backend (port 3000), MongoDB, and Redis.
30+
31+
### Local Development
32+
33+
**Backend:**
34+
1. Navigate to the `backend` directory.
35+
2. `npm install`
36+
3. Copy `.env.example` to `.env` and fill in the required values (or use defaults).
37+
4. `npm run start:dev`
38+
39+
**Frontend:**
40+
1. Navigate to the `frontend` directory.
41+
2. `npm install`
42+
3. `npm run dev`
43+
44+
## API Documentation
45+
The backend exposes a Swagger UI for API documentation. When the backend is running, you can access it at:
46+
`http://localhost:3000/api/docs`
47+
48+
## Features
49+
50+
- **Authentication:** JWT and Google OAuth strategies using Passport.js.
51+
- **Admin Panel:** Secured routes for managing content.
52+
- **Catalog:** Display veils and treatments with optimized images (`NgOptimizedImage`).
53+
- **State Management:** Uses NgRx and Signals.
54+
- **Testing:** Vitest for frontend unit tests, Jest for backend, and Playwright for E2E testing.

backend/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Stage 1: Build the NestJS app
2+
FROM node:22-alpine AS build
3+
WORKDIR /app
4+
COPY package*.json ./
5+
RUN npm install
6+
COPY . .
7+
RUN npm run build
8+
9+
# Stage 2: Run the app
10+
FROM node:22-alpine
11+
WORKDIR /app
12+
COPY package*.json ./
13+
RUN npm install --only=production
14+
COPY --from=build /app/dist ./dist
15+
EXPOSE 3000
16+
CMD ["node", "dist/main.js"]

0 commit comments

Comments
 (0)