The Training Management System API is a powerful tool designed to streamline and automate the process of managing training programs within an organization. It provides a comprehensive set of endpoints that allow developers to integrate and interact with the Training Management System seamlessly.
- User Management: Easily manage user profiles, including creation, modification, and authentication, ensuring secure access to the system.
- Training Management: Efficiently create, update, and retrieve training information, including descriptions, category, courses, trainer.
- Course Management: Efficiently create, update, and retrieve course information, including descriptions, schedules, trainer.
- Enrollment: Enable users to enroll in specific courses, track their progress, and receive notifications for upcoming sessions.
- Progress Tracking: Keep tabs on individual learner progress, track completion rates, and generate insightful reports on training performance.
- Notifications: Automate communication with users by sending notifications about course updates, enrollment confirmations, and upcoming sessions.
- Permissions and Roles: Assign different access levels and roles to users, enabling fine-grained control over the system's functionality.
This API is part of the Minerva project.
To start the API without launching the complete stack, a MySQL database is needed.
To change the database see https://sequelize.org/docs/v6/getting-started/ for the sequelize drivers available. After installation change the dialect in src/models/index.js and config/config.js.
Create an .env file and add the following environment variables and fill accordingly with the database configuration. The rest of the configuration work as it is in development.
API_PORT=3000
DB_SERVER=localhost
DB_ROOT_PASSWORD=localhost
DB_DATABASE=minerva
DB_USERNAME=minerva
DB_PASSWORD=minerva
DB_PORT=3306
JWT_SECRET=d7a481461577ba4c3c4c6946cca7204b
JWT_EXPIRE=1d
JWT_ISSUER=minerva
JWT_AUDIENCE=web-minerva
OPENAI_API_KEY=d7a481461577ba4c3c4c6946cca7204bStart the application in watch mode
npm run star:devRun the migrations
npm run migrate:upRoll back migrations
npm run migrate:undoCreate seed
npx sequelize-cli seed:generate --name demo-userRunning the seeds
npm run seed:allRoll back seeding
npm run seed:undoBuild the image.
docker build . -t alexandrelamberty/minerva-api:tagRun the image with the default network and storage.
// FIXME: add storage reference from stack
docker run -p 3000:3000 --network=minerva_default --mount source=media_data,target=/usr/src/app/public --env-file .env.dev --name minerva-api -d alexandrelamberty/minerva-api:tagPush image to DockerHub
docker push alexandrelamberty/minerva-api:tag- https://expressjs.com/
- https://nodejs.org/
- https://github.com/ranisalt/node-argon2
- https://sequelize.org/docs/v6/
- https://sequelize.org/docs/v6/other-topics/migrations/
- https://developers.google.com/books/docs/viewer/developers_guide
- https://medium.com/@jsmney/a-more-in-depth-look-at-sequelizes-magic-methods-428928c70d58
- https://medium.com/@jsmney/a-more-in-depth-look-at-sequelizes-magic-methods-428928c70d58
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Status