Skip to content

Latest commit

 

History

48 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Product Purchase System

This repository contains the implementation of a Product Purchase System, showcasing a complete backend, frontend, and database design for managing customer orders, products, deliveries, and transactions.

Live Demos


Table of Contents

  1. Features
  2. Entities and Relationships
  3. Backend and Frontend Coverage
  4. Technologies Used

Features

  • Manage customers, products, and transactions seamlessly.
  • Integration with payment gateways for transaction processing.
  • Deliveries associated with transactions, tracking recipient and address details.
  • Frontend deployed on AWS Amplify.
  • Swagger documentation for API reference and testing.

Entities and Relationships

Customer

  • Attributes:
    • id: Auto-generated identifier (PK).
    • email: Unique email identifier.
    • password: Encrypted password.
  • Relationships:
    • 1:N with OrderTransaction: A customer can place multiple orders.

Product

  • Attributes:
    • id: Auto-generated identifier (PK).
    • name: Name of the product.
    • description: Detailed product description.
    • price: Price of the product.
    • stock: Inventory count.
    • image: Optional image URL.
  • Relationships:
    • 1:N with OrderTransaction: A product can be part of multiple orders.

OrderTransaction

  • Attributes:
    • id: Auto-generated identifier (PK).
    • paymentGatewayTransactionId: Optional identifier from the payment gateway.
    • quantity: Product quantity ordered.
    • total: Total cost of the transaction.
    • acceptanceTokenEndUserPolicy: Token acknowledging end-user policies.
    • createdAt: Timestamp of transaction creation.
  • Relationships:
    • N:1 with Customer.
    • N:1 with Product.
    • 1:1 with Delivery.
    • N:1 with TransactionStatus.

Delivery

  • Attributes:
    • id: Auto-generated identifier (PK).
    • personName: Recipient's full name.
    • address: Delivery address.
    • country, city, region: Geographic details of the delivery.
    • postalCode: ZIP/Postal code.
    • phoneNumber: Contact number for the recipient.
    • fee: Optional delivery fee.
  • Relationships:
    • 1:1 with OrderTransaction.

TransactionStatus

  • Attributes:
    • id: Auto-generated identifier (PK).
    • name: Enum type (PENDING, APPROVED, REJECTED) representing transaction status.
  • Relationships:
    • 1:N with OrderTransaction.

Database Diagram


Backend and Frontend Coverage

Backend Test Coverage

Backend Coverage
Click for a larger view of the backend coverage image.

Frontend Test Coverage

Frontend Coverage
Click for a larger view of the frontend coverage image.


Technologies Used

  • Backend:
    • Node.js (TypeScript) with NestJS Framework.
    • PostgreSQL for data persistence.
    • TypeORM for database modeling.
    • Swagger for API documentation.
  • Frontend:
    • React with Redux for user interface.
    • AWS Amplify for deployment.
  • Deployment:
    • AWS API Gateway + Load Balancer + ECS + ECR for backend API.
    • AWS Amplify for frontend hosting.
    • AWS RDS for database hosting.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages