No description
Find a file
Josh ac04d7f346 chore(deps): update auth middleware and dependencies
- Add OptionalSessionMiddleware for non-required auth checks
- Add GetUserID helper function
- Update import paths in auth and main
- Update docker-compose with frontend build configuration
- Clean up go.mod and go.sum

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 02:06:20 +02:00
.woodpecker Disable CDN caching for HTML, add Quicklink prefetching 2026-01-09 22:02:47 +02:00
frontends refactor: move studio to frontends workspace 2026-01-12 02:06:19 +02:00
internal chore(deps): update auth middleware and dependencies 2026-01-12 02:06:20 +02:00
.air.toml init 2026-01-09 00:16:46 +02:00
.env.example init 2026-01-09 00:16:46 +02:00
.gitignore init 2026-01-09 00:16:46 +02:00
docker-compose.yml chore(deps): update auth middleware and dependencies 2026-01-12 02:06:20 +02:00
Dockerfile fix: update Dockerfile to Go 1.24 2026-01-09 02:49:21 +02:00
go.mod chore(deps): update auth middleware and dependencies 2026-01-12 02:06:20 +02:00
go.sum chore(deps): update auth middleware and dependencies 2026-01-12 02:06:20 +02:00
main.go chore(deps): update auth middleware and dependencies 2026-01-12 02:06:20 +02:00
Makefile init 2026-01-09 00:16:46 +02:00
MONETIZATION.md init 2026-01-09 00:16:46 +02:00
README.md init 2026-01-09 00:16:46 +02:00

WriteKit - Local Development

Prerequisites

  • Docker & Docker Compose
  • GitHub OAuth App (for login)

Setup GitHub OAuth

  1. Go to https://github.com/settings/developers
  2. New OAuth App:
    • Name: WriteKit Local
    • Homepage: http://writekit.lvh.me
    • Callback: http://writekit.lvh.me/auth/github/callback
  3. Copy Client ID and Secret

Run

# Set OAuth credentials
export GITHUB_CLIENT_ID=your_client_id
export GITHUB_CLIENT_SECRET=your_client_secret

# Start
docker compose up --build

Or create .env file:

GITHUB_CLIENT_ID=your_client_id
GITHUB_CLIENT_SECRET=your_client_secret

Access

Create a demo

curl -X POST http://writekit.lvh.me/api/demo

Returns subdomain like demo-abc123.writekit.lvh.me - works automatically, no hosts file needed.

Environment Variables

Required

Variable Description
DATABASE_URL PostgreSQL connection string
DOMAIN Base domain
BASE_URL Full URL for OAuth callbacks
SESSION_SECRET Cookie encryption (32+ chars)
GITHUB_CLIENT_ID GitHub OAuth client ID
GITHUB_CLIENT_SECRET GitHub OAuth secret

Optional

Variable Description
GOOGLE_CLIENT_ID/SECRET Google OAuth
DISCORD_CLIENT_ID/SECRET Discord OAuth
R2_* Cloudflare R2 storage
IMAGINARY_URL Image processing service
CLOUDFLARE_API_TOKEN/ZONE_ID Analytics