Quick Start
This guide will get Flowstate Canvas running on your local machine. You’ll start the backend services, seed demo data, and launch both the web and desktop apps.
Contact your administrator for repository access, credentials, and environment setup details before following this guide.
Prerequisites
Section titled “Prerequisites”Before you begin, make sure you have these tools installed:
Required Software
Section titled “Required Software”- Docker Desktop: Version 20.10 or later. Download from docker.com.
- Node.js: Version 22 or later. Download from nodejs.org or use a version manager like nvm.
- pnpm: Version 10 or later. Install with
npm install -g pnpmorbrew install pnpmon macOS. - just: Command runner for development tasks. Install with
brew install juston macOS orcargo install justif you have Rust installed. - Secrets management tooling: Required to inject development secrets. Contact your administrator for setup instructions.
Verify Installation
Section titled “Verify Installation”Run these commands to verify everything is installed correctly:
docker --version# Should show: Docker version 20.10.0 or later
node --version# Should show: v22.0.0 or later
pnpm --version# Should show: 10.0.0 or later
just --version# Should show: 1.0.0 or laterIf any command fails, install the missing tool before continuing.
Secrets Setup
Section titled “Secrets Setup”Flowstate injects secrets at runtime via your team’s secrets management solution. This keeps sensitive values out of the repository while making development seamless.
Contact your administrator to:
- Gain access to the development secrets vault
- Configure your local secrets management tooling
- Verify you can resolve development credentials before proceeding
Clone the Repository
Section titled “Clone the Repository”If you haven’t already, clone the Flowstate Canvas repository:
git clone https://github.com/your-org/flowstate-canvas.gitcd flowstate-canvasInstall Dependencies
Section titled “Install Dependencies”Install all Node.js dependencies with pnpm:
pnpm installThis will install dependencies for all apps and packages in the monorepo. It may take a few minutes on the first run.
Start Services
Section titled “Start Services”Start all backend services with Docker:
just upThis command starts Docker containers for the backend, web app, database, cache, and object storage, then waits for services to become healthy.
Leave this terminal window open. The logs will stream here.
Verify Services
Section titled “Verify Services”Open a new terminal and check that all services are running:
docker compose psYou should see all containers in the “Up” state.
Initialize the Database
Section titled “Initialize the Database”Push the Prisma schema to the database:
just db-pushThis creates all collections and indexes. You’ll see output confirming the schema was applied.
Seed Demo Data
Section titled “Seed Demo Data”Populate the database with demo data:
just db-seedThis creates demo users, rooms, offices, and sample canvas data you can use to explore the platform. Contact your administrator for the demo account credentials.
Access the Web App
Section titled “Access the Web App”Open your browser and navigate to the web app URL configured for your environment (see your administrator for the local URL). Sign in with one of the demo accounts provided during setup.
After signing in, you’ll land on the canvas. You should see several tiles representing Rooms, Offices, and other entities. Try clicking, dragging, and interacting with them.
Start the Desktop App
Section titled “Start the Desktop App”The desktop app runs outside Docker (it needs GPU and display access). Start it with:
just desktopThis launches the Electron app in development mode. The app will open in a new window. Sign in with the same demo account you used for the web app.
The desktop app connects to the same backend services, so your canvas state syncs between web and desktop.
Service Overview
Section titled “Service Overview”When running locally, the following services are available (exact URLs depend on your environment configuration — see your administrator):
| Service | Purpose |
|---|---|
| Web App | Main web interface |
| Desktop SPA | Electron renderer dev server |
| Backend REST API | Internal REST API (proxied by web) |
| RPC Gateway | Public RPC API (used by desktop) |
| MongoDB | Database |
| Redis | Cache and pub/sub |
| Object Storage | File storage (MinIO or S3) |
| Prisma Studio | Database GUI (when running) |
Common Commands
Section titled “Common Commands”Here are the most useful just commands for daily development:
Service Management
Section titled “Service Management”just up # Start all servicesjust down # Stop all servicesjust restart # Restart all servicesjust rebuild # Rebuild Docker images (use after dependency changes)just logs # View logs from all servicesjust logs-backend # View backend logs onlyjust logs-web # View web logs onlyDatabase
Section titled “Database”just db-push # Push Prisma schema to MongoDBjust db-seed # Seed demo datajust db-studio # Open Prisma Studiojust db-reset # Reset database (WARNING: deletes all data)just db-generate # Regenerate Prisma clientDesktop App
Section titled “Desktop App”just desktop # Start desktop app in dev modejust desktop-restart # Restart desktop appjust desktop-stop # Stop desktop appShell Access
Section titled “Shell Access”just shell-backend # Open shell in backend containerjust shell-db # Open database shelljust redis-cli # Open Redis CLIType Checking
Section titled “Type Checking”# Run TypeScript checks in Docker containersdocker compose exec backend pnpm tsc --noEmitdocker compose exec web pnpm astro checkBuilding
Section titled “Building”# Build apps in Docker containersdocker compose exec backend pnpm builddocker compose exec web pnpm buildTroubleshooting
Section titled “Troubleshooting”Secrets / Environment Errors
Section titled “Secrets / Environment Errors”Problem: Services fail to start with missing environment variable errors.
Solution: Verify your secrets management tooling is configured correctly and you have access to the development vault. Contact your administrator if access is missing.
Docker Issues
Section titled “Docker Issues”Problem: Containers fail to start or show “unhealthy” status.
Solution:
- Check Docker Desktop is running
- Verify you have enough resources allocated (4GB RAM minimum, 8GB recommended)
- Stop all containers:
just down - Remove volumes:
docker compose down -v - Rebuild images:
just rebuild - Start again:
just up
Port Conflicts
Section titled “Port Conflicts”Problem: Services fail to start with “port already in use” errors.
Solution:
- Identify the conflicting process using
lsof -i :<port>with the port shown in the error - Stop the conflicting process or update the port mapping in
docker-compose.yml
Database Connection Errors
Section titled “Database Connection Errors”Problem: Backend logs show “failed to connect to MongoDB” or “ECONNREFUSED”.
Solution:
- Verify the database container is running:
docker compose ps mongodb - Check database logs:
docker compose logs mongodb - Try restarting the database:
docker compose restart mongodb - If that fails, reset the database:
just db-reset(WARNING: deletes all data)
Desktop App Won’t Start
Section titled “Desktop App Won’t Start”Problem: just desktop fails or the app crashes on launch.
Solution:
- Verify Node.js version:
node --version(must be 22+) - Reinstall dependencies:
pnpm install - Clear Electron cache:
rm -rf apps/desktop/.vite - Check the terminal logs for specific errors
Real-Time Sync Not Working
Section titled “Real-Time Sync Not Working”Problem: Changes don’t sync between web and desktop, or tiles don’t move in real-time.
Solution:
- Verify Redis is running:
docker compose ps redis - Check Redis logs:
docker compose logs redis - Test Redis connection:
just redis-clithen runPING(should return “PONG”) - Restart backend to reconnect to Redis:
docker compose restart backend
Build Errors After Pulling Changes
Section titled “Build Errors After Pulling Changes”Problem: After pulling new code, builds fail with missing dependencies or type errors.
Solution:
- Reinstall dependencies:
pnpm install - Regenerate Prisma client:
just db-generate - Rebuild Docker images:
just rebuild - Push schema changes:
just db-push - Restart all services:
just down && just up
Next Steps
Section titled “Next Steps”Now that Flowstate is running locally, here’s what to explore next:
Explore the Platform
Section titled “Explore the Platform”- Sign in with different demo accounts to see how multi-user collaboration works
- Create a new Room and add Sparks to it
- Set up an Office and invite other demo users
- Try moving tiles around the canvas and watch them sync between web and desktop
- Open the widget store and install a widget
Read the Documentation
Section titled “Read the Documentation”- Architecture Overview: Understand how the system is built
- The Canvas: Learn how the infinite canvas works
- Data Model: Explore the database schema and relationships
Start Developing
Section titled “Start Developing”- Check out the development guides in the sidebar
- Read
AGENTS.mdin the repository root for coding standards and workflows - Join the team chat to ask questions and share ideas
Getting Help
Section titled “Getting Help”If you run into issues not covered here:
- Check the logs:
just logsshows output from all services - Search the repository issues on GitHub
- Ask in the team Slack or Discord channel
- Review the
AGENTS.mdfile for detailed development guidelines
Welcome to Flowstate Canvas development. Happy building!