No description
Find a file
Josh 119e3b7a6d feat(server): add owner-tools injection and inline code theme CSS
- Add owner-tools serving and injection for blog owners
- Inline code theme CSS in templates for soft reload support
- Update import paths from github.com/writekitapp to writekit
- Add optional session middleware for owner detection
- Update platform index with improved UI

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 feat(server): add owner-tools injection and inline code theme CSS 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 init 2026-01-09 00:16:46 +02:00
Dockerfile fix: update Dockerfile to Go 1.24 2026-01-09 02:49:21 +02:00
go.mod init 2026-01-09 00:16:46 +02:00
go.sum init 2026-01-09 00:16:46 +02:00
main.go init 2026-01-09 00:16:46 +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