A modern, full-stack e-commerce web application for a kebab restaurant built with Next.js, featuring online ordering, payment processing, and administrative functionality.
https://tripolkebab.vercel.app/
- π½οΈ Browse kebab menu with detailed product information
- π Shopping cart with real-time updates
- π³ Secure payment processing with PayPal integration
- π± Responsive design for mobile and desktop
- π§Ύ Order tracking and history
- π Contact and about pages
- π Admin authentication system
- β Add, edit, and delete products
- π Order management dashboard
- πΌοΈ Image upload for products
- Next.js 12 - React framework with SSR/SSG
- React 17 - User interface library
- Redux Toolkit - State management
- CSS Modules - Styling solution
- Axios - HTTP client for API calls
- Next.js API Routes - Serverless functions
- MongoDB - NoSQL database
- Mongoose - MongoDB object modeling
- PayPal SDK - Payment processing
- Firebase - Authentication and file storage
- Vercel - Deployment platform
tripol-kebab-grill/
βββ components/ # Reusable React components
β βββ Add.jsx # Product addition form
β βββ Featured.jsx # Featured products section
β βββ KebabCard.jsx # Individual product card
β βββ KebabList.jsx # Product grid/list
β βββ Navbar.jsx # Navigation component
β βββ ...
βββ pages/ # Next.js pages and API routes
β βββ api/ # Backend API endpoints
β β βββ orders/ # Order management APIs
β β βββ products/ # Product management APIs
β βββ admin/ # Admin dashboard pages
β βββ orders/ # Order tracking pages
β βββ ...
βββ models/ # MongoDB schemas
β βββ Order.js # Order data model
β βββ Product.js # Product data model
βββ redux/ # State management
β βββ cartSlice.js # Shopping cart logic
β βββ store.js # Redux store configuration
βββ styles/ # CSS modules
βββ util/ # Utility functions
β βββ firebase-config.js
β βββ mongo.js # MongoDB connection
βββ public/ # Static assets
βββ img/ # Product and UI images
- Node.js 18.x or later
- MongoDB database
- Firebase project (for authentication)
- PayPal developer account
-
Clone the repository
git clone https://github.com/OwaliShawon/tripol-kebab-grill.git cd tripol-kebab-grill -
Install dependencies
npm install # or yarn install -
Environment Setup
Create a
.env.localfile in the root directory:# MongoDB MONGODB_URL=your_mongodb_connection_string # Firebase NEXT_PUBLIC_FIREBASE_API_KEY=your_firebase_api_key NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_firebase_auth_domain NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_firebase_project_id # PayPal NEXT_PUBLIC_PAYPAL_CLIENT_ID=your_paypal_client_id # Admin Authentication ADMIN_USERNAME=your_admin_username ADMIN_PASSWORD=your_admin_password
-
Run the development server
npm run dev # or yarn dev -
Open your browser
Navigate to http://localhost:3000 to see the application.
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLint
The application uses MongoDB with Mongoose for data modeling. Ensure your MongoDB instance is running and accessible via the connection string in your environment variables.
Firebase is used for authentication and file storage. Configure your Firebase project and add the credentials to your environment variables.
Set up PayPal SDK for payment processing by adding your client ID to the environment variables.
GET /api/products- Get all productsGET /api/products/[id]- Get product by IDPOST /api/products- Create new product (admin)PUT /api/products/[id]- Update product (admin)DELETE /api/products/[id]- Delete product (admin)
GET /api/orders- Get all orders (admin)GET /api/orders/[id]- Get order by IDPOST /api/orders- Create new orderPUT /api/orders/[id]- Update order status (admin)
POST /api/login- Admin login
The project uses CSS Modules for component-specific styling, ensuring style encapsulation and preventing CSS conflicts. Global styles are defined in styles/globals.css.
The application is fully responsive and optimized for:
- π± Mobile devices (320px+)
- π Tablets (768px+)
- π» Desktop (1024px+)
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Owali Shawon
- GitHub: @OwaliShawon
- Next.js team for the amazing framework
- MongoDB team for the database solution
- PayPal for payment processing
- Vercel for hosting platform
Made with β€οΈ for kebab lovers everywhere!