Skip to content

smart-developer1791/go-fiber-auth-thunder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚡ Thunder Auth

Go Version Fiber GORM SQLite Tailwind CSS Alpine.js Render

Electric Storm — Immersive 3D thunderstorm authentication with dynamic lightning bolts, rain particles, charged clouds, and electrifying atmosphere.

✨ Features

  • 🌩️ Dynamic Lightning Bolts — SVG lightning with realistic flash timing
  • 🌧️ Rain Particle System — 100+ animated rain drops with parallax
  • ☁️ Animated Storm Clouds — Drifting, pulsing cloud formations
  • Electric Sparks — Random floating charged particles
  • 🔮 Glassmorphism UI — Frosted glass cards with electric borders
  • 🎯 Real-time Validation — Async field validation with debounce
  • 💪 Password Strength Meter — Visual 5-level strength indicator
  • 🚫 No Page Reloads — All errors handled via Alpine.js
  • 📱 Fully Responsive — Mobile-first storm experience
  • 🔐 Secure Auth — bcrypt password hashing

🛠️ Tech Stack

Component Technology
Backend Go 1.21+ with Fiber v2
ORM GORM with Pure Go SQLite
Frontend Alpine.js 3.x
Styling Tailwind CSS (CDN)
Security bcrypt password hashing
Templates Go HTML Templates

🚀 Quick Start

Clone the repository:

git clone https://github.com/smart-developer1791/go-fiber-auth-thunder
cd go-fiber-auth-thunder

Install dependencies and run:

go mod tidy
go run .

Open http://localhost:3000

🔑 Demo Credentials

Field Value
Email demo@thunder.io
Password demo123456
Phone +1 (555) 867-5309

📁 Project Structure

go-fiber-auth-thunder/
├── main.go              # Fiber server, routes, auth handlers
├── go.mod               # Go module definition
├── render.yaml          # Render deployment config
├── thunder_auth.db      # SQLite database (auto-created)
└── templates/
    ├── login.html       # Login page with storm effects
    ├── register.html    # Registration with live validation
    └── dashboard.html   # Protected dashboard

🎨 Storm Effects

Lightning System

  • SVG-based lightning bolts with gradient fills
  • Staggered animation timing (4s cycle)
  • Gaussian blur glow filter
  • 3 independent lightning channels

Rain Particles

  • 100 procedurally generated rain drops
  • Variable heights (10-30px)
  • Random animation delays
  • 15° angle with motion blur

Cloud Layer

  • 4 animated cloud formations
  • Slow drift animation (8s cycle)
  • Scale breathing effect
  • Multiple depth layers

🔒 Security Features

  • bcrypt password hashing with cost factor 10
  • HTTP-only session cookies
  • Server-side validation
  • SQL injection protection via GORM
  • XSS protection with templating

🌐 API Endpoints

Method Endpoint Description
GET / Redirect to login
GET /login Login page
GET /register Registration page
POST /api/login Authenticate user
POST /api/register Create account
POST /api/validate Field validation
GET /dashboard Protected area
POST /logout End session

☁️ Deployment

Render

The project includes render.yaml for one-click deployment.

Environment Variables

Variable Default Description
PORT 3000 Server port

📊 Performance

  • No CGO required — Pure Go SQLite driver
  • Single binary — Easy deployment
  • Minimal dependencies — Fast builds
  • CDN assets — Cached Tailwind & Alpine.js

Deploy in 10 seconds

Deploy to Render

About

⚡ Electric Storm — Immersive 3D thunderstorm authentication with dynamic lightning bolts, rain particles, charged clouds, and electrifying atmosphere. Go Fiber + GORM + SQLite + Alpine.js + Tailwind CSS. No CGO required!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors