Skip to content

rdobrynin/cm

Repository files navigation

Installation

Running the app

$ docker-compose up

API Swagger Url

$ http://localhost:3888/api/docs/

Access to PG_ADMIN

# username
$ [email protected]

# password
$ admin

# url
$ http://localhost:5050/

Access to container

# docker exec -it <container_name> sh

Access to POSTGRE_SQL

# user
$ admin

# password
$ secret

# DB
$ postgres

# port
$ 5432

# url
$ postgres

how create user

Goal

Demonstrate below skills:

  • dockerization with nginx for proxy
  • backend part implemented with typescript
  • use concurrency, race condition
  • use postgreSQL and i/o data with DTOs
  • use typeOrm and configs
  • implement third-party service talking heads in separate module
  • how implement tests - added for User Service, you can see in (user-controller.spec.ts)
  • frontend part implemented with svelte and js
  • for frontend part for login used store
  • for getting data from third-party service for specific user using promise async await on FE
# access to urls

# api backend
$ http://localhost:3888/

# api backend swagger
$ http://localhost:3888/api/docs

# pg-admin
$ http://localhost:5050/

# svelte front-end part
$ http://localhost:3001/

How check flow

Didn't implement for FE part sign-up, just login. To create user just open swagger doc and create user or use curl

# curl
curl -X 'POST' \
  'http://localhost:3888/user' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "email": "[email protected]",
  "password": "qwerty"
}'

how create user

First run

docker-compose up
  1. Login
  2. After the logging store saved and redirect to after login section (didn't implement localStorage or sessionStorage - to keep auth data), just for SPA.
  3. click introduce
  4. see video with auth id user, firstName added like argument to backend
  5. additionally added endpoint for history (see swagger head endpoint), where can fetch all videos which has been played for specific user

Logical Flow Diagram

LFDF table with a list of videos

Get url from third-party-service

fetch data from cm api

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published