This guide will walk you through setting up the Merge or Reject project from scratch. Follow these steps carefully to get your development environment ready.
-
Install required software:
- Node.js (v18 or higher)
- Git
- Visual Studio Code
- Cursor (AI-powered IDE)
-
Create accounts on:
-
Create a new repository on GitHub:
# Go to github.com # Click "New repository" # Name it "merge-or-reject" # Make it Public # Don't initialize with any files
-
Clone the repository locally:
git clone https://github.com/YOUR_USERNAME/merge-or-reject.git cd merge-or-reject
-
Copy all project files to your local repository:
# Copy all files from the downloaded project to your local repository # Make sure to include hidden files like .gitignore and .env.example
-
Initialize the repository:
git add . git commit -m "Initial commit" git push origin main
-
Create a
.env
file in the project root:cp .env.example .env
-
Get your API keys:
a. Clerk Setup:
- Go to clerk.dev
- Create a new application
- Go to API Keys
- Copy the "Publishable Key"
- Add to
.env
:VITE_CLERK_PUBLISHABLE_KEY=your_key
b. OpenAI Setup:
- Go to platform.openai.com
- Create an account/Login
- Go to API Keys
- Create a new key
- Add to
.env
:VITE_OPENAI_API_KEY=your_key
-
Install Convex CLI:
npm install -g convex
-
Initialize Convex:
npx convex init
- Follow the prompts to create a new Convex project
- Copy the deployment URL to
.env
-
Deploy the schema:
npx convex deploy
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open Cursor:
# Open the project in Cursor cursor .
-
Install Netlify CLI:
npm install -g netlify-cli
-
Initialize Netlify:
netlify init
- Choose "Create & configure a new site"
- Follow the prompts
-
Configure environment variables:
- Go to your Netlify site settings
- Navigate to "Environment variables"
- Add all variables from your
.env
file
-
Deploy:
netlify deploy --prod
Common issues and solutions:
-
Convex Connection Issues
- Ensure your Convex deployment URL is correct in
.env
- Check if
npx convex dev
is running
- Ensure your Convex deployment URL is correct in
-
Clerk Authentication Problems
- Verify your Clerk publishable key
- Make sure allowed URLs are configured in Clerk dashboard
-
Build Errors
- Clear the
.convex
directory:rm -rf .convex
- Reinstall dependencies:
npm install
- Retry deployment
- Clear the
- Make changes in Cursor
- Test locally with
npm run dev
- Commit changes:
git add . git commit -m "Description of changes" git push origin main
- Netlify will automatically deploy changes
- Check the GitHub repository issues
- Join our Discord community
- Review the troubleshooting guide above
- Consult the project documentation
Remember to never commit sensitive information like API keys to your repository. Always use environment variables for secrets.