How chaturrved/booker-backend works
Main Components
a. Client Layer:
• GraphQL Client Interface
• Authentication Endpoints
b. Application Layer:
• NestJS Core Components
• Module Structure:
• Auth Module
• Users Module
• Bookmarks Module
• Links Module
• Database Module
c. Data Layer:
• MongoDB (indicated by the presence of schemas)
• Repositories
┌─────────────────────────────────┐
• GraphQL Endpoint │
• REST Authentication API │
• ┘
┌─────────────────────────────────┐
• NestJS Modules │
• ┌──────┐ ┌────────┐ ┌───────┐ │
• Auth │ │ Users │ │ Links │ │
• ┘ └────────┘ └───────┘ │
• ┌─────────────┐ │
• Bookmarks │ │
• ┘ │
• ┘
┌─────────────────────────────────┐
• Database (MongoDB) │
• ┌────────┐ ┌────────────┐ │
• Users │ │ Bookmarks │ │
• ┘ └────────────┘ │
• ┘
Key Relationships to Highlight
• Authentication flow (JWT Strategy)
• GraphQL resolver connections to services
• Repository pattern implementation
• Database interactions
Special Architectural Elements
Specific NestJS architectural patterns:
• Guards (AuthGuard, GqlAuthGuard)
• Decorators (CurrentUser)
• Resolvers
• Services
• Repositories
• DTOs and Models
Component Interaction Details
Specific flows:
Client → GraphQL/REST → Guards → Resolvers → Services → Repositories → Database
Technical Stack Indicators
• NestJS
• GraphQL
• MongoDB
• TypeScript
• JWT
• How the modules interact
• The authentication flow
• The data flow from client to database
• The separation of concerns in the application
• The role of each architectural component