https://github.com/open-dating/od-backend
Backend for app
https://github.com/open-dating/od-backend
dating nestjs postgresql rest-api typeorm
Last synced: 4 months ago
JSON representation
Backend for app
- Host: GitHub
- URL: https://github.com/open-dating/od-backend
- Owner: open-dating
- License: gpl-3.0
- Created: 2020-02-14T17:32:18.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-12T01:45:04.000Z (about 3 years ago)
- Last Synced: 2023-03-07T20:29:39.250Z (almost 3 years ago)
- Topics: dating, nestjs, postgresql, rest-api, typeorm
- Language: TypeScript
- Homepage: https://app.open-dating.org/api/v1/doc/
- Size: 4.86 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## od-backend
[](https://hub.docker.com/repository/docker/opendating/od-backend/tags)

[](https://codecov.io/gh/open-dating/od-backend)
[](https://deepscan.io/dashboard#view=project&tid=2754&pid=9569&bid=126329)

Open Dating is open source project like Tinder and others similar service, with lot of differents.
More info on project site: https://open-dating.org/
Available api endpoints: https://app.open-dating.org/api/v1/doc/
### Development
Install deps:
```bash
# install docker and docker compose
# docker - https://docs.docker.com/install/
# docker compose - https://docs.docker.com/compose/install/
# npm and nodejs - https://nodejs.org/en/
```
Init envs:
Create .env and copy all from .env.example
Run:
```bash
# install deps
npm i
# run docker with pg and dnn services
npm run docker:dev
# run migration and after it run nest app
npm run start:migrate-n-dev
```
Autogenerate new migration if you change enityties:
```bash
npm run typeorm:generate MigartionName
```
If you need fcm push functional, get fsm file form google and save in root as fcm.json
#### Seeding
When you first run, you can view in console admin login/pass as:
```
[Admin] Created admin user: {"email":"admin@localhost.loc","pass":"BCKUPE"}
```
You can use what cred for login via swagger: http://localhost:4300/api/v1/doc/
by auth/login method, after login get jwt.accessToken and autorize in swagger and now you can use all admin endpoints
which include seeding and etc.
### Test
Executed on localy instance
```bash
npm run test
```
Run in testing suite(with all migrations and etc):
```bash
# start testing containers
npm run docker:test
# run test
npm run docker:exec:test
```
### Production
Set up values in .env as .env.example-prod and run
```bash
docker volume create --name=od-postgres
docker-compose -f docker-compose.prod.yml up -d --build
```
## Roadmap
* [x] connect to sentry
* [x] calc dnn and distance is user profile
* [ ] add donation emails
* [x] edit more user profile fields
* [ ] check for lang typos
* [ ] add support more algo in users search
* [ ] write more tests
* [ ] add multilang support
* [ ] run on prod without docker-compose and .env files