Modern SaaS monorepo for Sourceplane - Git-native control plane for cloud-native platforms.
sourceplane-ui/
βββ apps/
β βββ landing-page/ # Marketing landing page (Static HTML)
β βββ auth-frontend/ # Authentication console (React + Vite)
βββ services/
β βββ auth-worker/ # OAuth worker (Cloudflare Workers)
βββ packages/
β βββ auth-lib/ # Shared authentication library
βββ package.json # Root monorepo config
βββ wrangler.toml # Multi-app deployment
βββ deploy.sh # Deployment automation
βββ build.sh # Build automation
βββ dev.sh # Development startup
βββ README.md # This file
# Install dependencies
npm install
# Start all services
./dev.sh
# Services available at:
# - Landing Page: http://localhost:3001
# - Auth Frontend: http://localhost:3000
# - Auth Worker: http://localhost:8787# Build all apps
./build.sh
# Or build individual apps
npm run build:landing
npm run build:auth-frontend
npm run build:auth-worker# Deploy to staging (default)
./deploy.sh
# Deploy to production
ENVIRONMENT=production ./deploy.sh
# Deploy specific apps
npm run deploy:landing
npm run deploy:authTech Stack: Static HTML, Tailwind CSS, Vanilla JavaScript
Features:
- Modern SaaS UI with dark theme
- Navigation with login link
- Hero section with CTAs
- Feature showcase
- Responsive design
Deployment: Cloudflare Pages
- Production: https://sourceplane.ai
- Staging: https://staging.sourceplane.ai
Links to Console:
- Navigation: "Login to Console" button
- Hero: "Access Console" CTA
- CTA Section: "Start Building Now" button
Tech Stack: React 18, Vite, TypeScript, Tailwind CSS
Features:
- OAuth2 OIDC authentication
- Protected routes
- Session management
- Multi-provider support (Google, GitHub)
Deployment: Cloudflare Pages
- Production: https://console.sourceplane.ai
- Staging: https://staging-console.sourceplane.ai
Tech Stack: TypeScript, Cloudflare Workers, D1 Database, KV Storage
Features:
- OAuth2 authorization endpoint
- Session management
- Tenant isolation
- JWT token generation
Deployment: Cloudflare Workers
- Production: https://auth.sourceplane.ai
- Staging: https://staging-auth.sourceplane.ai
Landing Page (sourceplane.ai)
βββ Login Links β Auth Frontend (console.sourceplane.ai)
βββ CTA Buttons β GitHub
Auth Frontend (console.sourceplane.ai)
βββ OAuth Flow β Auth Worker (auth.sourceplane.ai)
βββ Session Management β KV Storage
βββ Dashboard β Protected Routes
./dev.sh # Start all services
npm run dev # Alternative
npm run dev -w @sourceplane/landing-page # Landing page only
npm run dev -w @sourceplane/auth-frontend # Auth frontend only./build.sh # Build all apps
npm run build # Alternative
npm run build:landing # Landing page only
npm run build:auth-frontend # Auth frontend only
npm run build:auth-worker # Auth worker only./deploy.sh # Deploy to staging
ENVIRONMENT=production ./deploy.sh # Deploy to production
npm run deploy:landing # Landing page only
npm run deploy:auth # Auth services onlyNo environment variables required (static HTML).
VITE_API_URL=https://auth.sourceplane.ai
VITE_FRONTEND_URL=https://console.sourceplane.ai
[env.production]
vars = {
ENVIRONMENT = "production",
GOOGLE_CLIENT_ID = "your-client-id",
GOOGLE_CLIENT_SECRET = "your-secret",
GITHUB_CLIENT_ID = "your-client-id",
GITHUB_CLIENT_SECRET = "your-secret",
FRONTEND_URL = "https://console.sourceplane.ai",
API_URL = "https://auth.sourceplane.ai"
}-
Cloudflare Account with:
- Cloudflare Pages projects
- Cloudflare Workers access
- D1 Database
- KV Namespace access
-
Wrangler CLI
npm install -g wrangler@latest wrangler login
-
OAuth Credentials
- Google OAuth Client ID/Secret
- GitHub OAuth Client ID/Secret (optional)
Before deploying:
- All code committed to main branch
-
npm installruns without errors -
npm run buildcompletes successfully - Environment variables configured
- Wrangler authenticated (
wrangler whoami) - D1 database created and migrations complete
- KV namespaces created with correct IDs
- OAuth credentials configured
Verify after deployment:
- Landing page accessible at domain
- Auth console reachable
- Login flow works end-to-end
- Error logs show no critical issues
- All CTAs link correctly
Install Node.js from https://nodejs.org
Run npm install to install dev dependencies.
wrangler logout
wrangler login- Check project name in
wrangler.tomlmatches Cloudflare Pages - Ensure Pages project is created in Cloudflare Dashboard
- Verify build command output has dist files
- Verify KV namespace IDs in
services/auth-worker/wrangler.toml - Check D1 database ID is correct
- Ensure environment variables are set
- Verify redirect URIs in OAuth provider settings match deployment URL
- Check environment variables for client ID/secret
- Review Worker logs in Cloudflare Dashboard
- Landing Page: < 50KB total
- Auth Frontend: Code-split with lazy loading
- Auth Worker: Edge computing with KV caching
- All secrets stored in environment variables
- Never commit
.envfiles - OAuth secrets rotated regularly
- CORS headers properly configured
- Rate limiting enabled on Workers
- Database access restricted
-
Create feature branch
git checkout -b feat/your-feature
-
Make changes in relevant app directory
-
Test locally
npm run dev
-
Build and verify
npm run build
-
Commit and push
git add . git commit -m "feat: description" git push origin feat/your-feature
-
Create pull request and get review
-
Merge and deploy
ENVIRONMENT=production ./deploy.sh
For issues:
- Check error logs in application
- Review Cloudflare Dashboard logs
- Verify environment configuration
- Check this README's troubleshooting section
MIT - Sourceplane Team
- GitHub: https://github.com/sourceplane
- Documentation: https://github.com/sourceplane/docs
- Community: https://discord.gg/sourceplane
- Email: hello@sourceplane.ai