Discover the freshest farmers' markets in Marin County. Browse market profiles, find local vendors, read reviews, and plan your next market visit.
- Next.js 16 (App Router, Server Components, Server Actions)
- TypeScript
- SQLite (via Prisma + better-sqlite3 adapter)
- Prisma 7 ORM
- NextAuth.js v4 (email/password credentials)
- Tailwind CSS v4 with custom Marin-inspired design tokens
- Zod v4 for validation
- Node.js 18+
- npm
# Install dependencies
npm install
# Generate Prisma client
npx prisma generate
# Run database migrations
npx prisma migrate dev
# Seed the database with Marin County market data
npx tsx prisma/seed.ts
# Start the dev server
npm run devOpen http://localhost:3000 in your browser.
Create a .env file in the project root:
DATABASE_URL="file:./dev.db"
NEXTAUTH_SECRET="your-secret-here"
NEXTAUTH_URL="http://localhost:3000"The seed script creates demo users you can sign in with:
- Email: sarah@example.com / Password: password123
- Email: marcus@example.com / Password: password123
- Home Page — Featured markets, open-today section, quick stats
- Market Browser — Filter by day, city, season; sort by rating, name, or vendor count
- Market Profiles — Overview, hours, vendor directory, and community reviews
- Vendor Profiles — Vendor details and list of markets they attend
- User Reviews — Star ratings, review form (requires sign-in)
- User Accounts — Edit profile, manage reviews
- Auth — Email/password registration and sign-in via NextAuth
src/
├── app/
│ ├── page.tsx # Home page
│ ├── layout.tsx # Root layout (fonts, nav, footer)
│ ├── globals.css # Tailwind + Marin design tokens
│ ├── markets/
│ │ ├── page.tsx # Market browser
│ │ ├── MarketGrid.tsx # Client-side filtering/sorting
│ │ └── [slug]/
│ │ ├── page.tsx # Market profile (SSR)
│ │ └── MarketProfile.tsx # Tabbed market UI
│ ├── vendors/[slug]/page.tsx # Vendor profile
│ ├── login/page.tsx # Sign in
│ ├── register/page.tsx # Create account
│ ├── account/ # User dashboard
│ ├── about/page.tsx # About page
│ └── api/
│ ├── auth/[...nextauth]/ # NextAuth route
│ ├── register/ # User registration
│ ├── reviews/ # Create review
│ ├── reviews/[id]/ # Delete review
│ └── account/ # Update profile
├── components/ # Shared UI components
├── lib/ # Prisma client, auth config, utils
└── generated/prisma/ # Generated Prisma client
The database comes pre-loaded with 9 real Marin County farmers' markets:
- San Rafael Thursday Evening Market
- San Rafael Sunday Civic Center Market
- Mill Valley Farmers' Market
- Corte Madera Farmers' Market
- Novato Farmers' Market
- Fairfax Farmers' Market
- Sausalito Farmers' Market
- Point Reyes Farmers' Market
- Tiburon Farmers' Market
Each with 7-19 local vendors and 3-4 community reviews.