Stunning 3D glassmorphism authentication system with immersive visual effects. Built with Go Fiber, GORM, pure Go SQLite, and cutting-edge CSS 3D transforms. Zero CGO dependencies โ runs anywhere!
- ๐จ Immersive 3D Effects โ Real-time mouse-tracking parallax on glass cards
- ๐ Animated Geometry โ Floating shapes, rotating cubes, spinning torus rings
- ๐ Glassmorphism UI โ Frosted glass cards with depth and glow effects
- โจ Particle System โ Dynamic floating particles throughout the scene
- ๐ Secure Auth โ Bcrypt password hashing with session management
- ๐ฑ Responsive Design โ Works beautifully on all devices
- ๐ Zero Config โ SQLite database auto-created on first run
- โก No CGO โ Pure Go SQLite driver, cross-compile anywhere
| Effect | Description |
|---|---|
| ๐ด 3D Card Tilt | Cards follow mouse movement with realistic perspective |
| ๐ฎ Glassmorphism | Frosted glass with backdrop blur and inner glow |
| ๐ช Rotating Cubes | CSS 3D transformed cubes with wireframe edges |
| ๐ Gradient Glow | Animated gradient halos behind cards |
| โญ Particles | Floating luminescent orbs rising through scene |
| ๐ Perspective Grid | 3D grid floor with infinite animation |
Clone the repository:
git clone https://github.com/smart-developer1791/go-fiber-auth-3d
cd go-fiber-auth-3dInitialize dependencies and run:
go mod tidy
go run .Open browser:
http://localhost:3000
| Field | Value |
|---|---|
| ๐ง Email | demo@glassauth.io |
| ๐ Password | demo2024 |
| ๐ฑ Phone | +1 (555) 987-6543 |
| Technology | Purpose |
|---|---|
| Go 1.21+ | Backend runtime |
| Fiber v2 | High-performance web framework |
| GORM | ORM with auto-migrations |
| glebarez/sqlite | Pure Go SQLite driver (no CGO!) |
| Bcrypt | Secure password hashing |
| Tailwind CSS | Utility-first styling |
| CSS 3D | Hardware-accelerated transforms |
go-fiber-auth-3d/
โโโ main.go # Server, routes, handlers, templates
โโโ auth.db # SQLite database (auto-created)
โโโ render.yaml # Render.com deployment config
โโโ .gitignore # Git ignore rules
โโโ README.md # Documentation
| Method | Route | Description |
|---|---|---|
GET |
/ |
Redirect to login |
GET |
/login |
Login page with 3D effects |
POST |
/login |
Authenticate user |
GET |
/register |
Registration page |
POST |
/register |
Create new account |
GET |
/dashboard |
Protected dashboard |
POST |
/logout |
End session |
Modify gradient colors in the CSS:
/* Login theme - Purple/Blue */
background: linear-gradient(135deg, #8b5cf6, #3b82f6);
/* Register theme - Green/Cyan */
background: linear-gradient(135deg, #10b981, #06b6d4);Change parallax sensitivity in JavaScript:
// Lower = more sensitive, Higher = less sensitive
const xAxis = (window.innerWidth / 2 - e.pageX) / 25;
const yAxis = (window.innerHeight / 2 - e.pageY) / 25;- โ Bcrypt password hashing (cost factor 10)
- โ HTTP-only session cookies
- โ Protected route middleware
- โ Input validation
- โ SQL injection prevention via GORM
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ users โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ id INTEGER PRIMARY KEY โ
โ email TEXT UNIQUE NOT NULL โ
โ phone TEXT โ
โ password TEXT NOT NULL โ
โ created_at DATETIME โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Most auth UIs are boring forms. This project proves authentication can be:
- ๐ญ Visually stunning without sacrificing UX
- โก Fast using native CSS transforms (GPU accelerated)
- ๐ก๏ธ Secure with industry-standard practices
- ๐ฆ Minimal โ single file, zero external assets
- ๐ง Portable โ no CGO, runs on any platform
This project uses github.com/glebarez/sqlite instead of the traditional gorm.io/driver/sqlite:
| Feature | gorm.io/driver/sqlite | glebarez/sqlite |
|---|---|---|
| CGO Required | โ Yes | โ No |
| Cross-compile | โ Complex | โ Easy |
| Windows build | โ Needs GCC | โ Just works |
| Performance | Faster | Slightly slower |
| Compatibility | Full | 99%+ |