Leadership Suite - Quick Start Guide
Get the Leadership Suite running in minutes with Cloudflare.
π Fastest Way to Deploy
Prerequisites
- Cloudflare account (free tier works)
- Node.js 18+ installed
- Git installed
1-Minute Setup
# Clone and install
git clone <your-repo-url>
cd leadership-legacy
npm install
# Install Wrangler CLI
npm install -g wrangler
# Login to Cloudflare
wrangler login
Database Setup (2 minutes)
# Create D1 database
wrangler d1 create leadership-legacy-db
# Update wrangler.toml with the database ID from output
# Run migrations
wrangler d1 execute leadership-legacy-db --file=./schema/schema.sql
wrangler d1 execute leadership-legacy-db --file=./migrations/0002_create_suite_schema.sql
wrangler d1 execute leadership-legacy-db --file=./migrations/0003_insert_demo_user.sql
R2 Storage Setup (1 minute)
# Create R2 bucket
wrangler r2 bucket create leadership-legacy-assets
Deploy Everything (2 minutes)
# Deploy with one command
./deploy-suite.sh
# Or manually:
wrangler deploy # Deploy Worker (API)
npm run build # Build Next.js
npx wrangler pages deploy out --project-name=leadership-legacy
Access Your Suite
- Visit the Pages URL shown in the deploy output
- Navigate to
/suite
- Login with demo user credentials (auto-configured)
π Local Development
# Start both servers
./scripts/dev-local.sh
# Or manually in separate terminals:
Terminal 1: wrangler dev --port 8787
Terminal 2: npm run dev
- Frontend: http://localhost:3000
- API: http://localhost:8787
- Suite: http://localhost:3000/suite
π± Test All Features
Documents
- β
Create new documents
- β
Edit and save
- β
Star favorites
- β
Sort and filter
Sheets
- β
Create spreadsheets
- β
Import CSV
- β
Grid/list views
Slides
- β
Create presentations
- β
Templates
- β
Preview slides
Drive
- β
Upload files
- β
Create folders
- β
Move/rename files
- β
Storage quota tracking
Photos
- β
Upload images
- β
Gallery grid
- β
Albums
Calendar
- β
Create events
- β
Month/week/day views
- β
Event details
Mail
- β
Compose emails
- β
Save drafts
- β
Inbox management
- β
Read/unread status
Meet
- β
Create meetings
- β
Join by code
- β
Schedule meetings
Tasks
- β
Kanban board
- β
Drag & drop
- β
Status tracking
- β
Priority levels
π¨ Customization
Branding
Edit src/app/globals.css for colors and themes.
Add Authentication
See SUITE_DEPLOYMENT_GUIDE.md for auth integration.
Custom Domain
Configure in Cloudflare Pages dashboard.
π Troubleshooting
API calls return 404
- Check
_routes.json is in public folder
- Verify Worker URL in environment variables
- Check Worker is deployed:
wrangler deployments list
Database errors
- Ensure migrations ran successfully
- Check database ID in
wrangler.toml
- Test query:
wrangler d1 execute leadership-legacy-db --command="SELECT * FROM users"
File uploads fail
- Verify R2 bucket exists:
wrangler r2 bucket list
- Check R2 binding in
wrangler.toml
π Next Steps
- Security: Add authentication (Cloudflare Access, Auth0)
- Analytics: Enable Cloudflare Web Analytics
- Monitoring: Set up Workers Analytics
- Custom Domain: Configure in Pages settings
- Rate Limiting: Add Worker rate limiting
π Youβre Done!
Your Leadership Suite is now live on Cloudflareβs global network with:
- β
300+ edge locations
- β
Automatic HTTPS
- β
DDoS protection
- β
Auto-scaling
- β
Zero servers to manage
π‘ Tips
- Use
wrangler tail to view Worker logs in real-time
- Use
wrangler dev --local for faster local development
- Check
wrangler deployments list to see deployment history
- Use D1 console in dashboard for database management
π Need Help?
- Check
SUITE_DEPLOYMENT_GUIDE.md for detailed instructions
- Visit Cloudflare Workers docs: https://developers.cloudflare.com/workers/
- Review Next.js docs: https://nextjs.org/docs
Built with β€οΈ using Cloudflare Workers, Pages, D1, and R2