From Go Code to GitOps: A Deep Dive into the ddg-search API
For a portfolio, a project must demonstrate more than just the ability to write code; it must showcase a complete, end‑to‑end engineering solution. That was my goal with ddg-search: a simple yet full‑featured API, designed, built, and automated to production‑grade standards. This article details its key features and the DevOps engine that brings it to life.

Core API Features and Professional‑grade Characteristics
ddg-search is a lightweight REST API that acts as a proxy for DuckDuckGo search requests. Beyond this basic function, it is architected with the hallmarks of a modern production‑ready service:
- OpenAPI Specification – The API is fully documented via OpenAPI (Swagger), providing clear, interactive documentation for any consumer and establishing a professional contract for its use.
- Unique Feature – A query parameter
?scrape=true extends the API’s utility, allowing it to convert search results directly into a clean Markdown document. - Built‑in Security & Control – The service is not publicly open; by default it includes essential security features:
- Authentication – The endpoint is protected by basic authentication.
- Rate Limiting – Configurable request throttling prevents abuse.
- Observability – All requests pass through middleware that emits structured JSON logs, capturing status, latency, and request path so the API’s behavior is immediately observable.
The DevOps Engine: From Commit to Cluster
A modern API is inseparable from the automation that runs it. ddg-search follows a complete GitOps lifecycle, where the Git repository is the single source of truth for the entire system.
- Containerisation – The application is packaged with a multi‑stage
Dockerfile, producing a minimal, secure image that contains only the compiled Go binary. - Native Kubernetes Deployment – Deployment manifests are managed declaratively with Kustomize, cleanly separating base configuration from environment‑specific overlays, making deployments predictable and repeatable.
- Continuous Integration (CI) – A robust GitHub Actions pipeline automates the entire pre‑deployment process on every merge to
main: - Linting and tests to ensure code quality.
- Semantic versioning derived from commit messages.
- Automatic generation of
CHANGELOG.md. - Build and push of a version‑tagged Docker image to a container registry.
- Continuous Deployment (CD) with GitOps – The loop is closed with Argo CD. An Argo CD Application watches the
ddg-search repo; when CI pushes a new manifest (with a new image tag), Argo CD detects the change and automatically synchronises the Kubernetes deployment to match the state defined in Git.
Conclusion – A Full‑stack Engineering Showcase
ddg-search is a practical demonstration of a complete software product. It combines a clean, well‑documented API with a mature, fully automated CI/CD pipeline, providing a reproducible process for delivering reliable software.