How souvik9205/eventsync works
Main Components
• Frontend Application: Located under apps/frontend, this Next.js app handles user interactions including authentication, event registration, attendance tracking, QR code scanning, and real-time event updates. It includes a well-organized directory structure for pages, components (modals, navigation bars, forms, etc.), hooks, helpers, and UI components.
• Backend Application: Found in apps/server, it implements the REST API endpoints that power user authentication, event management, attendance verification, OTP verification, scanning, and email notifications. Its structure is modular, separated into controllers, routers, services (business logic), and utilities (for token generation, email sending, and Prisma database connectivity).
• Database/Persistence Layer: Managed via Prisma (prisma/schema.prisma and migration files). This layer is responsible for storing events, user details, attendance records, and more.
• External Services: The application integrates with external services such as Google Calendar for scheduling, email services for OTP verification and confirmation emails, and likely an external QR code service for ticket validation.
Relationships and Interactions
• The Frontend communicates with the Backend through RESTful API endpoints. For instance, user authentication calls the authController via authRouter, and event actions interface with the eventController.
• The Backend, in turn, interfaces directly with the Database using Prisma (via the PrismaClient in apps/server/src/utils/PrismaClient.ts) for data persistence.
• The Backend also handles interactions with external services (email and QR code generation/verification integrations).
• Shared packages (like the UI components and ESLint/TS configurations) are used across both the frontend and potentially by parts of the backend to ensure consistency and reusability.
Architectural Patterns and Design Principles
• Separation of Concerns: Clearly separated frontend and backend domains, each with well-organized submodules (controllers, services, routers on the backend; pages, components, hooks on the frontend).
• MVC (or a similar layered approach) in the backend, where controllers handle request routing, services encapsulate business logic, and models (via Prisma) manage data.
• Component-based design in the frontend, with reusable components, hooks, and utilities.
• Monorepo Structure: Enables sharing of configuration and component libraries; this promotes code reuse and standardizes practices across the different modules of the project.
• Expand the Frontend to show structures such as the authentication modules, event lifecycle pages (creation, admin, user’s view, attendance), and shared UI components from the packages.
• On the side, denote external services integrations (Google Calendar, external email service) that support additional functionalities.
• Finally, include a section for shared configurations under the packages directory.