Proper, in-depth architectural breakdown of the RUET Hall Management System, describing the web, admin, backend, and pay modules.
This skill file provides a deep, project-wise architectural map for the RUET Hall Management System monorepo. It details conventions, technologies, database schemas, and folder structures to strictly adhere to during AI coding tasks.
The repository handles both front-office applications (Student Web Portal) and back-office management (Admin Portal) via a centralized backend API and an isolated payment microservice.
web/ (Student Web Portal)@tailwindcss/postcss).@heroui/react) is the predominant component library for layout, data display, and input elements.@radix-ui/react-*) serves as an underlying primitive for certain interactive components.axios for external fetching, sonner for rich toasts, and recharts for statistical graphs.3001.admin/ (Administrative Portal)@radix-ui/react-* components for building highly functional and robust data-management interfaces, alongside lucide-react forms.4001.backend/ (Main API Server)The absolute core of the application. All major data logic occurs here.
auth, halls, dining, admission, inventory, finance).tsx.drizzle-orm).
if there is any change in the schema of db, then the ER_DIAGRAM must be updated accordingly. The ER_DIAGRAM is present in the root of the backend folder.src/modules/<feature>/<feature>.routes.ts: Maps HTTP methods to controllers and binds middlewares.src/modules/<feature>/<feature>.controller.ts: Main logic block (DO NOT write logic in pure SQL; strictly use Drizzle).src/modules/<feature>/<feature>.validators.ts: Zod schemas for body, params, query. Validated with a custom validateRequest middleware.src/db/models/*.ts: Central definition for DB tables and schemas.src/utils/ApiError.ts and src/utils/ApiResponse.ts: Strictly wrap outgoing data in ApiResponse and throw HTTP errors using new ApiError(status, message).users, refreshTokens, hallStudents, hallAdmins. (Multiple role enums: PROVOST, STUDENT, ASST_FINANCE, etc.)mealMenus, mealTokens, mealPayments.rooms, assets, damageReports.studentDues, payments, expenses.seatApplications, seatAllocations.8000.pay/ (Payment Microservice)tsx).8080.The system is heavily containerized.
docker-compose.local.yml: Uses a local MySQL database mapped to 3307 externally, but internally services call 3306.backend via REST. The backend and pay sub-services communicate on the internal docker network (hallnet).When making edits as an AI against this repository, follow these precise rules:
backend/src/db/models/*.ts and be deployed using npx drizzle-kit generate and push inside the backend folder.web/, bias toward HeroUI.admin/, use Radix UI primitives combined carefully with Tailwind CSS v4.try/catch internally if not explicitly necessary; rely on Express 5's async error handling mechanism. Just throw throw new ApiError(StatusCode, Message).validators.ts, bind the schema to the route using validateRequest(schema), and finally implement the Controller relying on the fact that req.body is fully validated.This project context acts as your singular point of truth for maintaining the codebase without polluting it with disjointed patterns or anti-patterns.