How madraka/gonews works
Project type and purpose
• GONews is a production-ready, open-source RESTful API written in Go. It exposes HTTP endpoints for article management, user authentication, AI-powered semantic search, real-time WebSocket updates, video processing, and background tasks. It is primarily a backend microservice with multiple entry points (API server, worker, CLI tools).
File structure
• Top-level “cmd/” contains distinct Go binaries:
• api (the HTTP/HTTPS server with Swagger docs)
• worker (background job processor)
• migrate, seed (database migration and data seeding)
• http2-test, latency-test (performance testing)
• “internal/” holds application code organized by layer:
• config, server, middleware, routes (HTTP layer)
• handlers (API handlers)
• services (business logic)
• repositories, database (persistence)
• cache, queue, pubsub (Redis-backed caching and job queue)
• storage (local/S3 file storage)
• auth, metrics, tracing, validators, profiling
• “deployments/” and “Dockerfiles” for Docker Compose and Kubernetes setups
• “monitoring/” with Prometheus, Grafana, OpenTelemetry configs
• “tests/” with unit, integration, E2E tests
README for additional insights
• Key external dependencies: PostgreSQL, Redis, Elasticsearch, OpenAI, S3 (or local)
• Observability: Prometheus metrics, Grafana dashboards, OpenTelemetry tracing, structured logging
• Deployment targets: Docker, Kubernetes, bare metal
• Features: WebSocket support, HTTP/2, JWT auth, role-based access