🛒 Back-end with RESTful API end-points for an e-commerce web app using django.
This repository contains the backend code for an e-commerce web app built using Django and Django Rest Framework. The backend provides a set of RESTful API endpoints to manage products, collections, carts, customers, and orders. The app also includes user authentication using JWT web tokens.
- Create, Read, Update, and Delete products, collections, carts, customers, and orders.
- User authentication using JWT web tokens.
- Admin panel to manage app data.
- Utilizes Django ORM for database management.
The API provides the following endpoints:
- Products: [GET, POST, PUT, DELETE]
/store/products/
- Collections: [GET, POST, PUT, DELETE]
/store/collections/
- Carts: [GET, POST, PUT, DELETE]
/store/carts/
- Customer: [GET, PUT]
/store/customer/
- Orders: [GET, POST]
/store/orders/
Note: We will add full details about the available endpoints soon.
The web app is deployed on Azure using continuous integration and deployment with GitHub Actions. The deployment process is automated and ensures that the latest code is always deployed to the production environment.
To run the app locally, follow these steps:
- Clone this repository.
- Install virtual environment using
pipenv install
. This will install required dependencies using the pipfile. - Activate the virtual environment using
pipenv shell
. - Configure your local MySQL database settings in
storefront/settings/dev.py
. - Apply migrations using
python manage.py migrate
. - Run
python manage.py seed_db
to populate data. - Run the development server using
python manage.py runserver
.
User authentication is implemented using JWT web tokens. Users can obtain tokens by logging in. Tokens are required to access protected endpoints.
The app uses MySQL as the database. You can find the database schema and models in the models.py
file.
- Python
- Django
- Django Rest Framework
- Django ORM (Object-Relational Mapping)
- Djoser (User registration and authentication)
- JWT web tokens
- MySQL (Database)
- Azure (Deployment)
- GitHub Actions (CI/CD)
Contributions are welcome! To contribute to the project, follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them.
- Push your changes to your fork.
- Submit a pull request to the main repository.