032026

Corelab

e-learning platform

A platform for learning development, with courses and multiple-choice exams, built as a team with an Express API and a MongoDB database. My part covers the data models and the routes: JWT authentication, role-based access control, and the CRUD for courses, lessons, quizzes and results.

  • Data models and API routes
  • JWT authentication and role-based access control
  • CRUD for courses, lessons, quizzes and results

The approach

The need

Corelab is a platform for learning development: courses to follow, multiple-choice exams to check what has been learned, and an administration area to manage them.

My part

It is a team project, and I took care of the server: the data models and the routes.

Key decisions

The models set the shape of everything else: user, course, lesson, quiz, result, notification. Written with Mongoose, they decide what a student owns, what a course contains, and what a quiz is: a series of multiple-choice questions, each with its right answer, and a threshold above which the exam is passed. A route cannot make up for a badly designed model.

How it runs

The routes follow: the CRUD for courses, lessons and quizzes, saving results, a student’s progress, comparing a score with the pass mark, scheduling a lesson for a date, importing users with passwords generated through bcrypt, and a password chosen at first login. Access goes through a middleware that checks the JWT and then the role, and the login form is validated by Zod before it reaches anything.