A modern, full-stack bakery ordering website built with Next.js 15, featuring real-time order management, WhatsApp payment integration, and a comprehensive admin dashboard.
Fresh Bakery Shop is a production-ready ordering platform that allows customers to browse products, place orders, and make advance payments via WhatsApp. The system includes both customer-facing features and a powerful admin dashboard for order and product management.
- Frontend: Next.js 15 (App Router), TypeScript, TailwindCSS
- UI Components: ShadCN UI with custom bakery theme
- Backend: Next.js API Routes, Server Actions
- Database: PostgreSQL with Prisma ORM
- Authentication: NextAuth.js (email + password)
- State Management: React Context API for cart management
- Data Fetching: SWR for client-side data fetching
- Deployment: Vercel-ready configuration
- Modern Landing Page: Animated logo, hero section, and featured categories
- Product Menu: Filterable by category with search functionality
- Shopping Cart: Real-time cart management with quantity controls
- Order Placement: Secure checkout with customer information
- Order Tracking: Personal dashboard to track order status
- WhatsApp Integration: Payment confirmation via WhatsApp
- Kanban Board: Visual order management across status columns
- Order Management: Payment verification and status updates
- Product Management: Add, edit, and manage menu items
- Real-time Updates: Live order status tracking
- Role-based Access: Secure admin-only areas
- Manual Payment System: No payment gateway required
- WhatsApp Confirmation: 20-50% advance payment via WhatsApp
- Transaction Verification: Admin manually verifies payments
- Order Status Tracking: Real-time status updates
- Node.js 18+
- PostgreSQL database (recommended: Neon)
- Git
```bash git clone cd fresh-bakery-shop ```
```bash npm install ```
Create a .env.local file in the root directory:
```env
DATABASE_URL="postgresql://username:password@localhost:5432/bakery_db"
NEXTAUTH_SECRET="your-secret-key-here" NEXTAUTH_URL="http://localhost:3000"
NEXT_PUBLIC_WHATSAPP_NUMBER="01622839616" ```
```bash
npx prisma generate
npx prisma migrate dev
npx prisma db seed ```
```bash npm run dev ```
Visit http://localhost:3000 to see the application.
- User: Customer and admin accounts with role-based access
- Product: Bakery items with categories and pricing
- Order: Customer orders with status tracking
- OrderItem: Individual items within orders
PENDINGβ Order placed, awaiting paymentADVANCE_VERIFIEDβ Payment confirmed by adminIN_PROGRESSβ Order being preparedREADYβ Ready for customer pickupCOMPLETEDβ Order fulfilledCANCELLEDβ Order cancelled
- Primary: Emerald green (#059669) - Represents freshness and quality
- Accent: Bright emerald (#10b981) - For highlights and CTAs
- Neutrals: Warm grays and whites for clean, professional appearance
- Headings: Geist Sans (bold weights)
- Body: Geist Sans (regular weights)
- Responsive: Mobile-first design approach
- Floating Support Widget: Quick access to WhatsApp support
- Order Confirmation: Automated message templates
- Payment Instructions: Clear payment confirmation flow
- Customer Support: Direct line to bakery support
- Order confirmation with payment instructions
- Customer support inquiries
- Order status updates
- Custom order requests
- Connect your GitHub repository to Vercel
- Configure environment variables in Vercel dashboard
- Deploy automatically on push to main branch
- Create a Neon PostgreSQL database
- Copy connection string to
DATABASE_URL - Run migrations in production
```env DATABASE_URL="your-neon-connection-string" NEXTAUTH_SECRET="your-production-secret" NEXTAUTH_URL="https://your-domain.vercel.app" NEXT_PUBLIC_WHATSAPP_NUMBER="your-whatsapp-number" ```
- Email: admin@bakery.com
- Password: admin123 (
β οΈ Change in production!)
- Order management with kanban board
- Payment verification system
- Product catalog management
- Real-time order tracking
- Customer places order on website
- Redirected to success page with WhatsApp link
- Clicks WhatsApp button with pre-filled message
- Sends advance payment (20-50% of total)
- Shares transaction ID via WhatsApp
- Admin verifies payment and updates order status
- Customer receives pickup notification
- Receive WhatsApp message with transaction ID
- Verify payment in banking system
- Update order status to "ADVANCE_VERIFIED"
- Prepare order and update to "IN_PROGRESS"
- Mark as "READY" when complete
- Complete order after customer pickup
- Role-based Authentication: Separate customer and admin access
- Protected Routes: Admin areas require authentication
- Input Validation: Server-side validation for all forms
- SQL Injection Protection: Prisma ORM prevents SQL injection
- XSS Protection: React's built-in XSS protection
```bash npm run dev # Start development server npm run build # Build for production npm run start # Start production server npm run lint # Run ESLint npm run type-check # Run TypeScript checks ```
``` βββ app/ # Next.js app directory β βββ api/ # API routes β βββ admin/ # Admin dashboard pages β βββ auth/ # Authentication pages β βββ ... # Other pages βββ components/ # Reusable UI components βββ lib/ # Utility functions and configurations βββ prisma/ # Database schema and migrations βββ public/ # Static assets ```
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This system uses a manual payment verification process via WhatsApp instead of automated payment gateways. This approach:
- Reduces transaction fees
- Provides personal customer service
- Allows flexible payment methods
- Maintains direct customer relationships
- Order status updates every 5 seconds
- Live kanban board for admins
- Instant cart updates
- Real-time inventory management
This project is licensed under the MIT License - see the LICENSE file for details.
For technical support or questions:
- Create an issue on GitHub
- Contact via WhatsApp: +8801622839616
- Email: eity.mehedipathan@gmail.com
Built with β€οΈ for fresh food lovers
