Googly-Login

Googly Login – Sarcastic Login Page with Secure K8s Stack β˜ΈοΈπŸ”

Googly Login is a fun registration system built with Go, PostgreSQL, Docker, and Kubernetes. It features a sarcastic front-end, secure backend logic, Helm-based deployment, Calico network policies, and CI/CD automation using GitHub Actions.


πŸ“‘ Table of Contents


✨ Features


🧰 Tech Stack

Layer Tool / Technology
Frontend HTML, CSS, JavaScript
Backend Go
Database PostgreSQL
Container Docker
Deployment Kubernetes + Helm
CI/CD GitHub Actions
Security Calico (NetworkPolicy)
Secrets Mgmt K8s Secret + .env

πŸ—‚οΈ Project Structure

Googly-Login/
β”œβ”€β”€ database/                         # DB connection logic
β”‚   └── database.go
β”œβ”€β”€ googly-data/                      # (generated data folder)
β”œβ”€β”€ googly-login/                     # (helm module folder)
β”œβ”€β”€ handlers/                         # Auth and routing handlers
β”‚   β”œβ”€β”€ auth.go
β”‚   └── routes.go
β”œβ”€β”€ HelmCharts/                       # Helm chart for K8s deployment
β”‚   β”œβ”€β”€ Chart.yaml
β”‚   β”œβ”€β”€ values.yaml
β”‚   └── templates/
β”‚       β”œβ”€β”€ googly-deployment.yaml
β”‚       β”œβ”€β”€ googly-service.yaml
β”‚       β”œβ”€β”€ postgres-deployment.yaml
β”‚       β”œβ”€β”€ postgres-pv.yaml
β”‚       β”œβ”€β”€ postgres-pvc.yaml
β”‚       β”œβ”€β”€ postgres-secret.yaml      # secret file (ignored from Git)
β”‚       └── postgres-service.yaml
β”œβ”€β”€ models/                           # Go struct models
β”‚   └── user.go
β”œβ”€β”€ static/                           # Static frontend files (HTML/CSS/JS)
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ styles.css
β”‚   β”œβ”€β”€ script.js
β”œβ”€β”€ utils/                            # Utility-password hash logic
β”‚   └── password.go
β”œβ”€β”€ .github/                          # GitHub Actions workflows
β”‚   └── workflows/
β”‚       └── cicd.yaml
β”œβ”€β”€ .env                              # Local env file (ignored from Git)
β”œβ”€β”€ .gitignore                        # Ignore sensitive/unneeded files
β”œβ”€β”€ calico-network-policies.yaml     # Network policy rules using Calico
β”œβ”€β”€ docker-compose.yaml              # Local dev stack with Go + Postgres
β”œβ”€β”€ Dockerfile                        # Builds the Go backend image
β”œβ”€β”€ go.mod                            # Go module definitions
β”œβ”€β”€ main.go                           # Main application entrypoint
β”œβ”€β”€ main_test.go                      # Unit tests for main
└── README.md

πŸ“ Note: .env and secrets are intentionally excluded from the repo for security reasons.


πŸ—οΈ Architecture

Architecture Diagram


πŸ“Έ Screenshots

Screenshot 1
Screenshot 2


βš™οΈ CI/CD Pipeline


πŸ’» Local Setup (Docker)

# Clone the repo
git clone https://github.com/nsahil992/googly-login
cd googly-login

# Copy .env.example and set values (never commit .env!)
cp .env.example .env

# Start app
docker compose up --build


☸️ Kubernetes Setup

# Apply Postgres manifests first
kubectl apply -f postgres-pvc.yaml -f postgres-secret.yaml -f postgres-service.yaml -f postgres-deployment.yaml -f postgres-pv.yaml -n googly-login

# Apply Googly manifests
kubectl apply -f googly-deployment.yaml -f googly-service.yaml -n googly-login


β›΅ Helm Setup

# Install all components via Helm chart
helm install googly-login ./helm/ -n googly-login


🧱 Network Policies with Calico

kubectl apply -f calico-network-policy.yaml -n googly-login


πŸ” Secrets Management

βœ… .env is used for local development only and is never committed to GitHub βœ… Kubernetes Secrets are defined in postgres-secret.yaml (base64-encoded) πŸ”’ You must create secrets locally


πŸ“½οΈ Demo

Watch the Demo

πŸ”— Click the image above to watch a 5-minute walkthrough of Googly Login in action.


πŸ‘€ Author

Made with πŸ’» and β˜• by Sahil


⭐ Don’t forget to star this repo if it helped you learn something new!