Skip to content

alexandrelamberty/minerva-api

Repository files navigation

Build DockerHub Linting Formatting

Minerva - Training Management System API

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.

Key Features

  • 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.

Usage

This API is part of the Minerva project.

Development

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=d7a481461577ba4c3c4c6946cca7204b

Start the application in watch mode

npm run star:dev

Migrations

Run the migrations

npm run migrate:up

Roll back migrations

npm run migrate:undo

Seeds

Create seed

npx sequelize-cli seed:generate --name demo-user

Running the seeds

npm run seed:all

Roll back seeding

npm run seed:undo

Tests

Documentation

Docker

Build the image.

docker build . -t alexandrelamberty/minerva-api:tag

Run 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:tag

Push image to DockerHub

docker push alexandrelamberty/minerva-api:tag

References

About

📚 Training Management System API. Full Stack Web Developer training @ https://technofuturtic.be.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published