Skip to content

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 magicsync

2. Install Dependencies

bash
pnpm install

3. Set Up Environment Variables

bash
cp .env-example .env

Edit .env with your configuration. Required variables:

  • DATABASE_URL - Turso database URL
  • DATABASE_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:migrate

5. Start the Development Server

bash
pnpm site:dev

The application will be available at http://localhost:3000

Available Commands

CommandDescription
pnpm devStart all dev servers
pnpm site:devStart main site (port 3000)
pnpm buildBuild all packages
pnpm site:buildBuild 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 dev

Docker Support

For containerized deployment:

bash
docker-compose up -d

See 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:dev

Database Connection Issues

  1. Verify DATABASE_URL in .env
  2. For Turso, verify your auth token
  3. Run migrations: cd packages/db && pnpm db:migrate

Dependencies Issues

bash
# Clean install
rm -rf node_modules pnpm-lock.yaml
pnpm install

For more help, see Development Setup or FAQ.

Released under the MIT License.