A comprehensive restaurant management system built with Next.js, featuring online reservations, menu management, user authentication, and admin dashboard.
- Online Reservations - Book tables with date/time selection and party size
- Interactive Menu - Browse menu items with images, descriptions, and pricing
- User Authentication - Secure sign-up/sign-in with Clerk
- AI Chatbot - Get instant help with reservations and menu questions
- Responsive Design - Perfect experience on all devices
- Reservation Management - View, edit, and manage all reservations
- Menu Management - Add, edit, and organize menu items
- User Management - Handle customer accounts and roles
- Analytics Dashboard - Track reservations, revenue, and performance
- Real-time Updates - Live status updates and notifications
- Framework: Next.js 15 with App Router
- Database: PostgreSQL with Prisma ORM
- Authentication: Clerk
- Styling: Tailwind CSS + shadcn/ui
- AI: OpenAI GPT-4 for chatbot
- Deployment: Vercel-ready
-
Clone the repository ```bash git clone
<repository-url>cd smartbite-restaurant ``` -
Install dependencies ```bash npm install ```
-
Set up environment variables ```bash cp .env.example .env.local ```
Fill in your environment variables:
NEON_DATABASE_URL- PostgreSQL connection stringNEXT_PUBLIC_CLERK_PUBLISHABLE_KEY- Clerk publishable keyCLERK_SECRET_KEY- Clerk secret keyOPENAI_API_KEY- OpenAI API key for chatbot
-
Set up the database ```bash
npm run db:generate
npm run db:push
npm run db:seed ```
-
Run the development server ```bash npm run dev ```
- User - Customer and admin user accounts
- Reservation - Table reservations with status tracking
- MenuItem - Restaurant menu items with categories
- Order - Customer orders (future feature)
- OrderItem - Individual items within orders
- Role-based Access - Customer, Staff, Manager, Admin roles
- Status Tracking - Reservation and order status management
- Audit Trail - Created/updated timestamps on all records
- Data Integrity - Foreign key constraints and validation
```bash
npm run dev # Start development server npm run build # Build for production npm run start # Start production server
npm run db:generate # Generate Prisma client npm run db:push # Push schema to database npm run db:migrate # Run database migrations npm run db:seed # Seed database with sample data npm run db:studio # Open Prisma Studio npm run db:reset # Reset database (caution!)
npm run lint # Run ESLint ```
- Sign up with email:
admin@smartbite.com - Access admin dashboard at
/admin - Manage reservations, menu items, and users
- Browse the menu at
/menu - Make reservations at
/reservations - Chat with AI assistant for help
- Sign up for personalized experience
- Clerk Integration - Enterprise-grade authentication
- Role-based Access Control - Different permissions for different user types
- API Route Protection - Secure endpoints with middleware
- Data Validation - Zod schemas for type-safe API requests
- Mobile-first - Optimized for mobile devices
- Tablet Support - Perfect experience on tablets
- Desktop Enhanced - Rich desktop experience
- Touch-friendly - Easy interaction on all devices
- Smart Chatbot - Powered by OpenAI GPT-4
- Restaurant Knowledge - Trained on menu, hours, and policies
- Reservation Assistance - Help customers book tables
- Menu Recommendations - Suggest dishes based on preferences
- Connect your GitHub repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy automatically on every push
- Create PostgreSQL database (recommended: Neon, Supabase, or Railway)
- Update
DATABASE_URLin environment variables - Run migrations:
npm run db:push - Seed data:
npm run db:seed
- Server Components - Optimized rendering performance
- Image Optimization - Next.js automatic image optimization
- Database Indexing - Optimized queries with proper indexes
- Caching - Strategic caching for better performance
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.
For support, email gyambibiw@gmail.com or create an issue in the repository.
Built with ❤️ using Next.js, Prisma, and Clerk