1.5 KiB
1.5 KiB
LLM Skill Marketplace
Go + Postgres marketplace where authenticated users can upload LLM skill files, sell them, and buyers can unlock and copy/download purchased skills.
Stack
- Backend: Go (
go run .) - Frontend: vanilla HTML/CSS/JS
- Database: Postgres
- Auth: Authentik forward auth (identity headers)
- Config: environment variables with
.envsupport
Run
- Copy
.env.exampleto.envand set values. - Start Postgres and create the target database.
- Install dependencies:
go mod tidy - Start server:
go run . - Open
http://localhost:8080.
Local dev mode (no auth setup)
Set DEV_MODE=true in .env.
In this mode, protected routes always authenticate as:
sub:demo-user-001email:demo@example.comname:Demo User
Forward auth flow (production)
When DEV_MODE=false, deploy this app behind Authentik forward auth.
The proxy/auth layer must validate authentication and pass identity headers to the app.
The app reads:
X-Authentik-Uid(required; fallbackX-Forwarded-User)X-Authentik-EmailX-Authentik-Name(fallbackX-Forwarded-Preferred-Username)
Key routes
GET /dashboard: upload formGET /skills: browse listings and buyGET /my-skills: purchased skills and copy/download accessPOST /api/upload: upload and list a skillPOST /api/purchase: buy a skillGET /api/my-skills: owned purchased listGET /uploads/:id: download unlocked skill file