Halaqti – LMS For Halaqat
What is Halaqti ?
Halaqti is a learning management system dedicated to Halaqat instructors and students. It allows instructors to keep track of their students progress, take attendance, and conduct online sessions. It also offers students great tools to monitor their progress, attendance, and recieve updates from instructors.
Architectural Decisions
Interactivity is crucial for this type of project, which is why I was deliberate with my tech stack: I use Next.js for the frontend and Express.js for the backend. I also implemented robust JWT-based authentication; even with SSO, a JWT is returned upon successful validation.
Backend
The backend was the first component built. I implemented a decoupled API architecture utilizing a Controller-Service-Model structure.
For security, all user passwords are hashed, and I implemented an OTP strategy for password reset requests.
I also use TypeScript instead of JavaScript.
Database
For the database layer, I implemented MongoDB paired with Mongoose as the Object-Document Mapper (ODM). This specific combination provided a strategic balance: it allowed me to leverage MongoDB’s inherent document flexibility to rapidly iterate on complex data structures, while relying on Mongoose to enforce strict schema validation and data integrity at the application level.
Role-Based Access Control (RBAC)
This is where the stakes get high. Because the backend must serve two distinct, decoupled user interfaces—an instructor dashboard and a student dashboard—I implemented a robust middleware layer to act as the primary security checkpoint. By injecting custom authorization functions directly into the route endpoints, the system strictly enforces that only the appropriate user roles can access specific paths.
This created a massive advantage downstream. Because the middleware handles all access control, the Service layer receives inherently trusted, sanitized data. This enforces a strict “if it made it here, it belongs here” philosophy, completely eliminating the need for redundant database queries and identity validation within the core business logic.
Payment Integration
I used Polar.sh to do the heavy work of payment integration to some of platform features such as Live Sessions, SMS Notifications, Priority Support, and access to exclusive Halaqti Academy content.
Frontend
The UI components are built primarily with TailwindCSS + Custom CSS styling. Also I use TypeScript instead of JavaScript.
Sources
The Platform: https://www.halaqti.com/
JWT-Based Authentication: https://www.descope.com/blog/post/basic-vs-jwt