Skip to content

duongminhhieu/YasMiniShop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YASmini: Yet Another Shop Mini

YASmini is a pet project aimed at practicing building a typical Spring Boot application in Java

Screenshot 2024-06-02 at 23 47 57

Development CI-CD Production CI-CD Test Coverage

Technologies

  • Java 21
  • Spring boot 3.2.5
  • PostgreSQL
  • Firebase Storage
  • Vertex AI
  • GitHub Actions
  • SonarCloud

Architecture

Screenshot 2024-06-02 at 23 44 13

Use Case

YasMini drawio (6)

Overview

Yas Mini is an e-commerce platform that allows public users, customers, and admin users to interact with various functionalities such as viewing products, managing orders, and handling customer data. The system is divided into modules for public users, registered customers, and administrators.

Actors

  • Public User: Anyone who visits the site without logging in.
  • Customer: A registered user who can purchase products.
  • Admin: A user with administrative privileges to manage products, orders, customers, and other administrative tasks.

Use Cases Summary

Use Case Description Actor Preconditions Postconditions
View Products View product details, featured products, and products by category Public User None None
Search Products Search for products based on various criteria Public User None Display search results
Register Create a new user account Public User None User account created
Add to Cart Add products to shopping cart Customer User must be logged in Product added to cart
Order Product Place an order for products in the cart Customer Products in cart, user logged in Order placed
View My Orders View past and current orders Customer User must be logged in Display order list
Search by Image with AI Upload an image to search for similar products using AI Customer User must be logged in Display search results
Rate Product Rate products (one rating per product) Customer User must be logged in, not rated before Rating submitted
Manage Orders View, paginate, and change order status Admin Admin must be logged in Order statuses updated
Manage Products Create, read, update, delete, and filter products Admin Admin must be logged in Product list updated
Manage Categories Create, update, and delete product categories Admin Admin must be logged in Category list updated
Manage Customers View, activate, deactivate, and paginate customer records Admin Admin must be logged in Customer list updated
View Statistics View platform performance metrics and statistics Admin Admin must be logged in Display statistics
Authentication Handle user login, logout, and session management

Database Modeling

rookie_phase1_db - public

Setting Up and Running at Local

Configuration

Include setup steps for Firebase authentication, PostgreSQL database connection, and any other necessary configurations.

  1. Set up Firebase:

    • Create a Firebase project in the Firebase Console.
    • Configure Firebase Authentication and download the service account JSON file.
  2. Set up PostgreSQL:

    • Install PostgreSQL on your system.
    • Create a new PostgreSQL database for your application.
  3. Config application.yml file to run in the local environment:

    • In application.yml file. Let change the json-file (path to your credentials file) and storage-bucket
       firebase:
         json-file: this is your credentials file (.json)
         storage-bucket: yasmini.appspot.com (this is your storage-bucket)
    • After that, change url, username and password of your database.
      datasource:
         url: this is your url
         username: this is your username
         password: this is your password

Run

  1. Build the Project
    ./mvnw clean install  
  1. Run the Application
    ./mvnw spring-boot:run

Contact

  • Skype: live:duongminhhieu2082002
  • Please ping me if you can't run the app.

References

  1. [JPA & JWT (Hoang Nguyen)] (https://github.com/hoangnd-dev/rookies-java)
  2. [Springboot Demo (Phu Le)] (https://github.com/phulecse2420/demo)
  3. [Devteria] (https://github.com/devteria/identity-service.git)
  4. [Yas real] (https://github.com/nashtech-garage/yas)
  5. NashTech Slide
  6. GitHub Copilot