I'm Commander Shepard, and This Is My Favorite 'Banking App Service' on the Citadel
🔍 Tested with - TBA.
📝 Documentation - TBA.
🎵 Songs to test by - playlist.
These instructions will give you a copy of the project up and running on your local machine for development and testing purposes.
Requirements for the software and other tools to run and test
- Go
- PostgreSQL
- golang-migrate
- k6 - to test
For monitoring system:
- Docker
- docker-compose - for orchestration
- Prometeus
- Grafana
Note that we use AWS S3 service to upload image, setup your own S3 bucket if you want to test uploading image.
After setting up your database locally, run this to migrate our database structure
$ migrate -source file://path/to/migrations -database postgres://localhost:5432/database up 2
A step by step series of that tell you how to get a development environment running
Create file named .env and fill it with, example:
DB_URL = 'host=host.docker.internal port=5432 user=your-username password=your-password dbname=paimon-bank sslmode=disable'
DB_HOST = host.docker.internal
DB_PORT = 5432
DB_USERNAME = ${DB_USERNAME}
DB_PASSWORD = ${DB_PASSWORD}
DB_NAME = paimon-bank
DB_PARAMS = '&sslmode=disable'
BCRYPT_SALT = 12
JWT_SECRET = ${JWT_SECRET}
S3_ID = ${S3_ID}
S3_SECRET_KEY = ${S3_SECRET_KEY}
S3_BUCKET_NAME = ${S3_BUCKET_NAME}
S3_REGION = ${S3_REGION}
ENV = development
Run the service
$ docker-compose up -d
Now you can run the service.
Service is running on port 8080
.
Prometheus is running on port 9090
.
Grafana is running on port 3000
.
Main service running on port 8080
.
- User
- Register -
POST /v1/user/register
- Login -
POST /v1/user/login
- Register -
- Balance
- Add -
POST /v1/balance
- List -
GET /v1/balance
- History -
GET /v1/balance/history
- Add -
- Transaction
- Create -
POST /v1/transaction
- Create -
- Image
- Upload -
POST /v1/image
- Upload -
- Prometheus
- Metrics -
/metrics
- Health -
/healthz
- Metrics -
Open the now available grafana dashboard http://localhost:3000/dashboards.
TBA.
The Citadel Corp team:
This project is licensed under the MIT License - see the LICENSE file for details
- The Ramadhan ProjectSprint organizer and members