Skip to content

lucasshuan/b2c-ecommerce-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


B2C E-commerce API

📃 About  |   💻 Technologies  |   ✨ Features  |   🚀 Getting Started  |   👨‍💻 Usage  |   🗺️ Roadmap  |   👤 Author

📄 About

B2C (business to consumer) E-commerce API is a Golang project featuring GraphQL with gqlgen and Gin for Web Framework.

The project adopts a well-organized controller-service-repository structure and supports various functionalities, including user registration, Google authentication, cart management, order creation, payment processing, and more. Additionally, it integrates Asaas for enhanced functionality.

One standout feature is its multitenant design. This means the project is crafted to effortlessly support various databases with different structures. This flexibility allows it to adapt and scale based on the specific needs or preferences of users and businesses.

💻 Technologies

✨ Features

  • Authentication and Authorization: User registration with standard credentials or Google authentication.
  • Cart Management: Users can add products, create orders, and track payment status.
  • Product Management: Admins can add and categorize products for an enhanced shopping experience.
  • Order Processing: Creation of orders and secure payment processing with detailed status tracking.
  • Payment Integration: Seamless integration with Asaas for efficient and reliable payment processing.
  • User Lifecycle Enhancements: Password recovery, email verification, and more to enhance user experience.
  • Multitenancy: Designed for seamless scalability, the project supports multiple databases with varying structures.

🚀 Getting Started

Prerequisites

  • Go
  • Docker
  • make

Installing

  1. Clone the repository:

    git clone https://github.com/lucasshuan/b2c-ecommerce-api.git
    cd b2c-ecommerce-api
  2. Install dependencies:

    make deps

👨‍💻 Usage

Manage Docker containers

  1. Start containers:

    make docker-up
  2. Stop containers:

    make docker-down

Configuration

The project utilizes a configuration file named config.yml to manage environment-specific settings.

env: dev
dev:
  port: 3000
  tenants:
    tenant1: scheme://user:password@host:port/db
    tenant2: ...

Server

To start the development server, run the following command:

make server

🗺️ Roadmap

  • Testing Suite: Integrate a comprehensive testing suite for robust code validation.
  • Expanded Database Support: Extend database support beyond PostgreSQL and MySQL to include additional databases.
  • Enhanced Security: Implement advanced security measures, such as JWT for user authentication and authorization.
  • Notification System: Integrate a notification system to keep users informed about order updates and promotions.
  • Order Tracking: Integrate a user-friendly order tracking system, providing real-time updates on order status and location.

👤 Author

About

B2C E-commerce platform built with Golang using Gin, GORM, and GQLGen (incomplete)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published