No description
Find a file
Josh c662e41b97
All checks were successful
ci/woodpecker/push/build Pipeline was successful
Disable CDN caching for HTML, add Quicklink prefetching
- Change Cache-Control from s-maxage=31536000 to max-age=0,must-revalidate
  for all HTML pages and sitemap (fixes stale content after settings change)
- Remove Cloudflare PurgeURLs call since we're not caching HTML at CDN
- Add Quicklink for client-side prefetching on public blog pages
- Make main branch deploy automatic (remove manual trigger)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 22:02:47 +02:00
.woodpecker Disable CDN caching for HTML, add Quicklink prefetching 2026-01-09 22:02:47 +02:00
internal Disable CDN caching for HTML, add Quicklink prefetching 2026-01-09 22:02:47 +02:00
studio fix: enable CI tests with build tags and add billing tests 2026-01-09 02:44:49 +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