Skip to content

OwaliShawon/tripol-kebab-grill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

49 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ₯™ Tripol Kebab & Grill

A modern, full-stack e-commerce web application for a kebab restaurant built with Next.js, featuring online ordering, payment processing, and administrative functionality.

🌐 Live Demo

https://tripolkebab.vercel.app/

✨ Features

Customer Features

  • 🍽️ 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 Features

  • πŸ” Admin authentication system
  • βž• Add, edit, and delete products
  • πŸ“Š Order management dashboard
  • πŸ–ΌοΈ Image upload for products

πŸ› οΈ Tech Stack

Frontend

  • 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

Backend

  • Next.js API Routes - Serverless functions
  • MongoDB - NoSQL database
  • Mongoose - MongoDB object modeling

Integrations

  • PayPal SDK - Payment processing
  • Firebase - Authentication and file storage
  • Vercel - Deployment platform

πŸ“ Project Structure

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

πŸš€ Getting Started

Prerequisites

  • Node.js 18.x or later
  • MongoDB database
  • Firebase project (for authentication)
  • PayPal developer account

Installation

  1. Clone the repository

    git clone https://github.com/OwaliShawon/tripol-kebab-grill.git
    cd tripol-kebab-grill
  2. Install dependencies

    npm install
    # or
    yarn install
  3. Environment Setup

    Create a .env.local file 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
  4. Run the development server

    npm run dev
    # or
    yarn dev
  5. Open your browser

    Navigate to http://localhost:3000 to see the application.

πŸ“ Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run start - Start production server
  • npm run lint - Run ESLint

πŸ”§ Configuration

Database Setup

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 Setup

Firebase is used for authentication and file storage. Configure your Firebase project and add the credentials to your environment variables.

PayPal Integration

Set up PayPal SDK for payment processing by adding your client ID to the environment variables.

πŸ“Š API Endpoints

Products

  • GET /api/products - Get all products
  • GET /api/products/[id] - Get product by ID
  • POST /api/products - Create new product (admin)
  • PUT /api/products/[id] - Update product (admin)
  • DELETE /api/products/[id] - Delete product (admin)

Orders

  • GET /api/orders - Get all orders (admin)
  • GET /api/orders/[id] - Get order by ID
  • POST /api/orders - Create new order
  • PUT /api/orders/[id] - Update order status (admin)

Authentication

  • POST /api/login - Admin login

🎨 Styling

The project uses CSS Modules for component-specific styling, ensuring style encapsulation and preventing CSS conflicts. Global styles are defined in styles/globals.css.

πŸ“± Responsive Design

The application is fully responsive and optimized for:

  • πŸ“± Mobile devices (320px+)
  • πŸ“Ÿ Tablets (768px+)
  • πŸ’» Desktop (1024px+)

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘¨β€πŸ’» Developer

Owali Shawon

πŸ™ Acknowledgments

  • 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!

About

A modern, full-stack e-commerce web application for a kebab restaurant built with Next.js, featuring online ordering, payment processing, and administrative functionality.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors