How monil80/booking-system works
Main Components
• Frontend: The booking-system-frontend folder contains a Next.js (v15) application that uses the App Router, Tailwind CSS, and Shadcn for UI. It includes application pages for authentication (login, signup, demo) and main functionalities such as booking, dashboard, and shared components for navigation, UI widgets, and context management.
• Backend: The booking-system-backend folder is a NestJS (Node.js) application. It is organized into modules for different domains – authentication, booking, and user management. You also have shared/common services (e.g., Prisma service for database interactions, mail service for email notifications) and configuration files.
• Database: Although you don’t see explicit PostgreSQL files, the README indicates PostgreSQL as the underlying database, connected via Prisma ORM. The Prisma directory confirms that database schema definitions and the generated ORM client code play a significant role.
• Authentication & Authorization: Both layers implement authentication. The frontend uses JWT for session management and validation flows (using Zod for client-side validation). On the backend, modules (like auth/auth.controller.ts and jwt.strategy.ts) handle JWT verification, email verification, and other auth concerns.
Architectural Patterns and Design Principles
• Modular Architecture: The backend uses NestJS modules (e.g., auth, booking, user) which clearly separate different domains. Illustrate these as distinct modules under the backend component.
• RESTful or API-based Communication: Show how the frontend calls backend endpoints, receiving JSON responses.
• Use of ORM and Database Abstraction: Emphasize how Prisma abstracts direct SQL interactions, allowing the backend to deal with database entities smoothly.
• Reusable UI Components: The frontend has many shared components (from simple UI elements to context providers). Although these may not need to be diagrammed at a granular level, it’s useful to note that the Presentation Layer is component-driven.
Relevant Technologies/Frameworks
• For Frontend: Next.js, Tailwind CSS, Shadcn UI.
• For Backend: NestJS, Prisma ORM, Node.js.
• For Database: PostgreSQL.
• For Authentication: JWT.
• For Validation: Zod (in the frontend).
• Optionally, if email delivery is done via a 3rd party service, you may mention Email Service integration.