Git Product home page Git Product logo

storefy's Introduction

Storefy - Node.js E-commerce API

This project offers a robust Node.js API for building an e-commerce application, empowering you to create a feature-rich online store.

Features

  • TypeScript: Enhances code safety and maintainability through strong typing.
  • Express: Leverages the versatility of Express for handling API requests and responses efficiently.
  • TypeORM: Simplifies database interactions and object-relational mapping for seamless data management (supports MySQL).
  • CORS Middleware (cors): Enables Cross-Origin Resource Sharing (CORS) to facilitate communication with frontend applications from different domains.

Getting Started

Prerequisites:

  • Node.js and npm (or yarn) installed on your system.

Installation:

  1. Clone this repository:

    git clone [https://github.com/your-username/storefy.git](https://github.com/your-username/storefy.git)
    
  2. Navigate to the project directory:

    cd storefy
    
  3. Install dependencies:

    npm install
    
  4. Create .env file for development with the following variables

    • PORT=
    • DB_NAME=
    • DB_HOST=
    • DB_ROOT_USER=
    • DB_ROOT_PASSWORD=
    • DB_USER=
    • DB_PASSWORD=
    • DB_PORT=
  5. For production create production.env file with the same variables

  6. Run migrations

        npm run m:run
  7. Run your your proyect

        npm start:dev

    Or

        npm start:prod

API archicture

  • Customers are connected to Purchases with a one-to- many (1:N) relationship. This means that one customer can make many purchases.

  • Products are connected to Purchases with a many-to-many (N:N) relationship. This means that one product can be purchased by many customers, and one customer can purchase many products.

  • Custom purchases are indicated by a one-to-one (1:1) relationship between Customers and Products. This could represent a scenario where a customer has a custom order for a product.

Essentially, the purchasing process depicted illustrates how customers can purchase various products, with the possibility of customization.

architecure

storefy's People

Contributors

franklinserif 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.