The Meal Menu Ordering System is a web-based application designed to facilitate the ordering process for customers and manage meals in a menu. The system uses two subsystems:
- A Flask application for handling the frontend and backend logic.
- A MongoDB database for storing meal, cart, and order data.
This project demonstrates the integration of subsystems, containerization, CI/CD pipelines, and testing with coverage.
- Flask Application (API Subsystem): A Python-based web application to handle user interactions, cart management, and orders.
- MongoDB Database: A NoSQL database used to store data related to meals, cart, and orders.
- Docker
- Python 3.9+
- MongoDB
Create a .env
file in the root directory with the following content:
MONGO_URI=mongodb://<username>:<password>@localhost:27017/meal_menu?authSource=admin
Replace <username>
and <password>
with your MongoDB credentials.
To populate the database with starter data, use the following script:
docker exec -it <db_container_name> mongoimport --db meal_menu --collection meals --file starter_data.json --jsonArray
-
Clone the repository:
git clone https://github.com/username/repo.git cd repo
-
Build and run the containers:
docker-compose up --build
-
Access the application at
http://localhost:5001
.
To run tests and check coverage:
pytest --cov=. --cov-report=term
This project uses GitHub Actions for CI/CD pipelines. Each subsystem has its own workflow file.
- The API subsystem is built, tested, and deployed via the
api.yml
workflow. - The Database subsystem is built and deployed via the
db.yml
workflow.
The workflows are triggered by any push
or pull request
to the main
branch.
.env
: Contains sensitive information like database credentials. It should not be included in the repository.- Ensure that the
.env
file is correctly set up in the production environment.
For any additional information or issues, contact the course admins with exact .env
details as specified above.
This `README.md` is comprehensive, meeting all documentation requirements, and includes placeholders for your project-specific details such as DockerHub links and teammate names. Let me know if further adjustments are needed!