{"id":17965868,"url":"https://github.com/ehtisham-sadiq/e_commerce_system","last_synced_at":"2026-04-10T07:57:39.921Z","repository":{"id":259351609,"uuid":"877650110","full_name":"ehtisham-sadiq/E_Commerce_System","owner":"ehtisham-sadiq","description":"A modular FastAPI-based e-commerce system for managing authentication, sellers, buyers, car inventory, sales, and stock with a clean, scalable architecture.","archived":false,"fork":false,"pushed_at":"2024-10-31T10:03:32.000Z","size":65,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T12:22:24.787Z","etag":null,"topics":["docker","fastapi","postgresql","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ehtisham-sadiq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-24T02:15:04.000Z","updated_at":"2024-10-31T10:03:37.000Z","dependencies_parsed_at":"2024-10-24T19:06:12.389Z","dependency_job_id":"fac3549e-8771-4299-814c-9a1e7390142a","html_url":"https://github.com/ehtisham-sadiq/E_Commerce_System","commit_stats":{"total_commits":28,"total_committers":7,"mean_commits":4.0,"dds":0.6071428571428572,"last_synced_commit":"aa636f157254db54bc1ca81dac79b2f263663a73"},"previous_names":["ehtisham-sadiq/e_commerce_system"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ehtisham-sadiq/E_Commerce_System","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehtisham-sadiq%2FE_Commerce_System","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehtisham-sadiq%2FE_Commerce_System/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehtisham-sadiq%2FE_Commerce_System/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehtisham-sadiq%2FE_Commerce_System/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ehtisham-sadiq","download_url":"https://codeload.github.com/ehtisham-sadiq/E_Commerce_System/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehtisham-sadiq%2FE_Commerce_System/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270709082,"owners_count":24631992,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","fastapi","postgresql","python"],"created_at":"2024-10-29T13:05:50.325Z","updated_at":"2025-10-29T13:33:15.571Z","avatar_url":"https://github.com/ehtisham-sadiq.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# E-commerce System\n\n## Overview\n\n**This is a FastAPI-based modular web application designed to handle various components of an e-commerce system. The application features user authentication, seller and buyer management, car inventory management, sales tracking, and stock management. The project is structured with clean separation between business logic, routes, and database models, making it scalable and maintainable.**\n\n**Table of Contents**\n1.\tFeatures\n2.\tProject Structure\n3.\tSetup and Installation\n4.\tRunning the Application\n5.\tAPI Documentation\n6.\tDevelopment Workflow\n7.\tTesting\n8.\tContributors\n\n### Features\n- `JWT-based Authentication`: Secure login and registration with JWT tokens.\n- `Seller Management`: Create, update, view, and delete seller profiles.\n- `Buyer Management`: Manage buyer profiles and view buyer details.\n- `Car Inventory Management`: Add, update, and manage cars for sale.\n- `Sales Tracking`: Record and manage sales transactions.\n- `Stock Management`: Track stock of cars and manage stock levels.\n\n### Project Structure\n\nThis project follows a clean architecture, where each component is isolated into separate modules to improve scalability, maintainability, and testability.\n```\n├── Procfile                # For Heroku deployment\n├── README.md               # Project documentation\n├── app/\n│   ├── __init__.py         # Initialization file\n│   ├── main.py             # Application entry point\n│   ├── resources/          # Static files or configurations\n│   ├── src/\n│   │   ├── config.py       # Application configuration (DB settings, etc.)\n│   │   ├── database.py     # Database connection and session management\n│   │   ├── dependencies.py # Shared dependencies for the application\n│   │   ├── domain/         # Core business logic for various modules\n│   │   │   ├── buyer/      # Buyer model, schema, service\n│   │   │   ├── seller/     # Seller model, schema, service\n│   │   │   ├── car/        # Car model, schema, service\n│   │   │   ├── sale/       # Sale model, schema, service\n│   │   │   ├── stock/      # Stock model, schema, service\n│   │   │   ├── user/       # User model, schema, service for authentication\n│   │   ├── internal/       # Internal admin functionality\n│   │   ├── routers/        # API endpoints for each module\n│   ├── converters/         # Data conversion logic (model to schema)\n├── docker-compose.yml      # Docker setup for containerized development\n├── requirements.txt        # Python dependencies\n└── runtime.txt             # Runtime environment\n```\n\n### Setup and Installation\n\n#### Prerequisites\n1.\tPython 3.9+\n2.\tDocker (optional for containerized deployment)\n3.\tGit (for version control)\n\n\n#### Installation Steps\n\n1.\tClone the repository:\n    ```\n        git clone https://github.com/your-username/fastapi-ecommerce-system.git\n        cd fastapi-ecommerce-system\n    ```\n\n2.\tSet up a virtual environment:\n    ```\n        python3 -m venv env\n        source env/bin/activate\n    ```\n\n3.\tInstall project dependencies:\n    ```\n        pip install -r requirements.txt\n    ```\n\n4.\tConfigure environment variables:\n- Create a `.env` file in the root directory with the following content:\n```\n    DATABASE_URL=postgresql://your_db_user:your_db_password@localhost:5432/your_db_name\n    JWT_SECRET=your_jwt_secret\n```\n\n\n#### Running the Application\n\n**Local Development**\n\nTo run the FastAPI application locally, follow these steps:\n\n1.\tRun the application:\n\n```\n    uvicorn app.main:app --reload\n```\n\n2.\tAccess the application: \n\nOpen your browser and navigate to:\n```\n    http://localhost:8000\n```\nThe API documentation will be available at:\n```\nhttp://localhost:8000/docs\n```\n\n\nFor Deployment-Running with Docker. Currently, It is optional.\n\n1.\tEnsure Docker is installed.\n2.\tBuild and run the Docker container:\n```\ndocker-compose up --build\n```\n\n\n#### API Documentation\n\nThe API documentation is automatically generated by FastAPI and is available at:\n\n- Swagger UI: http://localhost:8000/docs\n- ReDoc: http://localhost:8000/redoc\n\n**Authentication Routes**\n\n| **HTTP Method** | **Route**      | **Description**                |\n|-----------------|----------------|--------------------------------|\n| POST            | /login         | Login user and return token     |\n| POST            | /register      | Register a new user             |\n| GET             | /token         | Validate JWT token              |\n\n------------\n\n**Seller Management Routes**\n\n| **HTTP Method** | **Route**                  | **Description**            |\n|-----------------|----------------------------|----------------------------|\n| POST            | /sellers                   | Create a new seller         |\n| GET             | /sellers                   | List all sellers            |\n| GET             | /sellers/{seller_id}       | Get seller by ID            |\n| PUT             | /sellers/{seller_id}       | Update seller details       |\n| DELETE          | /sellers/{seller_id}       | Delete a seller by ID       |\n\n\n**Buyer Management Routes**\n\n| **HTTP Method** | **Route**                    | **Description**             |\n|-----------------|------------------------------|-----------------------------|\n| POST            | /buyers                      | Create a new buyer           |\n| GET             | /buyers                      | List all buyers              |\n| GET             | /buyers/{buyer_id}           | Get buyer by ID              |\n| PUT             | /buyers/{buyer_id}           | Update buyer details         |\n| DELETE          | /buyers/{buyer_id}           | Delete a buyer by ID         |\n\n**Car Management Routes**\n\n| **HTTP Method** | **Route**                    | **Description**             |\n|-----------------|------------------------------|-----------------------------|\n| POST            | /cars                        | Add a car to inventory       |\n| GET             | /cars                        | Get all cars in inventory    |\n| GET             | /cars/{car_id}               | Get car details by ID        |\n| PUT             | /cars/{car_id}               | Update car details           |\n| DELETE          | /cars/{car_id}               | Remove a car from inventory  |\n\n**Sales Management Routes**\n\n| **HTTP Method** | **Route**                    | **Description**             |\n|-----------------|------------------------------|-----------------------------|\n| POST            | /sales                       | Record a new sale            |\n| GET             | /sales                       | Get all sales                |\n| GET             | /sales/{sale_id}             | Get sale details by ID       |\n\n**Stock Management Routes**\n\n| **HTTP Method** | **Route**                    | **Description**             |\n|-----------------|------------------------------|-----------------------------|\n| POST            | /stocks                      | Add stock for a car          |\n| GET             | /stocks                      | Get all stock                |\n| GET             | /stocks/{stock_id}           | Get stock details by ID      |\n\n\n#### Development Workflow\n\n**Branching Strategy**\n\nThe project follows a feature branch workflow to ensure isolated development and easy integration.\n\n1.\tCreate a feature branch:\n```\n    git checkout -b feature/{feature_name}\n```\n\n2.\tPush your branch to the remote repository:\n```\n    git push origin feature/{feature_name}\n```\n\n3.\tOnce your feature is complete, open a Pull Request to the main branch. Ensure that the code passes tests and review before merging.\n\n**Feature Breakdown by Developer**\n\n| **Developer**  | **Feature**                  | **Branch**            |\n|----------------|------------------------------|-----------------------|\n| Raza           | Authentication               | `feature/auth`        |\n| Amna           | Seller \u0026 Stock Management    | `feature/sellers`     |\n| Abid           | Buyer Management             | `feature/buyers`      |\n| Usama          | Car Inventory Management     | `feature/cars`        |\n| Shoaib         | Sales Management             | `feature/sales`       |\n\n\n\n#### License\nThis project is licensed under the MIT License - see the LICENSE file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fehtisham-sadiq%2Fe_commerce_system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fehtisham-sadiq%2Fe_commerce_system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fehtisham-sadiq%2Fe_commerce_system/lists"}