# Project Setup Guide
This repository contains **frontend** and **backend** folders.
Follow the steps below to clone, set up, and run the project.
---
## Step 1: Clone the Repository
```bash
git clone https://github.com/PECATHON/21_Works-on-my-machine.git
cd 21_Works-on-my-machine/PECATHONYou will see:
/backend
/frontend
cd backendnpm installCreate a file named .env inside the backend folder:
DATABASE_URL=postgresql://postgres:YOUR_PASSWORD@localhost:5432/realworld
JWT_SECRET=your-super-secret-jwt-key-change-this
NODE_ENV=developmentReplace:
YOUR_PASSWORD→ your PostgreSQL passwordyour-super-secret-jwt-key-change-this→ any strong random key
- Install PostgreSQL → https://www.postgresql.org/download/
- Create a database named realworld:
CREATE DATABASE realworld;# Generate Prisma client
npx prisma generate
# Apply migrations
npx prisma migrate deploy
# (Optional) Seed database
npx prisma db seednpx prisma migrate dev --name add-voting-system
npx prisma generatenpm startBackend URL:
http://localhost:3000
cd frontendnpm installnpm startFrontend will run on:
http://localhost:3001
(or whichever port React selects)