Installation
Prerequisites
Before you begin, make sure you have:
- Node.js 18+ (recommended: 20+)
- pnpm 8+ (or npm/yarn if preferred)
- Git for cloning the repository
Quick Setup
1. Clone the Repository
bash
git clone https://github.com/leamsigc/magicsync.git
cd magicsync2. Install Dependencies
bash
pnpm install3. Set Up Environment Variables
bash
cp .env-example .envEdit .env with your configuration. Required variables:
DATABASE_URL- Turso database URLDATABASE_AUTH_TOKEN- Turso auth token- Social media API keys (see Platform Keys)
4. Initialize the Database
bash
cd packages/db
pnpm db:generate
pnpm db:migrate5. Start the Development Server
bash
pnpm site:devThe application will be available at http://localhost:3000
Available Commands
| Command | Description |
|---|---|
pnpm dev | Start all dev servers |
pnpm site:dev | Start main site (port 3000) |
pnpm build | Build all packages |
pnpm site:build | Build main site |
Layer Development
Run individual layer packages:
bash
# Database layer
cd packages/db && pnpm dev
# UI layer
cd packages/ui && pnpm dev
# Any other layer
cd packages/[layer-name] && pnpm devDocker Support
For containerized deployment:
bash
docker-compose up -dSee Docker Setup for detailed configuration.
Troubleshooting
Port Already in Use
bash
# Find and kill the process on port 3000
lsof -ti:3000 | xargs kill -9
# Or use a different port
PORT=3001 pnpm site:devDatabase Connection Issues
- Verify
DATABASE_URLin.env - For Turso, verify your auth token
- Run migrations:
cd packages/db && pnpm db:migrate
Dependencies Issues
bash
# Clean install
rm -rf node_modules pnpm-lock.yaml
pnpm installFor more help, see Development Setup or FAQ.