A production-ready, full-stack CRUD application with complete DevOps pipeline
Features β’ Architecture β’ Quick Start β’ DevOps β’ API
- Overview
- Features
- Architecture
- Tech Stack
- Quick Start
- DevOps Pipeline
- Kubernetes Deployment
- API Reference
- Project Structure
- Configuration
- Troubleshooting
A comprehensive Student Management System demonstrating modern software development practices, from full-stack development to enterprise-grade DevOps implementation. This project showcases:
- Backend: RESTful API built with Go, featuring clean architecture
- Frontend: Modern React application with TypeScript
- DevOps: Complete CI/CD pipeline with GitOps deployment to AWS EKS
| Feature | Description |
|---|---|
| β Create | Add students with validated name, age, and email |
| β Read | View all students in a responsive grid layout |
| β Update | Edit student details via modal interface |
| β Delete | Remove students with confirmation dialog |
| β Validation | Backend and frontend form validation |
| β Error Handling | Comprehensive error responses |
| β CORS Support | Cross-origin resource sharing enabled |
| Feature | Description |
|---|---|
| π³ Containerization | Multi-stage Docker builds for optimized images |
| βΈοΈ Kubernetes | Production deployment on AWS EKS |
| π CI/CD | Automated pipeline with GitHub Actions |
| π¦ Helm Charts | Templated Kubernetes manifests |
| π GitOps | ArgoCD for declarative deployments |
| π Ingress | NGINX Ingress Controller for routing |
| π Code Quality | Automated linting with golangci-lint |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β DEVELOPER WORKFLOW β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β ββββββββββββ ββββββββββββββββ ββββββββββββββββ ββββββββββββ β
β β Code ββββββΆβ GitHub ββββββΆβ GitHub ββββββΆβ Docker β β
β β Push β β Repository β β Actions β β Hub β β
β ββββββββββββ ββββββββββββββββ ββββββββββββββββ ββββββββββββ β
β β β β
β βΌ β β
β ββββββββββββββββββββ β β
β β Update Helm β β β
β β Chart Image Tag β β β
β ββββββββββββββββββββ β β
β β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AWS EKS CLUSTER β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β β
β ββββββββββββββββ βββββββββββββββββββββββββββββββββββββββββ β
β β ArgoCD ββββββββββΆβ Kubernetes Namespace ββ β
β β (GitOps) β β ββββββββββββββ ββββββββββββββββ ββ β
β ββββββββββββββββ β β Ingress β β Service β ββ β
β β β β (NGINX) βββββΆβ (ClusterIP) β ββ β
β β β ββββββββββββββ ββββββββββββββββ ββ β
β βΌ β β ββ β
β ββββββββββββββββ β βΌ ββ β
β β Helm Chart β β ββββββββββββββββββββ ββ β
β β Sync β β β Deployment ββββββ β
β ββββββββββββββββ β β ββββββββββββββ β β β
β β β β Pod(s) β β β β
β β β β ββββββββββ β β β β
β β β β βGo + Reactβ β β β β
β β β β ββββββββββ β β β β
β β β ββββββββββββββ β β β
β β ββββββββββββββββββββ β β
β βββββββββββββββββββββββββββββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββ βββββββββββ ββββββββββββββββ βββββββββββ ββββββββββββ
β Build βββββΆβ Test βββββΆβ Code Quality βββββΆβ Push βββββΆβ Update β
β Go β β Suite β β Linting β β Docker β β Helm β
βββββββββββ βββββββββββ ββββββββββββββββ βββββββββββ ββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ArgoCD Auto-Sync β
β (Detects Helm values.yaml change) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββ
β Deploy to β
β AWS EKS β
ββββββββββββββββ
| Technology | Purpose |
|---|---|
| Go 1.24 | Primary backend language |
| net/http | HTTP server and routing |
| SQLite | Lightweight embedded database |
| go-playground/validator | Request validation |
| cleanenv | Configuration management |
| Technology | Purpose |
|---|---|
| React 18 | UI component library |
| TypeScript | Type-safe JavaScript |
| Vite | Next-generation build tool |
| Axios | HTTP client |
| CSS3 | Styling with animations |
| Technology | Purpose |
|---|---|
| Docker | Containerization with multi-stage builds |
| Kubernetes | Container orchestration |
| AWS EKS | Managed Kubernetes service |
| Helm 3 | Kubernetes package manager |
| ArgoCD | GitOps continuous delivery |
| GitHub Actions | CI/CD automation |
| NGINX Ingress | Kubernetes ingress controller |
| golangci-lint | Go code quality analysis |
| Tool | Version | Purpose |
|---|---|---|
| Go | 1.24+ | Backend development |
| Node.js | 18+ | Frontend development |
| Docker | Latest | Containerization |
| kubectl | Latest | Kubernetes CLI |
| Helm | 3.x | Kubernetes deployments |
Terminal 1 - Backend:
# Clone the repository
git clone https://github.com/Jaisheesh-2006/Golang-rest-api.git
cd Golang-rest-api
# Run the Go backend
go run ./cmd/students-api/main.goBackend available at: http://localhost:8080
Terminal 2 - Frontend:
cd students-frontend
npm install
npm run devFrontend available at: http://localhost:3000
# Build and run with Docker
docker build -t student-management-app .
docker run -p 8080:8080 -v $(pwd)/storage:/app/storage student-management-appApplication available at: http://localhost:8080
docker-compose up --buildThe CI/CD pipeline is defined in .github/workflows/ci.yaml and consists of 4 stages:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CI/CD PIPELINE β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β βββββββββββββββ β
β β BUILD β β’ Checkout code β
β β β β’ Set up Go 1.24 β
β β β β’ Build binary β
β β β β’ Run unit tests β
β ββββββββ¬βββββββ β
β β β
β βΌ β
β βββββββββββββββ β
β β CODE β β’ Run golangci-lint β
β β QUALITY β β’ Static analysis β
β β β β’ Best practices check β
β ββββββββ¬βββββββ β
β β β
β βΌ β
β βββββββββββββββ β
β β PUSH β β’ Build Docker image β
β β DOCKER β β’ Multi-stage build β
β β β β’ Push to Docker Hub β
β β β β’ Tag: github.run_id β
β ββββββββ¬βββββββ β
β β β
β βΌ β
β βββββββββββββββ β
β β UPDATE β β’ Update Helm values.yaml β
β β HELM β β’ Commit new image tag β
β β β β’ Push to repository β
β β β β’ Triggers ArgoCD sync β
β βββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| Secret | Description |
|---|---|
DOCKER_HUB_USERNAME |
Docker Hub username |
DOCKER_HUB_TOKEN |
Docker Hub access token |
TOKEN |
GitHub PAT for pushing Helm updates |
The Dockerfile uses a 3-stage build for optimized image size:
# Stage 1: Build Frontend (Node.js)
FROM node:18-alpine AS frontend-builder
# Builds React app with Vite
# Stage 2: Build Backend (Go)
FROM golang:1.24-alpine AS backend-builder
# Compiles Go binary with CGO disabled
# Stage 3: Runtime (Distroless)
FROM gcr.io/distroless/cc-debian11
# Minimal runtime image (~20MB)Benefits:
- π Secure: Distroless base image with no shell
- π¦ Small: Final image ~20MB
- β‘ Fast: Optimized layer caching
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AWS EKS Cluster β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β NGINX Ingress Controller β β
β β β β
β β β’ SSL/TLS termination β β
β β β’ Path-based routing β β
β β β’ Load balancing β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β βΌ β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Ingress Resource β β
β β β β
β β Host: go-web-app.local β β
β β Path: / β go-web-app service:80 β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β βΌ β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Service (ClusterIP) β β
β β β β
β β Port: 80 β targetPort: 8080 β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β βΌ β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Deployment β β
β β β β
β β ββββββββββββββββββ ββββββββββββββββββ β β
β β β Pod 1 β β Pod N β β β
β β β ββββββββββββ β β ββββββββββββ β β β
β β β β Go + Reactβ β β β Go + Reactβ β β β
β β β β :8080 β β β β :8080 β β β β
β β β ββββββββββββ β β ββββββββββββ β β β
β β ββββββββββββββββββ ββββββββββββββββββ β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Located in k8s/manifests/:
| File | Description |
|---|---|
deployment.yaml |
Pod specification and replica management |
service.yaml |
ClusterIP service exposing port 80 |
ingress.yaml |
NGINX ingress rules for external access |
Located in helm/go-web-app-chart/:
helm/go-web-app-chart/
βββ Chart.yaml # Chart metadata
βββ values.yaml # Configurable values
βββ templates/
βββ deployment.yaml # Deployment template
βββ service.yaml # Service template
βββ ingress.yaml # Ingress template
Deploy with Helm:
# Install
helm install go-web-app ./helm/go-web-app-chart
# Upgrade
helm upgrade go-web-app ./helm/go-web-app-chart
# Uninstall
helm uninstall go-web-appArgoCD monitors the Helm chart in the repository and automatically syncs changes to the cluster.
Setup ArgoCD Application:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: go-web-app
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/Jaisheesh-2006/Golang-rest-api.git
targetRevision: main
path: helm/go-web-app-chart
destination:
server: https://kubernetes.default.svc
namespace: default
syncPolicy:
automated:
prune: true
selfHeal: trueBase URL: http://localhost:8080/api
| Method | Endpoint | Description | Request Body |
|---|---|---|---|
POST |
/students |
Create a student | { name, age, email } |
GET |
/students |
List all students | - |
GET |
/students/{id} |
Get student by ID | - |
PATCH |
/students/{id} |
Update student | { name, age, email } |
DELETE |
/students/{id} |
Delete student | - |
Create Student:
curl -X POST http://localhost:8080/api/students \
-H "Content-Type: application/json" \
-d '{"name": "John Doe", "age": 20, "email": "john@example.com"}'Response:
{
"id": 1
}Get All Students:
curl http://localhost:8080/api/studentsResponse:
[
{
"id": 1,
"name": "John Doe",
"age": 20,
"email": "john@example.com"
}
]| Field | Rules |
|---|---|
name |
Required, 2-100 characters |
age |
Required, 1-150 |
email |
Required, valid email format |
Golang-rest-api/
βββ .github/
β βββ workflows/
β βββ ci.yaml # GitHub Actions CI/CD pipeline
βββ cmd/
β βββ students-api/
β βββ main.go # Application entry point
βββ config/
β βββ local.yaml # Backend configuration
βββ helm/
β βββ go-web-app-chart/ # Helm chart
β βββ Chart.yaml
β βββ values.yaml
β βββ templates/
β βββ deployment.yaml
β βββ service.yaml
β βββ ingress.yaml
βββ internal/
β βββ config/
β β βββ config.go # Configuration loader
β βββ http/
β β βββ handlers/
β β βββ student/
β β βββ student.go # HTTP handlers
β βββ storage/
β β βββ storage.go # Storage interface
β β βββ sqlite/
β β βββ sqlite.go # SQLite implementation
β βββ types/
β β βββ types.go # Data types
β βββ utils/
β βββ responses/
β βββ responses.go # Response helpers
βββ k8s/
β βββ manifests/ # Raw Kubernetes manifests
β βββ deployment.yaml
β βββ service.yaml
β βββ ingress.yaml
βββ storage/
β βββ storage.db # SQLite database file
βββ students-frontend/ # React frontend
β βββ src/
β β βββ components/ # React components
β β βββ pages/ # Page components
β β βββ services/
β β β βββ api.ts # API client
β β βββ types/
β β βββ index.ts # TypeScript types
β βββ package.json
β βββ tsconfig.json
β βββ vite.config.ts
βββ Dockerfile # Multi-stage Docker build
βββ go.mod # Go module dependencies
βββ go.sum # Go dependency checksums
βββ README.md # This file
config/local.yaml:
env: "dev"
storage_path: "storage/storage.db"
http_server:
address: "localhost:8080"| Variable | Description | Default |
|---|---|---|
CONFIG_PATH |
Path to config file | ./config/local.yaml |
| Issue | Solution |
|---|---|
| Backend won't start | Ensure port 8080 is free: lsof -i :8080 |
| Frontend shows "Loading..." | Verify backend is running |
| Docker build fails | Check Docker daemon is running |
| Helm install fails | Verify kubectl context: kubectl config current-context |
| ArgoCD not syncing | Check ArgoCD application status in UI |
| Ingress not working | Verify NGINX Ingress Controller is installed |
| Database errors | Delete storage/storage.db and restart |
# Check pod status
kubectl get pods -l app=go-web-app
# View pod logs
kubectl logs -l app=go-web-app -f
# Check ArgoCD sync status
argocd app get go-web-app
# Force ArgoCD sync
argocd app sync go-web-app
# Check ingress
kubectl get ingress go-web-appThis project demonstrates proficiency in:
- β RESTful API design with Go
- β React component architecture
- β TypeScript type safety
- β Database design with SQLite
- β Docker multi-stage builds
- β Kubernetes resource management
- β Helm chart development
- β CI/CD with GitHub Actions
- β GitOps with ArgoCD
- β Ingress configuration
- β Code quality automation
Jaisheesh
- GitHub: @Jaisheesh-2006
This project is open source and available under the MIT License.
β Star this repository if you found it helpful!

