|
1 |
| -<p align="center"> |
2 |
| - <a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="200" alt="Nest Logo" /></a> |
3 |
| -</p> |
4 |
| - |
5 |
| -[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456 |
6 |
| -[circleci-url]: https://circleci.com/gh/nestjs/nest |
| 1 | +## Description |
| 2 | +This is the LessonsQueue project's API repository. The project is being developed to facilitate the process of passing laboratory work by university students. |
| 3 | +This API provides students with the ability to efficiently manage their lab assignment queue. |
| 4 | +The application provides the ability to create the queue, add students to the queue, move and remove them from it, as well as mark the completion of tasks, etc... |
7 | 5 |
|
8 |
| - <p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p> |
9 |
| - <p align="center"> |
10 |
| -<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a> |
11 |
| -<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a> |
12 |
| -<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a> |
13 |
| -<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a> |
14 |
| -<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a> |
15 |
| -<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a> |
16 |
| -<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a> |
17 |
| -<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a> |
18 |
| - <a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a> |
19 |
| - <a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a> |
20 |
| - <a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a> |
21 |
| -</p> |
22 |
| - <!--[](https://opencollective.com/nest#backer) |
23 |
| - [](https://opencollective.com/nest#sponsor)--> |
| 6 | +**Our tech stack**: Nest.js and Prisma (with PostgreSQL as DBMS) |
24 | 7 |
|
25 |
| -## Description |
| 8 | +**Design Document**: For more understanding of this project you can visit our [Design Document](https://docs.google.com/document/d/1VQChDcqtpMh4TreQL61J6O9NR8FkwoBUx1zo6jvGuPg/edit) |
26 | 9 |
|
27 |
| -[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository. |
| 10 | +## Our developers |
| 11 | +This project is being made by: |
| 12 | +* [Danyil Tymofeiev](https://github.com/SharpDevOps10) |
| 13 | +* [Bogdan Yarmolka](https://github.com/thebladehit) |
| 14 | +* [Anton Dovzhenko](https://github.com/KobbAsa) |
| 15 | +* [Nazarii Radichenko](https://github.com/radichenko) |
28 | 16 |
|
29 | 17 | ## Installation
|
| 18 | +* First and foremost, you need to make sure that you have installed [Node.js](https://nodejs.org/en) |
30 | 19 |
|
| 20 | +* After that, you have to clone this repository and enter the working folder: |
| 21 | +```bash |
| 22 | +$ git clone https://github.com/LessonsQueue/QueueManagerApi.git |
| 23 | +$ cd QueueManagerApi |
| 24 | +``` |
| 25 | +* Then you have to install the dependencies for this project: |
31 | 26 | ```bash
|
32 | 27 | $ npm install
|
33 | 28 | ```
|
34 | 29 |
|
35 | 30 | ## Running the app
|
36 |
| - |
| 31 | +In order to run this project you have to write one of these commands: |
| 32 | +* In development mode: |
37 | 33 | ```bash
|
38 | 34 | # development
|
39 | 35 | $ npm run start
|
40 |
| - |
| 36 | +``` |
| 37 | +* In watch mode: |
| 38 | +```bash |
41 | 39 | # watch mode
|
42 | 40 | $ npm run start:dev
|
43 |
| - |
| 41 | +``` |
| 42 | +* In production mode: |
| 43 | +```bash |
44 | 44 | # production mode
|
45 | 45 | $ npm run start:prod
|
46 | 46 | ```
|
47 |
| - |
48 |
| -## Test |
49 |
| - |
| 47 | +## Tests |
| 48 | +The tests are located in the same folder as the `services` and are marked as `.spec.ts`. If you want to run our tests locally, you should: |
| 49 | +* Start PostgreSQL Database for testing using [docker compose](https://docs.docker.com/compose/install/): |
50 | 50 | ```bash
|
51 |
| -# unit tests |
52 |
| -$ npm run test |
53 |
| - |
54 |
| -# e2e tests |
55 |
| -$ npm run test:e2e |
56 |
| - |
57 |
| -# test coverage |
58 |
| -$ npm run test:cov |
| 51 | +$ docker-compose up |
| 52 | +``` |
| 53 | +* Apply all migrations to your testing Database: |
| 54 | +```bash |
| 55 | +$ npm run test:migrate |
| 56 | +``` |
| 57 | +* And run all integration tests: |
| 58 | +```bash |
| 59 | +$ npm run test:integration |
59 | 60 | ```
|
60 | 61 |
|
61 |
| -## Support |
62 |
| - |
63 |
| -Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support). |
64 |
| - |
65 |
| -## Stay in touch |
| 62 | +## Building |
| 63 | +If you want to build our project you have to write this command: |
| 64 | +```bash |
| 65 | +$ npm run build |
| 66 | +``` |
| 67 | +Or you can use our [Dockerfile](https://github.com/LessonsQueue/QueueManagerApi/blob/main/Dockerfile) to build the project (how to build the image of our app, visit the `Dockerization` sections of README) |
66 | 68 |
|
67 |
| -- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com) |
68 |
| -- Website - [https://nestjs.com](https://nestjs.com/) |
69 |
| -- Twitter - [@nestframework](https://twitter.com/nestframework) |
| 69 | +## Migrations |
| 70 | +If you want to use our logic you have to use your prepared Database (with PostgreSQL as DBMS) and add it to your `.env`. |
| 71 | +You can see the example of your `.env` file here [.env.example](https://github.com/LessonsQueue/QueueManagerApi/blob/main/.env.example). |
| 72 | +Afterwards, you should apply all migrations to your Database: |
| 73 | +```bash |
| 74 | +$ npx prisma migrate dev |
| 75 | +``` |
70 | 76 |
|
71 |
| -## License |
| 77 | +## Continuous Integration |
| 78 | +We have also added CI using `GitHub Actions` (located in `.github` folder) for checking the build and running integration tests. |
| 79 | +Here you can find our [All Workflows](https://github.com/LessonsQueue/QueueManagerApi/actions) |
72 | 80 |
|
73 |
| -Nest is [MIT licensed](LICENSE). |
| 81 | +## Dockerization |
| 82 | +If you want to build our image, you should write these commands: |
| 83 | +```bash |
| 84 | +$ sudo docker build -t nest:latest . |
| 85 | +``` |
| 86 | +After that: |
| 87 | +```bash |
| 88 | +$ sudo docker run -p 3000:3000 --env-file .env nest:latest |
| 89 | +``` |
0 commit comments