PowerShell on Windows - Default shell for repo work, PNPM, tests, and git.
Git Bash for Windows - Required only for .sh scripts or POSIX-specific workflows; invoke it explicitly with C:\Program Files\Git\bin\bash.exe.
VS Code - Recommended IDE (or your preferred editor).
Stripe CLI - Recommended for local webhook testing.
Recommended VS Code Extensions
ESLint - Code linting.
Prettier - Code formatting.
TypeScript - Enhanced TypeScript support.
Tailwind CSS IntelliSense - Tailwind class autocomplete.
GitLens - Enhanced Git integration.
Required Accounts
GitHub - For code access.
Vercel - For deployment (optional for local dev).
Clerk - For authentication (get keys from team).
Cloud Service Developer Accounts.
Google Cloud Console (for Google Drive API).
Microsoft Azure (for OneDrive API).
Dropbox Developer Portal.
Initial Setup
1. Clone the Repository
git clone https://github.com/your-org/stratofusion.git
cd stratofusion
2. Verify The Native Shell And Install Dependencies
pnpm env:guard
pnpm install
The guard fails when the repo is opened through WSL or a WSL-mounted path.
3. Bootstrap the Local rclone Binary on Windows
On Windows, local fly-rclone now expects a pinned repo-local binary at fly-rclone/rclone.exe instead of relying on a globally installed rclone.exe.
pnpm rclone:bootstrap
pnpm rclone:check
The bootstrap script reads the pinned RCLONE_VERSION directly from fly-rclone/Dockerfile, downloads the matching upstream Windows zip, installs fly-rclone/rclone.exe, and verifies that local resolution points to that binary.
If you intentionally set RCLONE_PATH or FLY_RCLONE_PATH, pnpm rclone:check will flag that override because it bypasses the deterministic repo-local binary.
4. Set Up Environment Variables
Create .env.local file in the project root:
# Copy the main app templatecp .env.example.template .env.local
# Copy the Fly rclone template if you need the local servicecp fly-rclone/.env.example.template fly-rclone/.env
Edit .env.local with your credentials:
Review public/docs/CREDENTIAL_ROTATION_CHECKLIST.md before reusing any previously exposed secret.
.env.local is the local runtime source of truth. .env.development and .env.production are repo-side reference snapshots for the deployed environments and should not replace local values.
# App URLsNEXT_PUBLIC_SITE_URL=http://localhost:3000
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Database (local isolated Neon database)DATABASE_URL=postgresql://username:password@hostname/stratofusion-local?sslmode=require
# OAuth ConfigurationGOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GOOGLE_REDIRECT_URI=http://localhost:3000/api/google
ONEDRIVE_CLIENT_ID=your_onedrive_client_id
ONEDRIVE_CLIENT_SECRET=your_onedrive_client_secret
ONEDRIVE_REDIRECT_URI=http://localhost:3000/api/onedrive
DROPBOX_CLIENT_ID=your_dropbox_client_id
DROPBOX_CLIENT_SECRET=your_dropbox_client_secret
DROPBOX_REDIRECT_URI=http://localhost:3000/api/dropbox
# Clerk AuthenticationNEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
# Optional role assignments (server-only)ADMIN_USER_IDS=user_admin_clerk_id
DEV_USER_IDS=user_dev_clerk_id
# Stripe (test mode locally)NEXT_PUBLIC_STRIPE_ENABLED=true
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
STRIPE_PRICE_ID_FREE=price_...
STRIPE_PRICE_ID_PRO=price_...
STRIPE_PRICE_ID_UNLIMITED=price_...
# Rclone Service (optional for local dev)FLYIO_RCLONE_SERVICE_URL=http://127.0.0.1:3001
NEXT_PUBLIC_FLYIO_RCLONE_SERVICE_URL=http://127.0.0.1:3001
# Cron SecretCRON_SECRET=generate-a-unique-local-secret
# Sentry (server-side)SENTRY_DSN=https://examplePublicKey@o0.ingest.us.sentry.io/0
# Optional; defaults to NODE_ENVSENTRY_ENVIRONMENT=development
# Optional; defaults to VERCEL_GIT_COMMIT_SHA on VercelSENTRY_RELEASE=
On Vercel deployments, server console.error logs are forwarded to Sentry and tagged with Vercel deployment metadata automatically.
Role assignments are also server-only. Do not add NEXT_PUBLIC_ADMIN_USER_IDS or NEXT_PUBLIC_DEV_USER_IDS; the client resolves the current user role through the server.
Get credentials from:
Team lead or senior developer.
Team password manager.
Project documentation.
5. Set Up Database
# Push schema to the isolated local databasepnpm db:push
# Verify local environment isolation before starting the apppnpm env:doctor:local
# (Optional) Open Drizzle Studio to view databasepnpm db:studio
Use the local environment only against stratofusion-local. Do not point .env.local at the dev or prod database.
pnpm env:doctor:local checks that .env.local is localhost-only and flags shared Clerk, Stripe, database, or provider configuration when compared against the repo's dev snapshots or a dev env file you pass via --compare.
6. Start Development Servers
Terminal 1 - Next.js App:
pnpm dev
Terminal 2 - Rclone Service (optional):
pnpm rclone:check
cd fly-rclone
node server.js
Terminal 3 - Stripe webhook forwarding (optional, but recommended for billing work):
import{ createSuccessResponse, createErrorResponse,}from"~/lib/api-response";exportasyncfunctionGET(request:Request){try{const data =awaitfetchData();returncreateSuccessResponse(data);}catch(error){returncreateErrorResponse(error);}}