labecommerce-backend

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

Labecommerce

Database manipulation of a simple e-commerce using SQLite3.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Features
  5. Documentation
  6. Contact

About The Project

An API using SQLite3 as database. I was able to implement CRUD methods on 3 tables on the database, using the forth as a relations table. Users, and Products do not have foreign keys, as such are independent.

The difficulty in this project was how to decide how to receive and how to send the required information. Fortunately I arrived with the idea to create a type for each input and the output, creating a fixed pattern.

(back to top)

Built With

  • SQLite
  • Express
  • Node.js
  • Postman

(back to top)

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • npm
    npm install npm@latest -g

Installation

  1. Read API at https://documenter.getpostman.com/view/24460683/2s8ZDSc53k

  2. Clone the repo

    git clone https://github.com/Afmjuniors/labecommerce-backend.git
  3. Install NPM packages

    npm install
  4. Create tables in your own server

    src/database/database.sql
    
    Execute CREATE TABLE users
    Execute CREATE TABLE products
    Execute CREATE TABLE purchases
    Execute CREATE TABLE purchase_products
  5. Run ther server

    npm run dev

(back to top)

Usage

Possible to integrate a simple e-commerce project. A API using CRUD methods.

(back to top)

Feats

  • User endpoints
    • Get users
    • Create new User
    • Edit user
    • Delet USer
  • Products endpoints
    • Get products
    • Get products by ID
    • Create new Product
    • Edit product
    • Delete Product
  • Purchase endpoints
    • Get all purchase of a user
    • Get purchase
    • Create new purchase
    • Update purchase
    • Delete purchase

(back to top)

Documentation

https://documenter.getpostman.com/view/24460683/2s8ZDSc53k

Diagram

Product Name Screen Shot

Diagram URL
https://dbdiagram.io/d/63d3f81d296d97641d7c99fa

Contact

Alexandre Machado - afmjuniors@gmail.com

(back to top)