An open API service indexing awesome lists of open source software.

https://github.com/sazardev/go-clean-menu


https://github.com/sazardev/go-clean-menu

Last synced: 5 months ago
JSON representation

Awesome Lists containing this project

README

          

# Go-Clean-Menu ๐Ÿฝ๏ธ

[![Go Version](https://img.shields.io/badge/Go-1.24+-00ADD8?style=for-the-badge&logo=go&logoColor=white)](https://golang.org)
[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=for-the-badge)](LICENSE)
[![Docker](https://img.shields.io/badge/Docker-Ready-2496ED?style=for-the-badge&logo=docker&logoColor=white)](https://www.docker.com/)
[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-13%2B-336791?style=for-the-badge&logo=postgresql&logoColor=white)](https://www.postgresql.org/)
[![HTMX](https://img.shields.io/badge/HTMX-Powered-3366BB?style=for-the-badge)](https://htmx.org/)
[![Bootstrap](https://img.shields.io/badge/Bootstrap-5.3-7952B3?style=for-the-badge&logo=bootstrap&logoColor=white)](https://getbootstrap.com/)

A modern, elegant, and easy-to-use restaurant management system built with Go. Go-Clean-Menu helps you manage orders, kitchen operations, menus, and more with a clean, intuitive interface.

## ๐ŸŒŸ Features

- **๐Ÿ“ Order Management**: Create, edit, and track orders in real-time
- **๐Ÿ‘จโ€๐Ÿณ Kitchen Display System**: Streamline kitchen operations with a dedicated view
- **๐Ÿงพ Menu Administration**: Easily manage your products and categories
- **๐Ÿ”„ Real-time Updates**: WebSocket-based updates across the application
- **๐Ÿ“Š Sales Analytics**: Track sales, popular products, and kitchen performance
- **๐Ÿ—“๏ธ Order History**: Complete historical record of all orders
- **๐Ÿ›Ž๏ธ Table Management**: Manage restaurant tables and their status
- **๐Ÿ”ง System Configuration**: Customize settings to match your restaurant needs
- **๐Ÿ’พ Data Backup**: Create and download database backups
- **๐ŸŒ“ Light/Dark Mode**: Toggle between light and dark themes
- **๐Ÿ” Self-hosted**: Full control over your data and deployment
- **๐Ÿ“ฑ Responsive Design**: Works on desktop and mobile devices

## ๐Ÿ“ธ Screenshots

### Dashboard
![Dashboard](https://github.com/user-attachments/assets/f835e3b4-cada-4453-97f4-a908151881ca)

### Orders Management
![Orders Management](https://github.com/user-attachments/assets/bbf07d33-c3d7-41b1-88dd-5e2340a13df7)

## ๐Ÿš€ Getting Started

### Quick Start with Docker Compose

1. Clone the repository:
```bash
git clone https://github.com/CerberusProgrammer/go-clean-menu.git
cd go-clean-menu
```

2. Start with Docker Compose:
```bash
docker-compose up -d
```

3. Access the application:
```
http://localhost:3001
```

### Manual Installation

#### Prerequisites:
- Go 1.24+
- PostgreSQL 13+

#### Steps:
1. Clone the repository and navigate to the project directory
2. Configure the database in `.env` file
3. Install dependencies: `go mod download`
4. Build the application: `go build -o app`
5. Run the application: `./app`

## ๐Ÿง  Architecture

Go-Clean-Menu follows clean architecture principles with a focus on maintainability and testability:

```
go-clean-menu/
โ”œโ”€โ”€ handlers.go # HTTP request handlers
โ”œโ”€โ”€ helpers.go # Utility functions
โ”œโ”€โ”€ history.go # Order history functionality
โ”œโ”€โ”€ kitchen.go # Kitchen display system
โ”œโ”€โ”€ main.go # Application entry point
โ”œโ”€โ”€ menu.go # Menu management
โ”œโ”€โ”€ models.go # Data models
โ”œโ”€โ”€ orders.go # Order processing logic
โ”œโ”€โ”€ settings.go # Application settings
โ”œโ”€โ”€ tables.go # Table management
โ”œโ”€โ”€ templates/ # HTML templates (using Go templates)
โ”‚ โ”œโ”€โ”€ layouts/ # Layout templates
โ”‚ โ””โ”€โ”€ partials/ # Reusable components
โ”œโ”€โ”€ Dockerfile # Docker configuration
โ””โ”€โ”€ docker-compose.yml # Docker Compose configuration
```

## ๐Ÿ› ๏ธ Tech Stack

- **Backend**: Go with Fiber framework
- **Database**: PostgreSQL
- **Frontend**: HTML, Bootstrap 5, HTMX
- **Real-time Updates**: WebSockets
- **Containerization**: Docker
- **Design Pattern**: MVC architecture
- **Template Engine**: Go HTML Templates

## ๐Ÿ’ป Development

### Environment Variables

Configure the application by modifying the `.env` file:

```
DB_HOST=db
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=postgres
DB_NAME=go_clean_menu
PORT=3001
```

### Project Structure

- **Templates**: HTML files in the `templates` directory
- **Static Assets**: CSS, JS, and images in the `static` directory
- **Logic**: Go files in the root directory, separated by functionality
- **Database**: PostgreSQL with models defined in `models.go`

### Key Components

- **Order Lifecycle**: pending โ†’ in_progress โ†’ ready โ†’ to_pay โ†’ completed
- **Kitchen Display**: Real-time view of pending orders for kitchen staff
- **Analytics**: Sales tracking and kitchen performance metrics
- **Product Management**: Categories and products with availability status

## ๐Ÿค Contributing

Contributions are welcome! Here's how you can help:

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

Please ensure your code follows the project's coding style and includes appropriate tests.

## ๐Ÿ“„ License

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

## ๐Ÿ™ Acknowledgments

- [Fiber](https://github.com/gofiber/fiber) - Fast HTTP framework for Go
- [HTMX](https://htmx.org/) - High-power tools for HTML
- [Bootstrap](https://getbootstrap.com/) - Frontend toolkit
- [Inter Font](https://fonts.google.com/specimen/Inter) - Clean, modern typography

---

Made with โค๏ธ by [CerberusProgrammer](https://github.com/CerberusProgrammer)

[โฌ† Back to top](#go-clean-menu-)