A production-ready, full-stack marketplace template with auctions, real-time messaging, and multi-auth. Built with Next.js 15, Supabase, and TypeScript.
- User authentication (Google/Facebook OAuth via Supabase Auth)
- User profiles with reputation system
- Listing management (create, edit, delete)
- Both fixed-price and auction listings
- Category-based browsing with SEO optimization
- Full-text search (multi-language support included)
- Favorites/Watchlist functionality
- Image uploads with Supabase Storage
- Real-time Auctions - Live bidding with countdown timers
- Boost System - PayPal integration for promoted listings
- i18n Support - Built-in internationalization (English + Khmer example)
- Progressive Enhancement - Feature flags to toggle functionality
- Row Level Security - Database-level security policies
- Centralized configuration (
lib/config/branding.ts) - Electronics categories as example (easily customizable)
- Clean, well-documented codebase
- TypeScript throughout for type safety
- shadcn/ui components for consistent design
Frontend:
- Next.js 15 (App Router)
- React 19
- TypeScript 5
- Tailwind CSS
- shadcn/ui (Radix UI)
- i18next
Backend:
- Next.js Server Actions
- Supabase Auth
- PostgreSQL (Supabase)
Features:
- Row Level Security (RLS)
- Full-text search (pg_trgm)
- OAuth authentication
- Real-time updates
- Node.js 18+
- Supabase account (free tier works)
- OAuth apps (Google/Facebook)
git clone repo
cd repo
npm installCreate .env.local:
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
NEXT_PUBLIC_APP_URL=http://localhost:3000
NODE_ENV=developmentRun migrations in Supabase:
# Using Supabase CLI
supabase link --project-ref your-project-ref
supabase db push
# Or copy SQL from supabase/migrations/ to Supabase SQL EditorSet up Google and Facebook OAuth in Supabase Dashboard → Authentication → Providers
npm run dev # Starts Next.js development server (port 3000)Visit http://localhost:3000
Edit lib/config/branding.ts:
export const SITE_CONFIG = {
name: "Your Marketplace Name",
tagline: "Your tagline here",
currency: "USD",
// ... more settings
}Edit lib/constants/categories.ts to add your own categories. Current template uses electronics as an example.
Toggle features in components or centralize in config:
const ENABLE_AUCTIONS = true;
const ENABLE_MESSAGING = true;- Global styles:
app/globals.css - Theme colors:
tailwind.config.ts - shadcn/ui components:
components/ui/
├── app/ # Next.js app directory
│ ├── actions/ # Server actions
│ ├── auth/ # Authentication pages
│ ├── api/ # API routes
│ └── page.tsx # Homepage
├── components/ # React components
│ ├── ui/ # shadcn/ui components
│ └── ... # Feature components
├── lib/ # Utilities
│ ├── config/ # Site configuration
│ ├── constants/ # Categories, brands, etc.
│ ├── hooks/ # React hooks
│ ├── queries/ # Database queries
│ └── supabase.ts # Supabase client
├── supabase/
│ └── migrations/ # Database schema
├── public/ # Static assets
└── package.json
8 tables with Row Level Security:
users- User profileslistings- Products (fixed-price + auction)images- Product imagesauctions- Auction metadatabids- Bid historyboosts- Promoted listingstransactions- Payment recordsreports- Moderation
Features:
- Automatic timestamps
- Full-text search indexes
- 20+ performance indexes
- RLS policies on all tables
npm run buildDeploy to Vercel and configure environment variables.
Supabase handles PostgreSQL hosting. Update production environment variables.
npm run dev # Next.js dev server (port 3000)
npm run build # Production build
npm run start # Production server
npm run lint # ESLint
npm run test:db # Test database connection- Development server currently hangs during initialization - to be fixed
| Feature | Status |
|---|---|
| Authentication | Complete |
| Listings CRUD | Complete |
| Auctions | Complete |
| Search | Complete |
| Favorites | Complete |
| Boost System | Complete (PayPal) |
| Messaging | Planned |
| Notifications | Planned |
| Admin Panel | Planned |
DEVELOPMENT_HISTORY.md- Complete development historylib/config/branding.ts- Configuration optionslib/constants/categories.ts- Category customization
MIT License - see LICENSE file for details
For questions or issues, please open a GitHub issue.
Contributions welcome! Please open an issue or PR.
Built with Next.js, Supabase, and TypeScript