Skip to content

Repository files navigation

🍴 Barista Food Chain

A comprehensive food chain management system built with a modern full-stack architecture. This application helps manage restaurant operations, inventory, orders, and customer interactions for a food chain business.

📋 Table of Contents

✨ Features

  • Order Management: Create, track, and manage customer orders
  • Inventory Control: Monitor stock levels and manage inventory
  • Menu Management: Add, update, and remove menu items
  • User Authentication: Secure login and user management
  • Analytics Dashboard: View sales, revenue, and performance metrics
  • Multi-location Support: Manage multiple restaurant locations
  • Real-time Updates: Live order tracking and notifications

🛠 Tech Stack

Frontend

  • React.js / Next.js
  • Modern UI/UX with responsive design
  • State management (Redux/Context API)
  • RESTful API integration

Backend

  • Node.js with Express.js
  • RESTful API architecture
  • Authentication & Authorization
  • Database integration

Database

  • MongoDB / MySQL / PostgreSQL
  • Efficient data modeling and indexing

📁 Project Structure

Barista-Food-Chain/
├── backend/           # Backend server code
│   ├── config/       # Configuration files
│   ├── controllers/  # Route controllers
│   ├── models/       # Database models
│   ├── routes/       # API routes
│   ├── middleware/   # Custom middleware
│   └── server.js     # Entry point
│
├── frontend/         # Frontend application
│   ├── src/
│   │   ├── components/  # React components
│   │   ├── pages/       # Page components
│   │   ├── services/    # API services
│   │   ├── utils/       # Utility functions
│   │   └── App.js       # Main app component
│   └── public/          # Static assets
│
└── README.md

🚀 Getting Started

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v14 or higher)
  • npm or yarn
  • MongoDB/MySQL (depending on your database choice)
  • Git

Installation

  1. Clone the repository
git clone https://github.com/Krishmal2004/Barista-Food-Chain.git
cd Barista-Food-Chain
  1. Install Backend Dependencies
cd backend
npm install
  1. Install Frontend Dependencies
cd ../frontend
npm install
  1. Environment Setup

Create a .env file in the backend directory:

PORT=3000
DATABASE_URL=your_database_connection_string
JWT_SECRET=your_jwt_secret_key
NODE_ENV=development

Create a .env file in the frontend directory:

REACT_APP_API_URL=http://localhost:3000/api

💻 Usage

Running the Backend

cd backend
npm start
# or for development with hot reload
npm run dev

The backend server will start on http://localhost:3000

Running the Frontend

cd frontend
npm start

The frontend application will start on http://localhost:3000

Running Both Concurrently

You can run both frontend and backend simultaneously from the root directory:

# Install concurrently globally if not already installed
npm install -g concurrently

# Run both
npm run dev

📚 API Documentation

Authentication Endpoints

  • POST /api/auth/register - Register a new user
  • POST /api/auth/login - User login
  • POST /api/auth/logout - User logout

Order Endpoints

  • GET /api/orders - Get all orders
  • GET /api/orders/:id - Get order by ID
  • POST /api/orders - Create new order
  • PUT /api/orders/:id - Update order
  • DELETE /api/orders/:id - Delete order

Menu Endpoints

  • GET /api/menu - Get all menu items
  • GET /api/menu/:id - Get menu item by ID
  • POST /api/menu - Add new menu item
  • PUT /api/menu/:id - Update menu item
  • DELETE /api/menu/:id - Delete menu item

Inventory Endpoints

  • GET /api/inventory - Get inventory status
  • PUT /api/inventory/:id - Update inventory
  • POST /api/inventory/restock - Restock items

🧪 Testing

Run tests for the backend:

cd backend
npm test

Run tests for the frontend:

cd frontend
npm test

🤝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a new 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.

👤 Author

Krishmal2004

🙏 Acknowledgments

  • Thanks to all contributors who have helped with this project
  • Inspired by modern food chain management systems
  • Built with ❤️ for the food service industry

📞 Support

For support, email krishmaldinidu5466@gmail.com or create an issue in the repository.


Note: This is an active project and is continuously being improved. Feel free to suggest features or report bugs!

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages