#API RESTful API for an E-Commerce platform built with .NET Core, providing features for products, orders, cart, payments, and user management
- Set Up the Database:
- Configure the database connection string in
appsettings.json:"ConnectionStrings": { "DefaultConnection": "Server=localhost;Database=EcommerceDb;Trusted_Connection=True;" }
- Apply migrations to create or update the database:
dotnet ef migrations add InitialCreate dotnet ef database update
- Configure the database connection string in
Our project follows a structured Git branching model to streamline development, testing, and deployment cycles. We use three primary branches:
- production: Contains the codebase deployed to the production environment. All changes here are live for end-users.
- dev: The active development branch where new features and fixes are merged before promotion to
master.
To organize development tasks, we use a folder-like structure for branches:
Branches for non-urgent work are created from the dev branch:
- features/: For new features (e.g., adding AI recommendations).
- bug-fix/: For fixing bugs (e.g., cart calculation errors).
- refactor/: For code refactoring (e.g., optimizing order processing).
Branches for urgent tasks are created from the master branch:
- hot-features/: Urgent new features based on production code (e.g., adding a new payment gateway).
- hot-fix/: Urgent bug fixes affecting production (e.g., fixing a checkout failure).
Branches are named to reflect the type of work and the impacted area: [type-of-work]/[sub-folder]/[brief-description]
Examples:
features/reviews/add-review-photos: Adding photo upload to reviews.bug-fix/orders/fix-shipping-calculation: Fixing shipping price calculation.hot-fix/payments/resolve-paypal-error: Urgent fix for PayPal payment failures.
Subfolders: Branches are organized by the impacted area of the platform, aligned with our models:
- auth/: Authentication-related work (e.g., MFA, JWT).
- buyer/: Buyer features (e.g., cart, wishlist).
- admin/: Admin tools (e.g., review moderation).
- products/: Product-related features (e.g., AR visuals).
- orders/: Order processing (e.g., checkout, tracking).
- reviews/: Review system (e.g., helpful votes).
- cart/,....
This structure ensures clarity on the scope of each branch, aligning with the platform’s models (
Buyer,Seller,Product,Order,Review, etc.).
We adopt a modified Git Flow approach:
- Feature Development: Create
feature/*branches fromdev, merge back todevafter code review. - Bug Fixes:
bug-fix/*branches follow the same flow as features. - Hotfixes: Create
hot-fix/*branches frommaster, apply urgent fixes, merge back tomaster, then propagate tomasteranddev.
This model supports parallel development of features like product reviews, payment integrations, and AR visuals while ensuring stable releases and quick hotfixes.