Database manipulation of a simple e-commerce using SQLite3.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
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.
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.
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
-
Read API at https://documenter.getpostman.com/view/24460683/2s8ZDSc53k
-
Clone the repo
git clone https://github.com/Afmjuniors/labecommerce-backend.git
-
Install NPM packages
npm install
-
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
-
Run ther server
npm run dev
Possible to integrate a simple e-commerce project. A API using CRUD methods.
- 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
https://documenter.getpostman.com/view/24460683/2s8ZDSc53k
Diagram URL
https://dbdiagram.io/d/63d3f81d296d97641d7c99fa
Alexandre Machado - afmjuniors@gmail.com