tuandao2511 / Shop-cart-server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Screenshot

Features

  • REST API
  • Docker
  • Docker Compose
  • JWT authentication
  • Cookie based visitors' shopping cart
  • Persistent customers' shopping cart
  • Cart & order management
  • Checkout
  • Catalogue
  • Order management
  • Pagination

Technology Stacks

Backend

  • Java 11
  • Spring Boot 2.2
  • Spring Security
  • JWT Authentication
  • Spring Data JPA
  • Hibernate
  • PostgreSQL
  • Maven Note: The backend API url is configured in src/environments/environment.ts of the frontend project. It is localhost:8080/api by default.

Database Schema

How to Run

  1. Install PostgreSQL
  2. Configure datasource in application.yml.
  3. cd backend.
  4. Run mvn install.
  5. Run mvn spring-boot:run.
  6. Spring Boot will import mock data into database by executing import.sql automatically.
  7. The backend server is running on localhost:8080.

Run in Docker

You can build the image and run the container with Docker.

  1. Build backend project
cd backend
mvn package
  1. Build fontend project
cd frontend
npm install
ng build --prod
  1. Build images and run containers
docker-compose up --build

About


Languages

Language:Java 99.8%Language:Dockerfile 0.2%