ec2-44-203-163-253.compute-1.amazonaws.com:9191
This is a simple REST API for a simple dating application like Tinder / Bumble. This application is built using Go and PostgreSQL. This application has the following features:
- User registration
- User login
- User profile
- Make reaction to other user
- Memberships (free, premium and gold) with different features
make sure you have installed the following tools:
- Install Go - 1.22.0
- Install Docker - 4.27.2
- Install Docker Compose
- make sure your OS support to run Makefile
- install Dbmate for database migration
- Clone this repository;
- Open terminal and navigate to the project folder;
- after install
Dbmate, run docker database by runningmake run-db, and wait until the database is up; - Run
make migrate-db-upto migrate database; - Run
make run-appto run the application;
if you don't want to use Dbmate, you can manually the query in
migrationsfolder into your database UI.also if you run the test, you can run
make testto run the test.
The code structure is divided into several packages. Each package has its own responsibility. The following is the code structure:
migrationsfolder contains the database migration filesapppackage contains the main application codemodelspackage contains the models for the applicationpkgpackage contains the common packages for the application such as driver,middleware, mapper json, and util.driverpackage contains the database driver / connector for database connectionmiddlewarepackage contains the middleware for the applicationutilpackage contains the utility for the application
servicespackage contains the services for the applicationhandlerpackage contains the handler http for the applicationrepositorypackage contains the repository for the application for managing the databaseusecasepackage contains the logic for the applicationschemapackage contains the schema for the application, such as request and response
Makefilecontains the commands to run the applicationtinder-cloning.postman_collection.jsoncontains the API documentationDockerfilecontains the Dockerfile for the applicationdocker-compose.ymlcontains the Docker Compose filego.modandgo.sumcontains the Go module filesmain.gocontains the main application fileREADME.mdcontains the documentation.envcontains the environment variables.gitignorecontains the files and folders to be ignored by Git
You can use POSTMAN to test the API. The API documentation can be found on this root folder with the name tinder-cloning.postman_collection.json

