No description
  • JavaScript 50.2%
  • Go 34.8%
  • CSS 11.7%
  • HTML 3.1%
  • Dockerfile 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
jad0s 2e84a38f7d
All checks were successful
build-and-push / docker (push) Successful in 41s
fixup! feat: redesign
2026-08-08 00:11:43 +02:00
.forgejo/workflows add instrumental-skip, client sync, volume control and lyrics offset 2026-07-20 16:17:09 +02:00
handlers fixup! feat: redesign 2026-08-08 00:11:43 +02:00
models edit function 2026-06-11 20:35:18 +02:00
tools add instrumental-skip, client sync, volume control and lyrics offset 2026-07-20 16:17:09 +02:00
web feat: standardize nav bar to libretalk.eu design scheme 2026-08-07 23:45:53 +02:00
.dockerignore add instrumental-skip, client sync, volume control and lyrics offset 2026-07-20 16:17:09 +02:00
.env.example initial tierlist 2026-03-16 06:10:41 +01:00
.gitignore feat: redesign 2026-08-07 23:25:36 +02:00
CONFIG.md initial tierlist 2026-03-16 06:10:41 +01:00
Dockerfile add instrumental-skip, client sync, volume control and lyrics offset 2026-07-20 16:17:09 +02:00
go.mod change module URL to forgejo from github 2026-07-14 18:18:38 +02:00
go.sum youtube music streams 2026-05-20 21:17:51 +02:00
IMPLEMENTATION.md initial tierlist 2026-03-16 06:10:41 +01:00
main.go fixup! feat: redesign 2026-08-08 00:11:43 +02:00
QUICK_REF.md initial tierlist 2026-03-16 06:10:41 +01:00
README.md initial tierlist 2026-03-16 06:10:41 +01:00

🏆 Tierlist Maker

A full-featured web application for creating and ranking tierlists with OIDC authentication via Authelia.

Features

  • 🔐 OIDC Authentication - Secure login via Authelia
  • 📝 Tierlist Management - Create, edit, and delete tierlists (admin only)
  • 🎨 Beautiful UI - Modern, responsive design with drag-and-drop ranking
  • 📊 Stats & Rankings - View best-rated items and user preferences
  • 👥 Multi-user - Each user can submit one ranking per tierlist
  • 🛡️ Authorization - Admin-only panel with role-based access control

Data Persistence

Current Implementation: All data is stored in memory (RAM) only. This means:

  • Data is lost when the server restarts
  • No persistent storage across deployments
  • Suitable for development/testing only

Future Enhancement: To add persistent storage, you can:

  1. Add a database (PostgreSQL, MySQL, MongoDB)
  2. Store tierlists, items, and rankings in the database
  3. Upload images to cloud storage (AWS S3, etc.) or local filesystem
  4. Implement data migration scripts

Quick Start

1. Clone & Setup

cd /path/to/tierlist
go mod download

2. Configure OIDC

Copy and edit the configuration file:

cp .env.example .env

Edit .env with your Authelia OIDC settings:

OIDC_ISSUER=https://your-authelia-domain.com
OIDC_CLIENT_ID=tierlist
OIDC_CLIENT_SECRET=your-generated-secret
OIDC_REDIRECT_URL=http://localhost:8080/callback
ADMIN_USERS=your-username

See CONFIG.md for detailed configuration instructions.

3. Run Server

# Load environment variables and start
export $(cat .env | xargs)
go run main.go

Visit http://localhost:8080 in your browser.

Project Structure

├── main.go                 # Server entry point
├── handlers/              # HTTP handlers and middleware
│   ├── auth.go           # OIDC authentication
│   ├── api.go            # REST API endpoints
│   └── *_test.go         # Tests
├── models/               # Data models and store
├── web/                  # Frontend assets
│   ├── index.html        # Main tierlist UI
│   ├── admin.html        # Admin panel
│   ├── app.js           # Tierlist interaction
│   ├── admin.js         # Admin functionality
│   └── style.css        # Styling
├── .env.example         # OIDC configuration template
└── CONFIG.md           # Configuration guide

API Endpoints

Public

  • GET /api/tierlists - List all tierlists
  • GET /api/tierlists/{id} - Get tierlist details with stats

Authenticated

  • POST /api/tierlists/{id}/results - Submit ranking

Admin (authenticated + admin role)

  • POST /api/tierlists - Create tierlist
  • PUT /api/tierlists/{id} - Update tierlist
  • DELETE /api/tierlists/{id} - Delete tierlist
  • POST /api/tierlists/{id}/items - Add item to tierlist

Authentication Flow

  1. User clicks "Login" → redirected to OIDC provider
  2. After successful auth → redirected to callback
  3. Session stored in secure cookie
  4. Each request checks session before allowing access

Admin Features

  • Create new tierlists with names and descriptions
  • Edit tierlist metadata
  • Delete tierlists (with confirmation)
  • Add items to tierlists (with image URLs or base64)

User Features

  • Browse available tierlists
  • Rank items by dragging into S-F tiers
  • View statistics (best-rated items, top picks by user)
  • One submission per user per tierlist (replaceable)

Development

Run Tests

go test ./...

Build Binary

go build -o tierlist

Hot Reload (optional)

go install github.com/cosmtrek/air@latest
air

Configuration Details

See CONFIG.md for:

  • OIDC provider setup
  • Authelia integration instructions
  • Environment variables reference
  • Production deployment considerations

Security Notes

  • Session cookies use secure settings (httpOnly, sameSite)
  • OIDC tokens verified server-side
  • Admin routes protected by role check
  • Users limited to one submission per tierlist
  • All user input is escaped to prevent XSS

Future Enhancements

  • Database persistence (currently in-memory)
  • Item editing/deletion
  • Advanced statistics and visualizations
  • Batch item imports (CSV, JSON)
  • Social features (comments, sharing)
  • Dark mode

License

MIT (or your preferred license)