How uoawdcc/uabc-portal works
Main Components
• Frontend Component:
• Next.js “app” layer found in src/app. Break this into sub-components such as authentication pages, booking flows, session selection, onboarding, and the admin interface.
• UI components from src/components (including specialized sub-directories like auth, admin, booking, payment, and UI primitives).
• That Storybook stories (in .storybook and src/stories) support component development.
• Backend API:
• That these endpoints use Next.js server routes and are responsible for business logic, handling registration, session generation, payments, and email confirmation.
• Database and Data Layer:
• Database interaction layer: files under src/lib/db (schema, relations, seed, and index) and configuration files (drizzle.config.ts). This suggests use of an ORM-like tool (Drizzle) for managing database interactions.
• Background Tasks / Cron Jobs:
• A block for scheduled tasks found in the “cron” directory and the API’s “cron” endpoints. These are likely used to generate sessions and trigger time-based events.
• External Services and Email Integration:
• An external email service component given the email templates in src/emails (for confirmations, forgot password, member onboarding, etc.).
• Potential payment integrations using components found in src/components/payment and services in src/services.
• Testing & CI/CD Pipeline:
• Testing frameworks like Jest and Playwright (located within src/tests and playwright directories). Although these aren’t part of the production runtime, they are critical to quality assurance.
Relationships and Interactions
• Clear connections between the Frontend and the Backend API via HTTP REST endpoints.
• How Authentication flows occur through the API (using NextAuth in src/app/api/auth).
• Cron Jobs periodically triggering API endpoints that perform scheduled actions.
• Testing pipelines and deployment processes as parts of the overall system lifecycle.
Architectural Patterns & Design Principles
• RESTful Service Design: The API routes are organized into resource-based endpoints (e.g., auth, users, bookings, schedules).
• Modular Component Design: Both UI components and functional modules (services, hooks, utilities) are organized in a modular directory structure.
• Infrastructure as Code: Represent CI/CD (GitHub workflows, Docker, and Fly.io configurations) that supports automated testing and deployment.
Technologies and Tools
• Next.js and React (pages in src/app and components in src/components).
• Typescript for type safety (as seen from tsconfig.json and .ts files throughout the project).
• Drizzle ORM (indicated by drizzle.config.ts and the database schema & seed scripts).
• Testing tools: Jest, Playwright, and Storybook.
• Tailwind CSS for styling (tailwind.config.ts and postcss.config.js).
• GitHub Actions for CI/CD (under .github/workflows) and Docker/Fly.io for containerization and deployment.