Skip to content

Conversation

@fank
Copy link
Member

@fank fank commented Jan 30, 2026

Summary

Restructures the codebase to follow the standard Go project layout:

  • cmd/ocap-webserver/ - Application entry point (named after binary)
  • internal/ - Private application code
    • server/ - HTTP handlers, repositories, configuration
    • storage/ - Storage engines (JSON, Protobuf, FlatBuffers)
    • conversion/ - Background format conversion worker
  • pkg/schemas/ - Public API (protobuf/flatbuffers schemas)
  • assets/ - Static assets (markers, ammo icons)

Changes

  • Move cmd/main.gocmd/ocap-webserver/main.go
  • Move server/internal/server/
  • Move server/storage/internal/storage/
  • Move server/conversion/internal/conversion/
  • Move schemas/pkg/schemas/
  • Move ammo/ and markers/assets/
  • Remove data/ and maps/ directories (now gitignored)
  • Update all import paths, Dockerfile, and CI workflow

Test plan

  • go build ./cmd/ocap-webserver succeeds
  • go test ./... passes
  • Docker build succeeds
  • Application starts and serves requests

fank added 2 commits January 30, 2026 14:03
- Move cmd/main.go to cmd/ocap-webserver/main.go
- Move server/ to internal/server/
- Move storage/ and conversion/ to internal/ as siblings
- Move schemas/ to pkg/schemas/ for public API
- Move ammo/ and markers/ to assets/
- Remove data/ and maps/ (now gitignored runtime dirs)
- Update all import paths and build configurations
Use /ocap-webserver to only match the binary at root level
@fank fank merged commit 76e82aa into main Jan 30, 2026
3 checks passed
@fank fank deleted the refactor/go-project-layout branch January 30, 2026 13:26
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.

2 participants