Installation
Set up your development environment for Turbocamp
Prerequisites
Before getting started with Turbocamp, make sure you have the following installed:
- Node.js (v18 or higher)
- pnpm (recommended package manager)
- PostgreSQL (for local development)
- Git (for version control)
Turbocamp uses pnpm for package management. While npm and yarn will work, pnpm is recommended for optimal performance.
Quick Start
Clone the Repository
git clone https://github.com/turbocamp/turbocamp.git
cd turbocampInstall Dependencies
pnpm installThis will install all dependencies for the monorepo, including all apps and packages.
Set Up Environment Variables
Create environment files for each application:
# Root environment file
cp .env.example .env.local
# API environment file
cp apps/api/.env.example apps/api/.env.local
# Web app environment file
cp apps/web/.env.example apps/web/.env.local
# Dashboard environment file
cp apps/dashboard/.env.example apps/dashboard/.env.localSet Up Database
Create a local PostgreSQL database:
createdb turbocampUpdate the database URL in packages/db/.env:
DATABASE_URL="postgresql://username@localhost:5432/turbocamp"Run database migrations:
pnpm migrateStart Development Servers
Start all applications in development mode:
pnpm devThis will start:
- Web app: http://localhost:3000
- Dashboard: http://localhost:3001
- API server: http://localhost:3002
- Email templates: http://localhost:3003
- Documentation: http://localhost:3004
Development Commands
Here are the most commonly used commands:
# Start all development servers
pnpm dev
# Build all applications
pnpm build
# Run tests
pnpm test
# Lint code
pnpm lint
# Format code
pnpm format
# Type checking
pnpm typecheck
# Database commands
pnpm db:studio # Open Prisma Studio
pnpm migrate # Run database migrations
# Clean installation
pnpm clean # Remove all node_modules
pnpm install # Reinstall dependenciesTroubleshooting
Port Already in Use
If you get port errors, make sure no other applications are running on the default ports (3000-3004).
Database Connection Issues
- Ensure PostgreSQL is running
- Check database URL in environment files
- Verify database exists:
psql -l | grep turbocamp
Build Errors
- Clear build cache:
pnpm clean - Reinstall dependencies:
pnpm install - Check Node.js version:
node --version
For more detailed troubleshooting, see the Troubleshooting section.
Next Steps
Now that you have Turbocamp running locally, you can: