โก E-commerce Backend API This project serves as a backend API for a complete e-commerce website. It manages user, product, and order databases and provides a robust RESTful API for communication with various systems.
โจ Key Features User Management: Create, retrieve, update, and delete user information. Product Management: Create, view, update, and delete product listings. Order Management: Create and view orders based on users and products. Authentication: Secure user login with password encryption. Search & Pagination: Search for products by name and paginate data for efficient loading. ๐ ๏ธ Technology Stack Python: The core programming language. Flask: The web framework used to build the API. Flask-SQLAlchemy: ORM for database management. SQLite: A lightweight and simple database. Flask-Bcrypt: Used for password encryption. ๐ Setup and Installation Follow the steps below to set up and run the project on your local system:
Clone this repository or download the files.
git clone https://github.com/your_username/your_repo_name.git cd your_repo_name Install the required Python libraries:
pip install -r requirements.txt Run the application:
python app.py You will see a message in your terminal indicating that the server is running on http://127.0.0.1:5000/.
๐ API Endpoints The primary API routes for this project are listed below:
Method Endpoint Description POST /users Creates a new user. GET /users Returns a list of all users. PUT /users/<user_id> Updates a specific user's information. DELETE /users/<user_id> Deletes a specific user. POST /products Adds a new product. GET /products Returns a list of all products. (Includes search and pagination) PUT /products/<product_id> Updates a specific product's information. DELETE /products/<product_id> Deletes a specific product. POST /orders Creates a new order. GET /orders Returns a list of all orders. POST /login Authenticates a user. ๐ License This project is released under the MIT License for more info: fahad.integration.ml@gmail.com