This is a RESTful API of E-Wallet project. This project was built with golang, postgreSQL, and JWT authentication and implement clean architecture.
- General Features
- Authentication and Authorization
- List of Transactions
- Top Up
- Transfer
- User Details
- Database SQL
- Unit Testing
- API documentation
Make Sure you have installed postgreSQL, Docker, and Make
Here is the steps to run it with docker
#move to directory
$ cd workspace
# Clone the project
$ git clone https://git.garena.com/sea-labs-id/batch-02/aulia-nabil/assignment-05-golang-backend.git
#move to project
$ cd assignment-05-golang-backend
# Create the database and running the seeder
$ make db
# setup .env file
$ cp env.example .env
# Build the docker image first
$ make image
# Run the application
$ make run
# check if the containers are running
$ docker ps
# Stop
$ make stop
$ make dev
$ make test
[
{
"email": "[email protected]",
"password": "12345",
},
{
"email": "[email protected]",
"password": "12345",
},
{
"email": "[email protected]",
"password": "12345",
},
{
"email": "[email protected]",
"password": "12345",
},
{
"email": "[email protected]",
"password": "12345",
},
]
In this project, I use some tools listed below. But you can use any simmilar library that have the same purposes. But, well, different library will have different implementation type.
- All libraries listed in
go.mod
- "github.com/vektra/mockery". To Generate Mocks for testing needs.
- "github.com/swagger-api/swagger-ui". To Make API Documentation