1.7 KiB
1.7 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: external OIDC JWT validation via JWKS
- 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 (enabled by default in .env.example).
In this mode, protected routes always authenticate as:
sub:demo-user-001email:demo@example.comname:Demo User
OIDC variables are not required when DEV_MODE=true.
Auth flow
When DEV_MODE=false, login is handled directly by the app:
GET /auth/loginredirects to your OIDC providerGET /auth/callbackexchanges code for access token usingOIDC_CLIENT_ID+OIDC_CLIENT_SECRET- Access token is stored in secure HttpOnly session cookie
- Protected routes validate that token via JWKS
GET /auth/logoutclears the local session (and optionally redirects to provider logout URL)
Key routes
GET /dashboard: upload formGET /skills: browse listings and buyGET /my-skills: purchased skills and copy/download accessGET /auth/login: start OIDC loginGET /auth/callback: OIDC callbackGET /auth/logout: logoutPOST /api/upload: upload and list a skillPOST /api/purchase: buy a skillGET /api/my-skills: owned purchased listGET /uploads/:id: download unlocked skill file