Skip to content

smart-developer1791/go-fiber-auth-3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ” 3D Glass Auth

Go Fiber GORM Tailwind CGO Render

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!

โœจ Features

  • ๐ŸŽจ 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

๐ŸŽญ Visual Effects

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

๐Ÿš€ Quick Start

Clone the repository:

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

Initialize dependencies and run:

go mod tidy
go run .

Open browser:

http://localhost:3000

๐Ÿ”‘ Demo Credentials

Field Value
๐Ÿ“ง Email demo@glassauth.io
๐Ÿ” Password demo2024
๐Ÿ“ฑ Phone +1 (555) 987-6543

๐Ÿ› ๏ธ Tech Stack

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

๐Ÿ“ Project Structure

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

๐ŸŒ API Routes

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

๐ŸŽจ Customization

Change Color Theme

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);

Adjust 3D Intensity

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;

๐Ÿ”’ Security Features

  • โœ… Bcrypt password hashing (cost factor 10)
  • โœ… HTTP-only session cookies
  • โœ… Protected route middleware
  • โœ… Input validation
  • โœ… SQL injection prevention via GORM

๐Ÿ“Š Database Schema

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              users                  โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ id         INTEGER PRIMARY KEY      โ”‚
โ”‚ email      TEXT UNIQUE NOT NULL     โ”‚
โ”‚ phone      TEXT                     โ”‚
โ”‚ password   TEXT NOT NULL            โ”‚
โ”‚ created_at DATETIME                 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐ŸŒŸ Why This Project?

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

๐Ÿ”ง Why Pure Go SQLite?

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%+

Deploy in 10 seconds

Deploy to Render

About

๐Ÿ” Stunning 3D glassmorphism authentication system with immersive visual effects. Built with Go Fiber, GORM, SQLite, Tailwind CSS, and cutting-edge CSS 3D transforms. Features mouse-tracking parallax cards, floating geometry, and particle effects.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages