Skip to content
项目

zhulinn/SpringBoot-Angular7-Online-Shopping-Store

在 GitHub 查看

关于

🛒 一个电商购物网站,包含购物车和在线商城,使用 Docker、Java 11、REST API、JWT 和 Bootstrap。

系统与基础设施

这些数字如何统计

可以做什么

  • JWT authentication
  • Cookie based visitors' shopping cart
  • Persistent customers' shopping cart
  • Cart & order management

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

Online Shop Application

License

A full-stack Online Shop web application using Spring Boot 2 and Angular 7.

This is a Single Page Appliaction with client-side rendering. It includes backend and frontend two seperate projects on different branches. The frontend client makes API calls to the backend server when it is running.

This project is based on my previous project Online-Shopping-Store, which uses FreeMarker as template engine for server-side rendering.

Live Demo: https://springboot-angular-shop.herokuapp.com/ Heroku has removed free tier on Postgres, the demo is no longer working...:(

For Heroku application repo cloning, please check Angular7-SpringBoot-hybrid-project.

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

Frontend

  • Angular 7
  • Angular CLI
  • Bootstrap

Database Schema

How to Run

Start the backend server before the frontend client.

Backend

  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.

Frontend

  1. Install Node.js and npm
  2. cd frontend.
  3. Run npm install.
  4. Run ng serve
  5. The frontend client is running on localhost:4200.

Note: The backend API url is configured in src/environments/environment.ts of the frontend project. It is localhost:8080/api by default.

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

探索相关项目

加载中…