Getting Started
Use this guide to run AuctioHub locally and verify core workflows.
Prerequisites
- Node.js 20.x LTS (recommended)
- npm 10+ (or your team-approved package manager)
- PostgreSQL 14+
- Git
- Stripe test account credentials
- Google OAuth credentials for local callback testing
Local Setup
1. Clone And Install
git clone <repository-url>
cd docs.auctiohub
npm install
2. Create Environment File
Create .env.local in the project root.
NODE_ENV=development
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=<long-random-secret>
GOOGLE_CLIENT_ID=<google-client-id>
GOOGLE_CLIENT_SECRET=<google-client-secret>
DATABASE_URL=postgresql://<user>:<password>@<host>:5432/<db>
DATABASE_SSL=false
CLOUDINARY_CLOUD_NAME=<cloud-name>
CLOUDINARY_API_KEY=<api-key>
CLOUDINARY_API_SECRET=<api-secret>
STRIPE_SECRET_KEY=<stripe-secret>
STRIPE_WEBHOOK_SECRET=<stripe-webhook-secret>
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=<stripe-publishable>
ADMIN_EMAILS=admin1@example.com,admin2@example.com
3. Initialize Database
Run your schema and setup scripts in this order:
npm run db:schema
npm run db:setup
npm run db:migrate
If your repository uses different script names, use the equivalents defined in package.json.
4. Start The App
npm run dev
Open http://localhost:3000.
First Smoke Test Checklist
Validate the following routes and behaviors:
- Home page loads with featured content.
- Category browsing and auction detail pages open.
- Sign-in succeeds with Google auth.
- User dashboard is accessible for signed-in users.
- Admin dashboard is blocked for non-admin users.
- Admin dashboard is accessible for configured admin accounts.
- Bid submission rejects values not greater than current price.
- Winner can access payment flow; non-winner cannot.
Common Setup Issues
- OAuth callback mismatch: verify
NEXTAUTH_URLand Google redirect URI. - Database connection error: verify
DATABASE_URLand SSL flag. - Missing media or upload failures: verify Cloudinary variables.
- Payment test failures: verify Stripe secret and webhook secret values.