How sathish126/production_50 works
Project type and purpose
• This is a full-stack event management web application.
• Frontend: React + TypeScript SPA, built with Vite, styled via Tailwind/PostCSS.
• Backend: Node.js/Express API that handles user authentication, event registration, OTP, payments, QR code generation, email notifications.
• Data stores: MongoDB for persistent data, Redis for caching/rate-limiting/OTP.
• External integrations: e-mail provider (SMTP or third-party), payment gateway (Stripe/PayPal), QR-code service.
File structure
Top-level
• index.html, src/, package.json, vite.config.ts, tailwind.config.js → React SPA
• server/ → Express API project
server/
• config/ (database connections: mongodb.js, redis.js)
• middleware/ (auth.js, rateLimiter.js, validation.js)
• models/ (Event, User, Registration, OTP)
• routes/ (auth.js, events.js)
• services/ (emailService, paymentService, qrService)
• templates/ (HTML for transactional emails)
• scripts/ (migrations, seeding, setup, testing)
• server.js (application entry point)
src/
• main.tsx, App.tsx → entry and root component
• context/ (AuthContext, EventContext)
• components/ (UI primitives & layout)
• pages/ (Home, Dashboard, Events, Workshops, Admin, Login, Register, Contact, About)
README
• Rely on file tree and conventional naming to infer responsibilities.
Detailed capture of essential architecture
• Client initialization → React Router loads pages → AuthContext checks token → calls Express /auth or /events.
• Express server reads .env → connects to MongoDB & Redis → routes hit middleware → controllers call services.
• On registration: paymentService.charge() → payment gateway → webhook → registration.persist() → emailService.sendConfirmation() → qrService.generate() → user receives QR + email.
• On high throughput: rateLimiter uses Redis → ensures throttle.