Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upd(docs): readme proj + backend #68

Merged
merged 3 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
# Train platform

Проект по разработке веб-приложения для организации тренировочных курсов с элементами геймификации.

Процесс командной разработки можно отследить на [канбан доске.](https://github.com/orgs/TeamHSE/projects/1/views/1)

# Quick start

Запуск проекта:
- backend: [http://localhost:3000](http://localhost:3000)
- frontend: [http://localhost:3001](http://localhost:3001)
1. Run ```docker compose up -d```
2. Application is available at:
- backend: [http://localhost:3000](http://localhost:3000/)
- frontend: [http://localhost:3001](http://localhost:3001/)


# About

- [API DOCS](https://github.com/TeamHSE/train-platform/wiki/Endpoints)
- [Development Agreement](https://github.com/TeamHSE/train-platform/wiki/Dev-Experience)
- [Buisness model](https://github.com/TeamHSE/train-platform/wiki/Business-model)
- [UI](https://www.figma.com/file/K5YbaVEbehlOig6ZWo1Mft/HSE-Project?type=design&node-id=0%3A1&mode=design&t=ecU1TQEZhG9LRVbk-1)

# Technical report

```
docker-compose up --build
```
- [Frontend](https://github.com/TeamHSE/train-platform/blob/develop/frontend/README.md)
- [Backend](https://github.com/TeamHSE/train-platform/blob/develop/backend/README.md)
46 changes: 40 additions & 6 deletions backend/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,44 @@
# Как отпарвить изменения в репозиторий
# About

- Отформатировать код
- Запустить линтер
- Исправить замечания линтера
- Запустить тесты
- Комит и пуш в репозиторий
Backend WEB API application using:
- Express
- Typescript
- Postgres
- TypeORM
- pnpm

# Quick start
### Local
1. Install dependencies
```pnpm i```
- Install postgres:
- add to [config](./src/config/Config.ts) connection params
AleksanderNekr marked this conversation as resolved.
Show resolved Hide resolved
- set param at [db.ts DataSource](./src/db.ts)
```synchronize: true```

- Generate RSA keys for JWT authentication _(terminal / git bash script below)_
```
mkdir -p src/config \
&& openssl genpkey -algorithm RSA -out src/config/private.pem -pkeyopt rsa_keygen_bits:2048 \
AleksanderNekr marked this conversation as resolved.
Show resolved Hide resolved
&& openssl rsa -pubout -in src/config/private.pem -out src/config/public.pem \
&& chmod 644 src/config/private.pem src/config/public.pem \
```
2. Start backend:
- Production ready:
disk0Dancer marked this conversation as resolved.
Show resolved Hide resolved
```pnpm start```
- Development with hot reloading by Nodemon:
```pnpm dev```
3. Listen [localhost:3000/](http://localhost:3000/)


# Contribution

- Reformat code
- Lint
- fix linter issues
- Test
- Commit and push branch
- Create PR and ask review

```
npm prettify
Expand Down
Loading