Skip to content

NadChel/em-services

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

EM Services

A demo project consisting of 4 services managing users and cards.

Getting started

  1. Clone. Be sure Git is installed.
git clone https://github.com/NadChel/em-services
  1. Navigate to the project root.
cd em-services
  1. Run docker-compose.yml. Docker Engine should be running (on Windows, you can open Docker Desktop).
docker-compose up
  1. Once the services are up, open their UI pages and visit the endpoints. By default, UI is exposed at localhost:<port>/swagger-ui.html.

Composition

Service Description Default port GH DH
migration-service Initializes the DB on start-up and exits. N/A link link
token-service Performs user login, issuing signed JWTs. 8080 link link
user-service Manages users: selects, saves, deletes. 8090 link link
card-service Manages cards: selects, saves, status updates. Also, deposits and transfers. 8100 link link
db PostgreSQL database. 5432 N/A link

Notes

  • All business endpoints, except /login, require authentication. Once you've successfully logged in via the token-service and got a JWT string, click the Authorize button in a service's UI and paste it in the Value field.
  • */admin/** endpoints require ADMIN privileges.
  • The root admin, if absent, is created automatically on user-service start-up (admin:admin by default). It's the only user that exists in the database on the first run.
  • If you want to run it in your IDE (not with docker-compose), be sure to include an .env file in the card-service root. The file must specify APP_ENCRYPTION_PASSWORD and APP_ENCRYPTION_SALT (hexadecimal strings). .env is purposefully excluded from Git.

About

Demo project consisting of 4 services managing users and cards

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors