Configuration
This guide explains all the environment variables used by ReResell.
Required Variables
Database
The PostgreSQL connection string. We recommend using Neon for serverless PostgreSQL.
Authentication
NEXTAUTH_URL: Your application URL (usehttp://localhost:3000for development)NEXTAUTH_SECRET: A random string for encrypting tokens. Generate with:
Optional Variables
Google OAuth
GOOGLE_CLIENT_ID="your-client-id.apps.googleusercontent.com"
GOOGLE_CLIENT_SECRET="your-client-secret"
To enable Google sign-in:
- Go to Google Cloud Console
- Create a new project or select existing
- Enable the Google+ API
- Go to Credentials → Create Credentials → OAuth Client ID
- Set authorized redirect URIs:
- Development:
http://localhost:3000/api/auth/callback/google - Production:
https://your-domain.com/api/auth/callback/google
Image Storage (Vercel Blob)
For image uploads:
- Go to Vercel Dashboard
- Select your project → Storage → Create Database → Blob
- Copy the
BLOB_READ_WRITE_TOKEN
Real-time Chat (Pusher)
PUSHER_APP_ID="your-app-id"
PUSHER_KEY="your-key"
PUSHER_SECRET="your-secret"
PUSHER_CLUSTER="us2"
NEXT_PUBLIC_PUSHER_KEY="your-key"
NEXT_PUBLIC_PUSHER_CLUSTER="us2"
For real-time messaging:
- Create an account at Pusher
- Create a new Channels app
- Copy the credentials from App Keys
Environment File Example
# Database (Neon PostgreSQL)
DATABASE_URL="postgresql://neondb_owner:xxx@ep-xxx.neon.tech/neondb?sslmode=require"
# NextAuth.js
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your-generated-secret-key"
# Google OAuth (optional)
GOOGLE_CLIENT_ID=""
GOOGLE_CLIENT_SECRET=""
# Pusher (optional)
PUSHER_APP_ID=""
PUSHER_KEY=""
PUSHER_SECRET=""
PUSHER_CLUSTER=""
NEXT_PUBLIC_PUSHER_KEY=""
NEXT_PUBLIC_PUSHER_CLUSTER=""
# Vercel Blob Storage (optional)
BLOB_READ_WRITE_TOKEN=""
Production Considerations
Security
Never commit your .env file to version control. It's already in .gitignore.
For production deployments:
- Use strong, randomly generated secrets
- Update
NEXTAUTH_URLto your production domain - Update Google OAuth redirect URIs
- Consider using environment variable encryption