Skip to content

FEAT: Issue #3 — API Endpoints + CI/CD Infrastructure - #10

Merged
Verifieddanny merged 16 commits into
mainfrom
dev
Jun 9, 2026
Merged

Verifieddanny merged 16 commits into
mainfrom
dev

Conversation

@Verifieddanny

Copy link
Copy Markdown
Contributor

API Endpoints (Issue #3)

  • Implemented 9 REST endpoints for intents, proposals, execution, leaderboard
  • Request/response types with validation
  • Real-time WebSocket broadcasting for all state changes
  • Proper HTTP status codes and error handling

Infrastructure

  • GitHub Actions CI/CD pipeline: test → lint → build
    • Runs go test -race with PostgreSQL + Redis services
    • golangci-lint checks for code quality
    • Builds static binary, retains artifacts 5 days
  • golangci-yml: linter configuration (used by CI and local 'make lint')
  • Dockerfile: production image (multi-stage Alpine build, ~50MB)
    • Used for containerizing the server for prod deployment
    • Separate from docker-compose which is dev-only (postgres + redis)
  • .air.toml: live reload config for development
  • Makefile: 8 commands for common tasks
  • Comprehensive README with API examples

Testing

  • All endpoints tested and working:
    • POST /api/v1/intents creates intent ✓
    • GET /api/v1/intents/{id} fetches intent ✓
    • GET /api/v1/leaderboard returns rankings ✓

Why two Docker configs:

  • docker-compose.yml: LOCAL dev (PostgreSQL + Redis only, no app)
  • Dockerfile: PRODUCTION app (compiled Go binary in Alpine container)

In prod, you'd use one docker-compose (or K8s) that orchestrates both the Dockerfile-packaged backend AND the postgres/redis services.

close #3

**API Endpoints (Issue #3)**
- Implemented 9 REST endpoints for intents, proposals, execution, leaderboard
- Request/response types with validation
- Real-time WebSocket broadcasting for all state changes
- Proper HTTP status codes and error handling

**Infrastructure**
- GitHub Actions CI/CD pipeline: test → lint → build
  - Runs go test -race with PostgreSQL + Redis services
  - golangci-lint checks for code quality
  - Builds static binary, retains artifacts 5 days
- golangci-yml: linter configuration (used by CI and local 'make lint')
- Dockerfile: production image (multi-stage Alpine build, ~50MB)
  - Used for containerizing the server for prod deployment
  - Separate from docker-compose which is dev-only (postgres + redis)
- .air.toml: live reload config for development
- Makefile: 8 commands for common tasks
- Comprehensive README with API examples

**Testing**
- All endpoints tested and working:
  - POST /api/v1/intents creates intent ✓
  - GET /api/v1/intents/{id} fetches intent ✓
  - GET /api/v1/leaderboard returns rankings ✓

**Why two Docker configs:**
- docker-compose.yml: LOCAL dev (PostgreSQL + Redis only, no app)
- Dockerfile: PRODUCTION app (compiled Go binary in Alpine container)

In prod, you'd use one docker-compose (or K8s) that orchestrates both
the Dockerfile-packaged backend AND the postgres/redis services.
@Verifieddanny
Verifieddanny merged commit a915e82 into main Jun 9, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

setting up the api layer with the necessary endpoints

1 participant