repository
0.0.0-20250218155246-c7c365ab6f9a
Repository: https://github.com/mochaeng/sapphire-backend.git
Documentation: pkg.go.dev
# README
Sapphire-backend
Golang backend for a social media application.
Key features
- Clean Architecture: organized with layers (HTTP handler -> service -> store)
- Redis caching
- Automated API documentation with Swagger
- Email notification to new users confirm account creation
- Integration and unit tests with Testcontainers
- Rate limiter to protect the application from excessive requests
Technologies used
- Postgres for database
- Redis for caching
- Chi for routing
- JWT for authentication
- Swagger for API documentation
- Zap for logging
- Go-mail for e-mail sending
- Testify for mocks and unit tests
- Testcontainers for unit and integration tests
Dependencies
To run this application locally you need to have:
- Docker
- Air: go live-reloading tool
Running
- Start database:
docker compose up --build
- Seed the database:
go run cmd/seed/main.go
- Start application with air (need to be installed as a CLI)
air
Docs
After the application starts, the documentation is available at /v1/swagger/index.html