Overview
It's an API of simple profile to CRUD profile user based on Echo framework.
How to run it
-
Run the application using the command in the terminal:
make run-app
-
Browse to localhost:7788/swagger/index.html.
-
To get access to all feature product, you need to regist and login the account.
-
After the login, copy a token from the response, then click "Authorize", enter the value for "apiKey" in a form: "Bearer {token}". For example:
Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTYzNTU4NDMwNiwiZXhwIjoxNjM1NTg3OTA2fQ.s5hFizdpccvA6cM6p--RhiD81qUpn_typ3LwAJgPbVU
What's feature of this project:
- Registration
- Authentication with JWT
- CRUD API for profile
- Migrations
- Swagger docs
- Docker development environment
Tech Stack
- Language: Go
- Framework: Echo
- Authentication: jwt-Go
- Database: MySQL
- ORM: GORM
- Migration: Go-mirations
- Mock: Mocking db
- API Docs: Swagger
- Container: Docker
Architecture Overview
The architecture is heavily influenced by the Clean Architecture and Hexagonal Architecture. Clean Architecture is an architecture where the business rules can be tested without the UI, database, web server, or any external element.