Development Setup
Get your development environment ready to work on TrendGate.
Prerequisites​
Required Software​
- Node.js 18.x or higher
- pnpm 8.x or higher
- Git 2.x or higher
- PostgreSQL 14.x or higher
Recommended Tools​
- VS Code or Cursor IDE
- Docker Desktop
- PostgreSQL client (pgAdmin, TablePlus)
- Postman or similar API tool
Initial Setup​
1. Clone Repository​
git clone https://github.com/trendgate/trendgate.git
cd v0-swim-instructor
2. Install Dependencies​
pnpm install
3. Environment Setup​
# Copy example environment file
cp apps/web/.env.example apps/web/.env.local
# Update with your values:
# - DATABASE_URL
# - CLERK_SECRET_KEY
# - NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
4. Database Setup​
# Generate Prisma client
pnpm db:generate
# Push schema to database
pnpm db:push
# Seed with test data
pnpm db:seed
Running the Application​
Development Mode​
# Run Next.js app (port 3000)
pnpm dev
# Run documentation (port 3001)
pnpm docs:dev
# Run everything
pnpm dev:all
Database Tools​
# Open Prisma Studio
pnpm db:studio
# Run migrations
pnpm db:migrate dev
# Reset database
pnpm db:reset
IDE Setup​
VS Code Extensions​
- ESLint
- Prettier
- Prisma
- Tailwind CSS IntelliSense
- GitLens
Cursor Environment​
# Environment is auto-configured
# See .cursor/environment.json
Troubleshooting​
Common Issues​
- Port conflicts: Change ports in package.json
- Database connection: Verify DATABASE_URL
- Missing dependencies: Run
pnpm install - Type errors: Run
pnpm type-check