Skip to content

This is an application built on some of the hottest technologies such as Spring Boot and Vue.js. The aim of this project, in addition to practice these technologies, is to help shopkeepers build their online store.

Notifications You must be signed in to change notification settings

danvinicius/ecommerce-platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 

Repository files navigation

E-commerce Platform

Java Spring AWS VueJS Postgres Typescript

Table of Contents

Introduction

This is an application built on some of the hottest technologies such as Spring Boot and Vue.js. The aim of this project, in addition to practice these technologies, is to help shopkeepers build their online store.

This project is still 🚧 under development 🚧


UI elements


Presentation



Installation

  1. Clone the repository:
git clone https://github.com/danvinicius/ecommerce-platform.git
  1. Install dependencies with Maven

  2. Install PostgresSQL

  3. Install NodeJS and NPM

Usage

  1. Go to /api folder and start the application with Maven
  2. The API will be accessible at http://localhost:8080
  3. Go to /client folder and install dependencies with yarn
yarn install
  1. Start application with yarn
yarn dev
  1. The Client will be accessible at http://localhost:5173

Database and ERD

The project utilizes PostgresSQL as the database. The necessary database migrations are managed using Flyway.


API

This API was built using Java, Java Spring, PostgresSQL as the database, Feign Client, Flyway Migrations and Spring Security with JWT for authentication control. The API provides the following endpoints (API's base url is /api):

Product

GET /product - Retrieve a list of all products. (all users)

GET /product/{id} - Retrieve a product by its id. (all users)

POST /product - Register a new product. (ADMIN access required)

PUT /product/{id} - Update a product by its id. (ADMIN access required)

DELETE /product/{id} - Delete a product by its id. (ADMIN access required)

Category

GET /category - Retrieve a list of all categories. (all users)

GET /category/{id} - Retrieve a category by its id. (all users)

POST /category - Register a new category. (ADMIN access required)

PUT /category/{id} - Update a category by its id. (ADMIN access required)

DELETE /category/{id} - Delete a category by its id. (ADMIN access required)

Shipping address

GET /address - Retrieve a list of all addresses. (ADMIN access required)

GET /address/{id} - Retrieve an address by its id. (all authenticated users - address must belong to user)

POST /address - Register a new address. (all authenticated users)

PUT /address/{id} - Update an address by its id. (all authenticated users - address must belong to user)

DELETE /address/{id} - Delete an address by its id. (all authenticated users - address must belong to user)

Order

GET /order - Retrieve a list of all orders. (ADMIN access required)

GET /order/{id} - Retrieve an order by its id. (all authenticated users - order must belong to user)

POST /order - Register a new order. (all authenticated users)

PUT /order/{id} - Update an order by its id. (all authenticated users - order must belong to user)

PUT /order/{id}/cancel - Cancel an order by its id. (all authenticated users - order must belong to user)

DELETE /order/{id} - Delete an order by its id. (all authenticated users - order must belong to user)

Cart

GET /cart - Retrieve a list of all carts. (ADMIN access required)

GET /cart/{id} - Retrieve an cart by its id. (all authenticated users - cart must belong to user)

POST /cart - Register a new cart. (all authenticated users)

PUT /cart/{id}/item/add - Add a new item to cart. (all authenticated users - cart must belong to user)

PUT /cart/{id}/item/remove - Remove an item from cart. (all authenticated users - cart must belong to user)

DELETE /cart/{id} - Delete an cart by its id. (all authenticated users - cart must belong to user)

User

GET /user - Retrieve a list of all users. (ADMIN access required)

GET /user/{id} - Retrieve an user by its id. (ADMIN access required)

GET /user/me - Retrieve all info about request user. (all authenticated users)

POST /user - Register a new user. (all users)

PUT /user/{id} - Update a user by its id. (all authenticated users - user can only update himself)

DELETE /user/{id} - Delete a user by its id. (all authenticated users - user can only delete himself)

POST /auth - Login to the app. (all users)

Authentication

The API uses Spring Security for authentication control. The following roles are available:

USER -> Standard user role for logged-in users.
ADMIN -> Admin role.

To access protected endpoints as an ADMIN user, provide the appropriate authentication credentials in the request header.

Microservices

There's a connection to Email Service using Feign Client to send emails at some events, e.g user registration.

License

This is a truly open-source application that will always be free under the MIT License.

About

This is an application built on some of the hottest technologies such as Spring Boot and Vue.js. The aim of this project, in addition to practice these technologies, is to help shopkeepers build their online store.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published