Installation
This guide will help you set up ReResell on your local machine.
Prerequisites
Before you begin, ensure you have the following installed:
- Node.js 18.0 or higher
- npm or yarn package manager
- Git for version control
You'll also need:
- A PostgreSQL database (we recommend Neon for serverless PostgreSQL)
- A Vercel account (optional, for image uploads)
- A Pusher account (optional, for real-time chat)
Step 1: Clone the Repository
Step 2: Install Dependencies
This will install all required dependencies including:
- Next.js and React
- Prisma ORM
- NextAuth.js
- Tailwind CSS and shadcn/ui components
- And other supporting libraries
Step 3: Set Up Environment Variables
Copy the example environment file:
Edit the .env file with your credentials. See the Configuration guide for details on each variable.
Step 4: Set Up the Database
Using Neon (Recommended)
- Create a free account at neon.tech
- Create a new project
- Copy the connection string to your
.envfile
Push the Schema
This creates all the necessary database tables.
Seed Sample Data
This populates the database with:
- 8 categories
- 3 test users
- 10 sample listings
Step 5: Start the Development Server
Open http://localhost:3000 in your browser.
Troubleshooting
Database Connection Issues
If you see connection errors:
- Verify your
DATABASE_URLis correct - Ensure your database allows connections from your IP
- Check that SSL mode is set correctly (
?sslmode=require)
Build Errors
If you encounter build errors:
# Clear Next.js cache
rm -rf .next
# Regenerate Prisma client
npx prisma generate
# Rebuild
npm run build