- 📖 About the Project
- 💻 Getting Started
- 👥 Authors
- 🔭 Future Features
- 🤝 Contributing
- ⭐️ Show Your Support
- 🙏 Acknowledgements
- 📝 License
Little Lemon API is a fully functioning API project for the Little Lemon restaurant. It provides endpoints for managing menu items, placing orders, and assigning delivery crew to orders.
- Django
- Django REST Framework
- PostgreSQL
- SQLlite3
- Menu Items Management: Allows users to browse, add, edit, and delete menu items.
- Order Management: Enables users to place orders and browse order history.
- Delivery Crew Management: Supports assignment of delivery crew to orders.
The Little Lemon API project follows the following structure:
LittleLemonAPI/
: Django project root directory.api/
: Django app directory for the API implementation.migrations/
: Database migration files.views.py
: Contains the API views and endpoints.models.py
: Defines the database models.
littlelemonapi/
: Django app settings and configurations.requirements.txt
: Lists the project dependencies.manage.py
: Django management script.
To get a local copy up and running, follow these steps.
- Python (3.8 or higher)
- SQLite3 database
-
Clone this repository:
git clone https://github.com/your-username/little-lemon-api.git
-
Navigate to the project directory:
cd little-lemon-api
-
Install the project dependencies:
pip install -r requirements.txt
-
Set up the PostgreSQL database and configure the database settings in
littlelemonapi/settings.py
. -
Apply the database migrations:
python manage.py migrate
- Start the development server:
python manage.py runserver
- The API will now be accessible at
http://localhost:8000/
. You can use tools like cURL, Postman, or your web browser to make requests to the API endpoints.
To run the tests for the Little Lemon API, execute the following command:
python manage.py test
This will run the test suite and display the test results.
To deploy the Little Lemon API to a production environment, follow these general steps:
-
Set up a production server with the necessary infrastructure (e.g., a cloud server, containerization platform, etc.).
-
Configure the production server environment variables, including database settings and any required secret keys.
-
Set up a web server (e.g., Nginx, Apache) to handle incoming requests and forward them to the API.
-
Configure the web server to serve the static files and proxy the API requests to the appropriate port (e.g., 8000).
-
Set up a process manager (e.g., Supervisor, systemd) to keep the API process running and handle process management.
-
Configure any necessary security measures, such as SSL certificates for HTTPS.
-
Deploy the codebase to the production server and start the API process.
-
Monitor the API for any issues and ensure that backups and security measures are in place.
- Evans Kupour - @evanskupour
- Add support for user authentication and authorization.
- Implement email notifications for order updates.
- Integrate with a payment gateway for online payments.
- Implement real-time order tracking using websockets.
Contributions are welcome! To contribute to the Little Lemon API project, follow these steps:
-
Fork the repository.
-
Create a new branch for your feature or bug fix.
-
Make your changes and commit them with descriptive commit messages.
-
Push your changes to your forked repository.
-
Submit a pull request detailing your changes and why they should be merged.
-
Wait for the maintainers to review and provide feedback on your pull request.
If you find the Little Lemon API project helpful or interesting, please consider giving it a star on GitHub. Your support is greatly appreciated!
- Hat tip to anyone whose code was used as inspiration.
- Thanks to the Little Lemon team for their valuable feedback and contributions.
This project is licensed under the MIT License.