Solo Workflow
Last updated on: November 5, 2025
Every time you come back to work on a project based off of Yugen, start your development environment as follows:
1. Frontend Web Server
In one terminal, run the following command:
bun run devThis uses TurboRepo TUI to start the web server, Convex backend, and Fumadocs in one go.
Your app will be running at:
- App:
http://localhost:3002(web server) - Cloudflare Workers:
http://localhost:3001(Cloudflare Workers dev server) - Docs:
http://localhost:4000
2. Cloudflare Workers Dev Server
In another terminal, from the apps/web/ directory:
bun alchemy devMake sure you're in the apps/web/ directory (where alchemy.run.ts exists).
3. Webhook Testing
In another terminal, run the following command:
ngrok http 3002You only need to run ngrok when testing webhooks (payments only). Use port 3002 (web server), not 3001 (Cloudflare Workers dev server).
If you do use ngrok, every time you run ngrok http 3002, it will generate a new URL so you need to update these locations:
-
Local Environment (
.env.convex.dev,packages/backend/.env.local,apps/web/.env.local):SITE_URL=https://new-ngrok-url.ngrok.app -
Apply to Convex:
bun run setup:convex:dev -
Polar.sh Webhook URL:
- Navigate to Polar Dashboard → Settings → Webhooks
- Update the webhook URL to use your new ngrok URL
-
Restart Servers:
# Stop both servers (Ctrl+C) and restart bun run dev # From root bun alchemy dev # From apps/web/
You may need to buy an ngrok pro plan because they limit usage for free users.
4. Build & Deploy
Now you can start building features or fixing bugs.
Once you're done and have tested locally:
# Deploy to production
bun run deployThis deploys your app to Cloudflare Workers and updates your Convex production environment.