Git Product home page Git Product logo

shiv000000 / e_commerce_backend Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 13.88 MB

This is a comprehensive assignment that covers various aspects of backend engineering, including microservices architecture, concurrency control, clustering for high availability, database integration, APIs, authentication, and more.

Python 97.61% C 0.41% Mako 0.11% C++ 1.48% Batchfile 0.01% Assembly 0.02% Cython 0.13% JavaScript 0.06% CSS 0.03% PowerShell 0.14%

e_commerce_backend's Introduction

E-commerce Microservices Backend

This project is a backend system for an e-commerce platform, consisting of multiple microservices built using Flask and SQLAlchemy. It includes microservices for user authentication (auth_service), order management (order_service), and product management (product_service).

Installation

  1. Clone the repository:
   git clone https://github.com/SHIV000000/e_commerce_backend.git

Install dependencies:

cd e_commerce_backend
pip install -r requirements.txt

Configuration

Set up the PostgreSQL database:

Install PostgreSQL and create a database for each microservice.
Update the database URIs in the config.py files of each microservice (e.g., auth_service/config.py, order_service/config.py, product_service/config.py).

Set up environment variables:

Create a .env file in the root directory. Add environment variables for secret keys, database URIs, etc. For example:

SECRET_KEY=your_secret_key
SQLALCHEMY_DATABASE_URI=postgresql://username:password@localhost/ecommerce_db

Usage

Run each microservice:

cd auth_service
python app.py

cd order_service
python app.py

cd product_service
python app.py

Access the APIs at the following endpoints:

Authentication Service: http://localhost:5000 Order Service: http://localhost:5001 Product Service: http://localhost:5002

Testing

Run tests for each microservice:

cd auth_service/tests
python -m unittest discover -s . -p 'test_*.py'
cd order_service/tests
python -m unittest discover -s . -p 'test_*.py'
cd product_service/tests
python -m unittest discover -s . -p 'test_*.py'

e_commerce_backend's People

Contributors

shiv000000 avatar

Stargazers

M avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.