The open-source CapCut alternative
Better README and docker-compose port error solved
Chirag-varu27da1838cc9e
diff --git a/README.md b/README.mdindex 17d74a33..b4f520d0 100644--- a/README.md+++ b/README.md@@ -45,70 +45,95 @@ Before you begin, ensure you have the following installed on your system:### Setup-1. **Clone the repository**+## Getting Started++1. Fork the repository+2. Clone your fork locally+3. Navigate to the web app directory: `cd apps/web`+4. Install dependencies: `bun install`+5. Start the development server: `bun run dev`++## Development Setup++### Prerequisites++- Node.js 18++- Bun (latest version)+- Docker (for local database)++### Local Development++1. Start the database and Redis services:++ ```bash+ # From project root+ docker-compose up -d+ ```++2. Navigate to the web app directory:- ```bash- git clone https://github.com/OpenCut-app/OpenCut.git- cd OpenCut- ```+ ```bash+ cd apps/web+ ```-2. **Start backend services**- From the project root, start the PostgreSQL and Redis services:+3. Copy `.env.example` to `.env.local`:- ```bash- docker-compose up -d- ```+ ```bash+ # Unix/Linux/Mac+ cp .env.example .env.local-3. **Set up environment variables**- Navigate into the web app's directory and create a `.env` file from the example:+ # Windows Command Prompt+ copy .env.example .env.local- ```bash- cd apps/web+ # Windows PowerShell+ Copy-Item .env.example .env.local+ ```+4. Configure required environment variables in `.env.local`:- # Unix/Linux/Mac- cp .env.example .env.local+ **Required Variables:**- # Windows Command Prompt- copy .env.example .env.local+ ```bash+ # Database (matches docker-compose.yaml)+ DATABASE_URL="postgresql://opencut:opencutthegoat@localhost:5432/opencut"- # Windows PowerShell- Copy-Item .env.example .env.local- ```+ # Generate a secure secret for Better Auth+ BETTER_AUTH_SECRET="your-generated-secret-here"+ BETTER_AUTH_URL="http://localhost:3000"- _The default values in the `.env` file should work for local development._+ # Redis (matches docker-compose.yaml)+ UPSTASH_REDIS_REST_URL="http://localhost:8079"+ UPSTASH_REDIS_REST_TOKEN="example_token"-4. **Install dependencies**- Install the project dependencies using `bun` (recommended) or `npm`.+ # Development+ NODE_ENV="development"+ ```- ```bash- # With bun- bun install+ **Generate BETTER_AUTH_SECRET:**- # Or with npm- npm install- ```+ ```bash+ # Unix/Linux/Mac+ openssl rand -base64 32-5. **Run database migrations**- Apply the database schema to your local database:+ # Windows PowerShell (simple method)+ [System.Web.Security.Membership]::GeneratePassword(32, 0)- ```bash- # With bun- bun run db:push:local+ # Cross-platform (using Node.js)+ node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"- # Or with npm- npm run db:push:local- ```+ # Or use an online generator: https://generate-secret.vercel.app/32+ ```-6. **Start the development server**+ **Optional Variables (for Google OAuth):**- ```bash- # With bun- bun run dev+ ```bash+ # Only needed if you want to test Google login+ GOOGLE_CLIENT_ID="your-google-client-id"+ GOOGLE_CLIENT_SECRET="your-google-client-secret"+ ```- # Or with npm- npm run dev- ```+5. Run database migrations: `bun run db:migrate` from (inside apps/web)+6. Start the development server: `bun run dev` from (inside apps/web)The application will be available at [http://localhost:3000](http://localhost:3000).diff --git a/docker-compose.yaml b/docker-compose.yamlindex e3fc55ac..1bce8507 100644--- a/docker-compose.yaml+++ b/docker-compose.yaml@@ -52,7 +52,7 @@ services:dockerfile: ./apps/web/Dockerfilerestart: unless-stoppedports:- - "3000:3000"+ - "3100:3000" # app is running on 3000 so we run this at 3100environment:- NODE_ENV=production- DATABASE_URL=postgresql://opencut:opencutthegoat@db:5432/opencut