An enterprise-grade, fullstack technical publication and cloud-native GitOps demonstration. Built with **Next.js 16 (Turbopack standalone)**, **Drizzle ORM**, **in-cluster PostgreSQL 16**, **Helm charts**, and fully automated **ArgoCD continuous delivery**.







An enterprise-grade, fullstack technical publication and cloud-native GitOps demonstration. Built with Next.js 16 (Turbopack standalone), Drizzle ORM, in-cluster PostgreSQL 16, Helm charts, and fully automated ArgoCD continuous delivery.
βββ .github/
β βββ workflows/
β βββ deploy.yml # Multi-stage Docker build, GHCR push, & Helm value update
βββ argocd/
β βββ application-production.yaml # ArgoCD Application definition
β βββ project.yaml # ArgoCD AppProject
βββ drizzle/ # Drizzle ORM generated SQL migration scripts
β βββ 0000_yellow_sway.sql
β βββ 0001_misty_dark_beast.sql
βββ helm/
β βββ nextjs-app/ # Production Helm 3 Chart
β βββ Chart.yaml # Chart metadata
β βββ values.yaml # Production configuration (image, ingress, postgres, hpa)
β βββ templates/
β βββ deployment.yaml # Next.js deployment with wait-for-postgres initContainer
β βββ postgres.yaml # In-cluster PostgreSQL deployment & ClusterIP service
β βββ service.yaml # Next.js ClusterIP service
β βββ ingress.yaml # Traefik ingress with websecure TLS annotations
β βββ hpa.yaml # HorizontalPodAutoscaler
β βββ serviceaccount.yaml # RBAC ServiceAccount
βββ scripts/
β βββ entrypoint.sh # Container entrypoint orchestrator
β βββ sync-db.mjs # Drizzle migration and database seeding script
βββ src/
β βββ app/
β β βββ layout.tsx # Root layout with SEO viewport and metadata
β β βββ page.tsx # 100% Server Component publication page with H1/H2
β β βββ sitemap.ts # Dynamic XML sitemap generator (/sitemap.xml)
β β βββ robots.ts # Automated robots.txt route (/robots.txt)
β β βββ posts/[slug]/page.tsx # Dedicated article page with TechArticle JSON-LD
β β βββ api/ # REST APIs (/api/posts, /api/health, /api/db/sync)
β βββ components/ # Client and Server React components
β β βββ Navbar.tsx # Sticky masthead with status indicator & modal trigger
β β βββ FeaturedArticle.tsx # Hero cover publication showcase
β β βββ InteractiveArticles.tsx # Live search, category pills, & article cards
β β βββ InteractiveRunbooks.tsx # Production CLI step runner with copy feedback
β β βββ EcosystemResources.tsx # CNCF & official docs outbound links
β β βββ AdminStudioModal.tsx # Article publisher & Drizzle sync drawer
β β βββ Footer.tsx # 4-column semantic footer
β βββ db/
β β βββ index.ts # Drizzle client, pool manager, and memory fallback
β β βββ schema.ts # Schema definitions (posts, comments)
β βββ lib/
β β βββ actions.ts # Next.js Server Actions (CRUD, likes, views, comments)
β β βββ logger.ts # Structured JSON logger with distributed trace IDs
β βββ proxy.ts # Next.js 16 Proxy (HTTPS redirect & trace propagation)
βββ Dockerfile # Ultra-lean multi-stage Alpine container (standalone)
βββ drizzle.config.ts # Drizzle Kit CLI configuration
βββ next.config.ts # Next.js config (standalone, no powered-by, compression)
# Clone the repository
git clone https://github.com/sa3akash/argocd_deployment_demo.git
cd argocd_deployment_demo
# Install dependencies
bun install
# or: npm install
Create a .env.local file in the project root:
# Optional: connect to a local or remote PostgreSQL database
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/blogdb"
NODE_ENV="development"
PORT=3000
(Note: If DATABASE_URL is omitted, the application automatically boots into in-memory fallback mode).
bun run dev
# or: npm run dev
Open http://localhost:3000 to view the publication.
bun run build
On your Kubernetes cluster (K3s, MicroK8s, EKS, GKE, etc.):
# Create production namespace
kubectl create namespace production
# Optional: Create custom database credentials secret
kubectl create secret generic nextjs-secrets \
--from-literal=DATABASE_URL="postgresql://postgres:StrongBlogPassword2026!@nextjs-app-production-postgres:5432/blogdb" \
-n production
# Dry-run template validation
helm template test helm/nextjs-app
# Deploy to cluster
helm upgrade --install nextjs-app-production helm/nextjs-app \
--namespace production \
--create-namespace
Apply the ArgoCD application manifest:
kubectl apply -f argocd/application-production.yaml
ArgoCD will continuously reconcile your cluster state with the main branch of this repository.
# Check running pods and services
kubectl get pods,svc,ingress,hpa -n production
# Inspect logs of Next.js pod
kubectl logs -l app.kubernetes.io/name=nextjs-app -n production --tail=50
Shakil Ahmed
This project is open-source and licensed under the Apache License 2.0.
nice