Skip to content

WEBSHOP [ReactJS + Express(NodeJS) + Sequalize(PostgreSQL)]

Notifications You must be signed in to change notification settings

alexromlex/NODE_REACT_webshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WEBSHOP [ReactJS + Express(NodeJS) + Sequalize(PostgreSQL)]

📝 Quick links

🧐 About

This project was published only for code demonstrating. It has limited e-commerce functionality of following features.

User Admin
- Registration / login - Dashboard with statistics
- Product Items - Orders
- Basket management - Users
- Checkout process - Products
- Product types
- Brands
- Settings

🏁 Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Installing

Firstly download and unpack files to local storage.

Install node_modules inside \server> and \client> directories:

npm install

Run docker desktop

Then, run all containers with command from project root dicrectory:

docker compose up -d

I recommend create database by API, but before waiting for container <webshop_db> to start successfully, see docker desktop app!

<webshop_db> container logs must be like:

LOG: database system is ready to accept connections

Also you'll see db files inside project root directory \db>

Then, go to URL: http://localhost:5026/api/system/db_sync

result should be the next:

  • DB Authorisation was successfully!
  • DB has been Synchronized!
  • NEW - SETTINGS created!
  • NEW - User(ADMIN) created!

🎈 Usage

Firstly login as ADMIN by URL: http://localhost:5226/login

ADMIN email & password you can find inside root directory .env file

Then, go to admin panel http://localhost:5226/admin/brands where you can create a brands!

After this, create product types, that will contain the brands you have already created.

If you have created types and brands, let's crate a products!

🚀 Tech Stack

Backend

  • NodeJS v.18
  • Express v.4
  • Loging - Morgan
  • Authentication (JWT + bcrypt)
  • TypeScrypt

Database

  • Sequalize v.6 ORM
  • PostgreSQL v.16
  • pgadmin v.4 (included)

Frontend

  • ReactJS
  • HighCharts
  • TinyMCE
  • TypeScrypt

Tests

  • Jest
  • Supertest
  • TypeScrypt

🔧 Running the tests

To start tests, run CMD in \server> directory :

 npm run test

Tests written for API router with 100% coverage:

Docker desktop