How aives81/vade_microservice works
Project type and purpose
• This is a small, standalone backend microservice written in Go.
• Purpose: expose a RESTful API to perform CRUD operations on “documents” (create, list, get by ID).
• It is containerized (Docker) and has a CI pipeline (GitHub Actions) for automated builds/tests.
File structure
• Top level:
• Dockerfile – builds the Go service into a container image
• .github/workflows/ci-file.yml – CI pipeline (build, test, lint)
• main.go – entry point; HTTP server setup and route binding
• go.mod / go.sum – dependency management
• Directories:
• controllers/ – HTTP handlers (documentController.go)
• services/ – business logic layer (documentService.go)
• models/ – data structures and persistence stubs (documentModel.go)
• tests/ – unit tests for service or controller (documentTest.go)
• No explicit database driver or config file, so persistence is likely in-memory or will be extended to a data store.
README for additional insights
• Confirms it’s a CRUD REST API for “documents.”
• Dependencies: Go 1.23, Docker, GitHub Actions.
• Usage: Docker image pulled from Docker Hub and run on port 8001.
• Routes: POST /documents, GET /documents, GET /documents/{id}.