Prerequisites
Before you begin, make sure you have the following installed:- Node.js 20.x or higher
- npm, yarn, or pnpm package manager
- Git for version control
- A Supabase account (free tier works fine)
- A Cloudflare account (for deployment)
Clone the Repository
First, clone the JCV Fitness repository:Install Dependencies
Configure environment variables
Copy the example environment file and configure your variables:See Environment Variables for detailed configuration.
Set up database
Run the Supabase migrations to set up your database schema:See Database Setup for complete instructions.
Development Server
Start the Next.js development server:Available Scripts
Here are all the available npm scripts:| Script | Command | Description |
|---|---|---|
| Development | npm run dev | Start Next.js development server |
| Build | npm run build | Build production-ready static export |
| Start | npm run start | Start production server (after build) |
| Lint | npm run lint | Run ESLint to check code quality |
| Test | npm test | Run Vitest tests in watch mode |
| Test (CI) | npm run test:run | Run tests once (for CI/CD) |
| Video Studio | npm run video:dev | Open Remotion Studio for video editing |
| Video Build | npm run video:build | Render horizontal promo video |
| Video Vertical | npm run video:build:vertical | Render vertical promo video |
| Video Still | npm run video:still | Render single frame from video |
Tech Stack Overview
JCV Fitness is built with:- Frontend: Next.js 16, React 19, TypeScript
- Styling: Tailwind CSS 4
- State Management: Zustand 5
- Authentication: Supabase Auth (magic links)
- Database: Supabase PostgreSQL with RLS
- Payments: MercadoPago (primary), Wompi (future)
- Hosting: Cloudflare Pages (static export)
- Workers: Cloudflare Workers (webhook handling)
- Video: Remotion for promotional content
- Validation: Zod for type-safe schemas
- Testing: Vitest + Testing Library
Project Structure
Verify Installation
Run the build
Ensure everything compiles correctly:You should see a successful static export to the
out/ directory.Next Steps
Environment Variables
Configure your Supabase, MercadoPago, and other environment variables
Database Setup
Set up your Supabase database with migrations and RLS policies
Troubleshooting
Port 3000 already in use
If port 3000 is already in use, you can specify a different port:Module not found errors
Deletenode_modules and reinstall: