mirror of
https://gitlab.w-hs.de/an14051/backerup-website.git
synced 2026-07-27 17:35:29 +00:00
37e916594e5bf68b4b2adc47ac62d2c53239fb5c
Backerup Website
The official website and sharing hub for Backerup — a self-hosted Docker container backup tool.
Browse community-shared container configs and .backerup snapshots, upload your own, and copy restore commands in seconds.
Features
- Browse & search — filter shared files by type, group, name, image, or description
- Upload & share — share
.backerupsnapshots and.jsoncontainer configs via a unique link - One-click restore snippet — Docker run commands generated from uploaded configs
- Authentication — JWT-based sessions with scrypt password hashing and rate-limited login
- Admin panel — create, delete, and manage user accounts with role-based access
- Security headers —
X-Frame-Options,HSTS,CSP-ready, and more on every response
Quick Start (Development)
Prerequisites: Bun >= 1.0
cd frontend
bun install
bun run dev
The site is available at http://localhost:3000.
Auth is disabled in dev mode when
AUTH_SECRETis not set — all routes are open. SetAUTH_SECRETandADMIN_PASSWORDto test the full login flow locally.
Deployment
See SETUP.md for full Docker deployment instructions, environment variable reference, and first-login steps.
Project Structure
frontend/
app/
page.tsx # Landing page
browse/ # Browse & search shared files
share/ # Upload form
files/[token]/ # Individual file detail + download
login/ # Login page
admin/ # Admin user management panel
api/
auth/ # POST /login, POST /logout
files/ # GET file list, GET/download by token
upload/ # POST file upload
admin/users/ # Admin user CRUD
components/ # AnimateIn, CountUp, SpotlightCard, TerminalTyper, LogoutButton
lib/
auth.ts # scrypt password hashing
session.ts # JWT session create/verify/delete
users.ts # User CRUD (stored in data/users.json)
store.ts # File metadata + upload storage
links.ts # Centralised external URL config
data/ # Runtime data (gitignored except .gitkeep)
meta.json # File record index
users.json # User accounts (hashed credentials only)
uploads/ # Uploaded files organised by token
docker/
Dockerfile # Multi-stage build (deps → builder → slim runner)
docker-compose.yml # Single-service compose with named volume
build.sh # Build helper
deploy.sh # Deploy helper
Link Configuration
All external URLs (GitHub, Docker image, docs) live in one place:
frontend/lib/links.ts
Edit that file and every button, footer link, and terminal snippet updates automatically.
Tech Stack
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router, standalone output) |
| Runtime | Bun |
| Styling | Tailwind CSS v4 + custom CSS animations |
| Auth | scrypt (Node crypto) + HS256 JWT (jose) |
| Storage | Local filesystem (JSON index + raw files) |
| Container | Docker multi-stage, non-root user |
Description
Languages
TypeScript
94.5%
CSS
3.6%
Dockerfile
1%
Shell
0.7%
JavaScript
0.2%