A Go API for dating app.
This project uses the following tech stacks:
- Go 1.23
- PostgreSQL 16
- User registration and login
- User matcher/recommendation, with pass/like functionality
- Subscriptions for extra features and boosts
/ci
- Files related to deployment and continuous integration/cmd
- Entry pointmain.go
of the API./db
- SQL files for database, including migrations and seeds./internal
- Internal code for the API:/appconstant
- Constant values for business logics./apperror
- Structured error structs for expected app errors./config
- Configurations and settings for the app. ENV vars are loaded here./delivery/http
- Code for handling requests and processing responses./entity
- Base struct for business entities, directly mapped from database./mapper
- Functions for mapping entities to response models./model
- Base model for responses./provider
- Functions for instantiating handler, service, repository, and utils structs/repository
- Structs for interacting with database, current implementation uses Gorm./service
- Main app code for business logic./util
- Utility functions and helpers.
/tests
- Go test files.
For local development:
-
Copy and set env variables
cp .env.example .env
-
Run migrations and seeds (if needed) using SQL files at
/db
-
Run the app
go run cmd/app/main.go
Or simply use Docker:
docker build -f ci/Dockerfile -t go-mate . && docker run -d --name go-mate go-mate
API documentation can be accessed here: Postman docs