How nahidhasan141400/rcc_backend works
Main System Components
a) Frontend Layer:
• Public-facing web interface (/src/public)
• Static assets handling
• Various front-end pages (Home, About, Ministry, Get Involved)
b) Backend API Layer:
• Main Express.js server (src/server.ts)
• Router layer (/src/routers)
• Controller layer (/src/controllers)
• Service layer (/src/service)
c) Database Layer:
• Database connection (/src/database)
• Models (Event, Sermons, Video, Admin, etc.)
d) External Services:
• Payment processing systems (PayPal, SSLCommerz)
• SMS service
• Email service
• Nginx server
Component Relationships
a) Client-Server Flow:
Client → Nginx → Express Server → Controllers → Services → Database
b) Authentication Flow:
Client → Auth Middleware → Protected Routes
c) Payment Processing Flow:
Client → Payment Controllers → PayPal/SSLCommerz → Database
Specific Implementation Details
a) MVC Pattern:
• Models (/src/database/model)
• Controllers (/src/controllers)
• Views (/src/public)
b) Service Layer:
• Separation between controllers and services
• Business logic isolation
c) Middleware Layer:
• Authentication
• Error handling
• File upload handling (Multer)
Additional Components
Supporting features:
• Utility services (src/utility)
• Date handling
• Encryption
• OTP system
• Logging system
• IP handling
Technical Stack Callouts
Key technologies:
• Node.js/Express
• TypeScript
• MongoDB (assumed from model structure)
• Nginx
• PayPal/SSLCommerz integration
• Email/SMS services
Remember to show the clear separation of concerns between different layers and how the various modules interact while maintaining security through the authentication middleware.