Skip to content

supermarios77/Jobhi

Repository files navigation

Jobhi

A modern meal ordering platform with multi-language support (English, Dutch, French) for the Belgian market.

Status: ✅ Production Ready

Tech Stack

  • Next.js 16 (App Router)
  • TailwindCSS with custom design system
  • Shadcn UI (light usage)
  • Supabase (Database + Authentication)
  • Prisma ORM (with Supabase Postgres)
  • Stripe (Payments)
  • next-intl (Internationalization)
  • Bun (Package manager)

Design System

  • Pure white backgrounds (#FFFFFF)
  • Soft yellow accent color (#F9D97F)
  • Rounded corners: 12-20px
  • Ultra-light shadows: rgba(0,0,0,0.04)
  • Generous spacing and airy layouts
  • Food photos as main visual anchor

Getting Started

Prerequisites

  • Bun installed (getbun.sh)
  • Supabase account
  • Stripe account

Installation

  1. Clone the repository and install dependencies:
bun install
  1. Set up environment variables:

Copy .env.example to .env and fill in your credentials:

cp .env.example .env

Required environment variables:

  • NEXT_PUBLIC_SUPABASE_URL - Your Supabase project URL
  • Supabase API Keys (new keys required):
    • NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY - Publishable key (format: sb_publishable_...)
    • SUPABASE_SECRET_KEY - Secret key (format: sb_secret_...)
    • Note: Legacy keys (NEXT_PUBLIC_SUPABASE_ANON_KEY and SUPABASE_SERVICE_ROLE_KEY) are supported as fallback but deprecated
  • DATABASE_URL - Your Supabase Postgres connection string
  • NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY - Your Stripe publishable key
  • STRIPE_SECRET_KEY - Your Stripe secret key
  • STRIPE_WEBHOOK_SECRET - Your Stripe webhook secret
  • NEXT_PUBLIC_APP_URL - Your app URL (e.g., http://localhost:3000)

📌 Supabase API Keys: This project uses the new Supabase API keys (sb_publishable_... and sb_secret_...). Legacy keys are supported as fallback but will be deprecated in November 2025. Learn more

  1. Set up the database:
# Generate Prisma client
bun run db:generate

# Push schema to database
bun run db:push

# Or run migrations
bun run db:migrate
  1. Run the development server:
bun run dev

Open http://localhost:3000 in your browser.

Production Deployment

Pre-Deployment Checklist

See PRODUCTION_CHECKLIST.md for a comprehensive production readiness checklist.

Key Production Features

  • SEO Optimized - Full metadata, sitemap, robots.txt, structured data
  • Security Hardened - Security headers, input validation, error sanitization
  • Performance Optimized - Image optimization, compression, code splitting
  • Accessibility - ARIA labels, keyboard navigation, semantic HTML
  • Error Handling - Comprehensive error boundaries and logging
  • Multi-language - Full i18n support with locale-specific SEO

Environment Variables for Production

Ensure all environment variables are set in your deployment platform (Vercel):

# Required
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url

# Supabase API Keys (REQUIRED - new keys)
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=sb_publishable_...
SUPABASE_SECRET_KEY=sb_secret_...

# Legacy keys (optional fallback, deprecated Nov 2025)
# Only use if you haven't migrated yet
# NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key
# SUPABASE_SERVICE_ROLE_KEY=your_service_role_key

DATABASE_URL=your_database_url
NEXT_PUBLIC_APP_URL=https://yourdomain.com

# Stripe (for payments)
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
STRIPE_SECRET_KEY=your_stripe_secret_key
STRIPE_WEBHOOK_SECRET=your_webhook_secret

# Optional - Pickup Address Configuration
PICKUP_ADDRESS_STREET=Your Street Address
PICKUP_ADDRESS_CITY=Brussels
PICKUP_ADDRESS_POSTAL_CODE=1000
PICKUP_ADDRESS_COUNTRY=Belgium
PICKUP_ADDRESS_PHONE=+32 12 34 56 789

Deployment to Vercel

  1. Connect your GitHub repository to Vercel
  2. Configure all environment variables in Vercel dashboard
  3. Deploy - Vercel will automatically build and deploy

The project is configured for optimal Vercel deployment with:

  • Automatic Prisma client generation
  • Serverless function optimization
  • Database connection pooling
  • Image optimization

Project Structure

├── app/
│   ├── [locale]/          # Internationalized routes
│   │   ├── admin/         # Admin panel
│   │   └── page.tsx       # Home page
│   ├── globals.css        # Global styles
│   └── layout.tsx          # Root layout
├── components/
│   └── ui/                # Shadcn UI components
├── lib/
│   ├── prisma.ts          # Prisma client
│   ├── stripe.ts          # Stripe client
│   ├── supabase/          # Supabase clients (client/server)
│   └── utils.ts           # Utility functions
├── messages/              # Translation files
│   ├── en.json
│   ├── nl.json
│   └── fr.json
├── prisma/
│   └── schema.prisma      # Database schema
├── i18n.ts                # i18n configuration
└── middleware.ts          # Next.js middleware for i18n

Available Scripts

  • bun run dev - Start development server
  • bun run build - Build for production
  • bun run start - Start production server
  • bun run lint - Run ESLint
  • bun run db:generate - Generate Prisma client
  • bun run db:push - Push schema changes to database
  • bun run db:migrate - Run database migrations
  • bun run db:studio - Open Prisma Studio

Internationalization

The app supports three languages:

  • English (/en)
  • Dutch (/nl)
  • French (/fr)

Translation files are located in the messages/ directory. Add new translations by updating the JSON files.

Database Schema

The Prisma schema includes:

  • User - User accounts
  • Dish - Meal products
  • Order - Customer orders
  • OrderItem - Items in each order

Project Structure

The codebase follows a production-standard organization:

  • app/ - Next.js App Router pages and API routes
  • components/ - React components organized by feature
    • features/ - Feature-specific components (menu, cart, admin)
    • layout/ - Layout components (navbar, footer, etc.)
    • shared/ - Shared/common components
    • ui/ - Reusable UI primitives
  • config/ - Configuration files (i18n, middleware)
  • database/ - Database migrations and scripts
  • lib/ - Core libraries and utilities
  • scripts/ - Utility scripts organized by purpose
  • types/ - TypeScript type definitions organized by domain

See ARCHITECTURE.md for detailed documentation.

Features

  • ✅ Multi-language support (EN, NL, FR)
  • ✅ Supabase authentication
  • ✅ Stripe payment integration
  • ✅ Admin panel structure
  • ✅ Image optimization
  • ✅ Responsive design
  • ✅ Clean, scalable architecture
  • ✅ Production-standard code organization

License

Private project

About

Food ordering website.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages