This project provides a simple HTTP API for processing donations. It is written in Go and uses PostgreSQL for persistence. A complete development environment is available via Docker Compose, which also spins up a MinIO instance for file storage.
Copy the sample environment file and adjust values if needed:
cp .env.example .envThe application uses godotenv so variables from the .env file are loaded automatically when the server starts.
Make sure Docker and Docker Compose are installed. Run the following command to start the services defined in compose.local.yml (PostgreSQL, migrator, server, pgweb and MinIO):
docker compose -f compose.local.yml up --buildAlternatively you can use compose.dev.yml which behaves similarly but loads variables from .env.
Once the containers are running the API will be available at http://localhost:8000/api/v1.
Interactive Swagger documentation is generated from the docs folder. After the server is up open:
http://localhost:8000/api/v1/swagger/index.html
Use the credentials defined by HTTP_SERVER_SWAGGER_USER and HTTP_SERVER_SWAGGER_PASSWORD if authentication is enabled.
An Entity–Relationship (ER) diagram of the database schema is included in er.png. It illustrates the tables created by the migrations under the migrations directory.
This project is released under the MIT License.