A full-stack restaurant management system built with FastAPI, DynamoDB, and React. This system helps restaurants manage their menu and orders through an intuitive web interface.
- Menu Management: Add, edit, and remove menu items with prices and categories
- Order Processing: Create and track customer orders
- Dashboard: View key metrics including revenue, popular items, and recent orders
- Real-time Updates: Instant updates for orders and menu changes
- Discount Support: Apply percentage-based discounts to orders
Backend:
- FastAPI
- DynamoDB
- Python 3.11+
- Boto3
Frontend:
- React
- TypeScript
- Tailwind CSS
- Vite
- Python 3.11 or higher
- Node.js 16 or higher
- AWS account with configured credentials
- Git
- Clone the repository:
git clone <repository-url>
cd restaurant-api- Create and activate a virtual environment:
# Windows
python -m venv venv
venv\Scripts\activate
# macOS/Linux
python -m venv venv
source venv/bin/activate- Install dependencies:
pip install -r requirements.txt- Set up AWS credentials:
aws configure
# Enter your AWS Access Key ID
# Enter your AWS Secret Access Key
# Enter your preferred region (e.g., us-east-1)- Initialize the database:
./manage_db.sh setup- Start the API server:
uvicorn api.app:app --reload- Navigate to the frontend directory:
cd frontend- Install dependencies:
npm install- Build the frontend:
npm run build- Start the development server:
npm run devrestaurant-api/
├── api/
│ ├── controllers/ # API route handlers
│ ├── models/ # Data models
│ ├── repositories/ # Database interaction
│ └── schemas/ # Request/response schemas
├── frontend/
│ └── src/
│ ├── components/ # React components
│ ├── hooks/ # Custom hooks
│ ├── pages/ # Page components
│ ├── services/ # API client services
│ └── types/ # TypeScript types
└── scripts/ # Database management scripts
GET /menu/- List all menu itemsGET /menu/{item_id}- Get a specific menu itemPOST /menu/- Create a new menu itemPUT /menu/{item_id}- Update a menu itemPATCH /menu/{item_id}- Partially update a menu itemDELETE /menu/{item_id}- Delete a menu item
GET /orders/- List all ordersGET /orders/{order_id}- Get a specific orderPOST /orders/- Create a new orderPUT /orders/{order_id}- Update an orderPATCH /orders/{order_id}- Partially update an orderDELETE /orders/{order_id}- Delete an order
To remove all DynamoDB tables and data:
./manage_db.sh teardown