| api | ||
| db | ||
| .gitignore | ||
| default.vcl | ||
| docker-compose.yml | ||
| Dockerfile | ||
| entrypoint.sh | ||
| README.md | ||
Workerbee API
Workerbee is the main API for the Beehive and Queenbee applications. It is built with Go and the Gin framework, uses PostgreSQL as its primary database, and serves both public and protected endpoints. API documentation is available at /api/v2/docs once the application is running.
The API also integrates with object storage for file handling, which is used for images and other media uploads.
Beehive Database
This repository includes the database setup used by Login for Workerbee. The db directory contains:
init.up.sqlfor the base database structuredummydata.sqlfor the same structure with seeded test data
Running the project
Start the full stack with:
docker compose up --build
This starts both the PostgreSQL database and the Workerbee API.
For local development, use the seeded SQL file if you want test data. Otherwise use the base schema.
Environment
Workerbee reads configuration from a .env file in the project root. Start by getting a working .env file from 1Password.
The main settings cover:
- database connection
- application host and port
- object storage credentials
- protected endpoint rate limiting
Project structure
api/contains the Go applicationapi/handlers/contains the HTTP handlersapi/services/contains business logicapi/repositories/andapi/db/contain data access codeapi/routes_internal/registers routes under/api/v2api/docs/contains the generated API documentationdb/contains database initialization filesdocker-compose.ymlstarts the API and database togetherDockerfilebuilds the application container
Getting started
- Get a valid
.envfile. - Run
docker compose up --build. - Open
/api/v2/docsto explore the API. - Check
db/if you need seeded or empty local database initialization.