|
| 1 | +# 💎 Mavluda Beauty & Aliya Wedding Room |
| 2 | + |
| 3 | +This project is a high-end management system for a luxury beauty salon (**Mavluda Azizova Beauty House**) and a wedding dress rental service (**Aliya Wedding Room**). Every aspect of the system must reflect the premium nature of these services. |
| 4 | + |
| 5 | +## 🏗️ Project Architecture |
| 6 | + |
| 7 | +The project is structured as a monorepo with a dedicated backend and frontend. |
| 8 | + |
| 9 | +### 🛡️ Backend (NestJS) |
| 10 | +- **Architecture**: Hexagonal Architecture (Ports and Adapters). |
| 11 | +- **Database**: MongoDB (via Mongoose). |
| 12 | +- **Core Principles**: |
| 13 | + - **Domain Layer**: Pure business logic, no external dependencies (entities, value objects). |
| 14 | + - **Application Layer**: Use cases and business flows (booking, rental logic). |
| 15 | + - **Infrastructure Layer**: Framework-specific code, database adapters, external integrations (Instagram, SMS). |
| 16 | +- **Key Modules**: `booking`, `inventory` (wedding dresses), `partnership` (influencers), `veil`, `gallery`, `payment`, `user`, `auth`. |
| 17 | + |
| 18 | +### 🎨 Frontend (Angular) |
| 19 | +- **Architecture**: Modern, Zoneless, Signal-based. |
| 20 | +- **Change Detection**: Zoneless (`provideZonelessChangeDetection()`). |
| 21 | +- **State Management**: Reactive signals (`signal`, `computed`, `effect`). |
| 22 | +- **Components**: 100% Standalone components. |
| 23 | +- **Styling**: Tailwind CSS for a modern, "alive" aesthetic. |
| 24 | +- **Internationalization**: i18n support for English (en-US), Russian (ru), and Tajik (tg). |
| 25 | + |
| 26 | +## 📁 Directory Overview |
| 27 | + |
| 28 | +### Root |
| 29 | +- `/backend`: NestJS API. |
| 30 | +- `/frontend`: Angular SPA. |
| 31 | +- `.agent/rules`: Architectural and development mandates. |
| 32 | + |
| 33 | +### Backend Structure (`/backend/src`) |
| 34 | +- `/*/domain`: Business entities and logic. |
| 35 | +- `/*/application`: Use cases and services. |
| 36 | +- `/*/infrastructure`: Controllers, repositories, and DTOs. |
| 37 | +- `/*/presentation`: API endpoints (sometimes combined with infrastructure). |
| 38 | +- `common/`: Shared config, database connection, decorators, and guards. |
| 39 | + |
| 40 | +### Frontend Structure (`/frontend/src`) |
| 41 | +- `pages/`: Route-level components. |
| 42 | +- `features/`: Complex UI logic (e.g., auth, language selection). |
| 43 | +- `entities/`: Data-focused components and services. |
| 44 | +- `widgets/`: Independent, reusable UI blocks (header, sidebar, layouts). |
| 45 | +- `shared/`: Generic UI components, pipes, services, and models. |
| 46 | +- `core/`: Config, guards, and interceptors. |
| 47 | + |
| 48 | +## 🚀 Key Commands |
| 49 | + |
| 50 | +### Backend |
| 51 | +- `npm run start:dev`: Run backend in development mode with watch. |
| 52 | +- `npm run build`: Build the backend for production. |
| 53 | +- `npm run lint`: Run ESLint with auto-fix. |
| 54 | +- `npm run test`: Run unit tests. |
| 55 | + |
| 56 | +### Frontend |
| 57 | +- `npm run dev`: Run frontend development server (`ng serve`). |
| 58 | +- `npm run build`: Build the frontend for production. |
| 59 | +- `npm run preview`: Run production build preview. |
| 60 | + |
| 61 | +## 📏 Development Conventions |
| 62 | + |
| 63 | +### Backend Rules |
| 64 | +1. **Hexagonal Purity**: Infrastructure/Controllers -> Application -> Domain. The Domain must not import anything from other layers. |
| 65 | +2. **Module Aliases**: Use `@modules/*`, `@common/*`, etc., as defined in `tsconfig.json`. |
| 66 | +3. **Entity Mapping**: Every module must strictly map to business domains (e.g., `booking-module` for VIP scheduling). |
| 67 | + |
| 68 | +### Frontend Rules |
| 69 | +1. **Zoneless Only**: Never rely on Zone.js. All UI updates must be triggered via signals or explicit change detection. |
| 70 | +2. **Signals over Observables**: Use `signal()` for state. Use `toSignal()` when dealing with HTTP calls if needed, but prefer signal-based state management. |
| 71 | +3. **Modern Syntax**: |
| 72 | + - Use `@if`, `@for`, `@switch` control flows. |
| 73 | + - Use `input()` and `output()` instead of `@Input()` and `@Output()`. |
| 74 | + - Use `inject()` for dependency injection instead of constructors. |
| 75 | +4. **Standalone**: All components, directives, and pipes must be standalone. |
| 76 | + |
| 77 | +## 🛠️ Environment Setup |
| 78 | +- **Node.js**: Modern LTS version recommended. |
| 79 | +- **Database**: MongoDB instance required for the backend. |
| 80 | +- **Environment Variables**: Managed via `.env` in the root and project-specific config files. |
0 commit comments