Files
AppFlowy-Web/doc/DEVELOPMENT_GUIDE.md
2025-06-09 16:24:56 +08:00

2.7 KiB

🎯 Overview

AppFlowy Web requires AppFlowy Cloud as its backend. You can set up this pair in two ways:

  • 🛠️ Development Mode (dev.env) - For local development and testing
  • 🚀 Production Mode (deploy.env) - For production deployments with Docker

📋 Prerequisites

Before you begin, ensure you have:

  • Node.js ≥18.0.0
  • pnpm ≥10.9.0
  • Docker & Docker Compose (required for both modes)

🛠️ Development Mode Setup

Best for: Local development, testing, and debugging individual services.

Step-by-Step Setup

1. Set Up AppFlowy Cloud (Development)

💡 Tip: The generate_env.sh script creates a proper .env file with all necessary configurations. Check the AppFlowy Cloud README for more details.

# Clone AppFlowy Cloud repository
git clone https://github.com/AppFlowy-IO/AppFlowy-Cloud.git
cd AppFlowy-Cloud

# Use development configuration
# The `generate_env.sh` script creates a proper `.env` file with all necessary configurations. 
./script/generate_env.sh 

# Start development server
# For new setup - RECOMMENDED FOR FIRST TIME
./script/run_local_server.sh --reset

# Or run (interactive prompts for container management)
./script/run_local_server.sh

2. Set Up AppFlowy Web (Development)

# In a new terminal, navigate to your AppFlowy Web directory
cd /path/to/appflowy-web
cp dev.env .env

# Install dependencies and start
corepack enable
pnpm install
pnpm run dev

🚀 Production Mode Setup

Best for: Production deployments, staging environments, and containerized setups.

1. Set Up AppFlowy Cloud (Production)

# Clone AppFlowy Cloud repository
git clone https://github.com/AppFlowy-IO/AppFlowy-Cloud.git
cd AppFlowy-Cloud

# Use production configuration
# The `generate_env.sh` script creates a proper `.env` file with all necessary configurations. 
./script/generate_env.sh 

# Start with Docker Compose
docker compose up -d

2. Set Up AppFlowy Web (Production)

# In a new terminal, navigate to your AppFlowy Web directory
cd /path/to/appflowy-web

# Use matching production configuration
cp deploy.env .env

# Install dependencies and start
corepack enable
pnpm install
pnpm run dev

🔗 Additional Resources