This project is based on the management of data related to real-time student engagement measurement. It handles user login and real-time data registration that students send during a class session.
- Fork this project to your personal space.
- Clone the repository from your personal space to your computer.
- Create the dev.env file in the root of the project based on the .env.example file and fill in all the fields.
- Install dependencies using the
npm install
command. - Start MongoDB with Docker using the command, or whenever you need to deploy the development environment, run
docker-compose up -d mongodb
. - Load initial data with the
npm run seed:random
command. - Check the development environment with the
npm run dev
command. - Test endpoints with Postman or Insomnia.
We base the project's architecture on CLEAN ARCHITECTURE.
└── Frameworks, Web: Frontend en Angular
├── Controllers: routes, middlewares
├─── Use Cases: services
├─── Entities: entities
- Entities: Enterprise Business Rules. Core entities of our business. Example: Poll, Question, User, etc.
- Use Cases: Application Business Rules. All logic related to the business.
- Controllers: Interface Adapters. They provide access.
- Web: Frameworks and Drivers.
This layered architecture follows this schema:
Controllers (Routes, Middlewares) <-> Services <-> Libs(Models)
- Controllers access the services layer.
-
Services use libraries.
-
Libraries are responsible for interacting with the entities layer.
-
Libraries interact with other data sources: external API or database.
The middleware flow is as follows: Request -> Middlewares -> Response
- User: Collection of users.
- Poll: Collection of surveys.
- Question: Collection of survey questions.
- Record-Activity: Collection of activities that the user performs during the class.
- Room: Collection of rooms created for users.
The project already comes with a default configuration as follows:
.
├── README.md
├── dataset
├── docker-compose.yml
├── makefile
├── node_modules
├── package-lock.json
├── package.json
├── scripts
└── src
├── app.js
├── index.js
├── config
├── database
├── dtos
├── helpers
├── middlewares
├── routes
├── services
└── socketio
- The
npm run start
command starts the Node server in production mode. - The
npm run dev
command starts a server with live reload. - The
npm run seed:random
command runs an initial load of random data.
This project is released under the MIT License.