YASmini is a pet project aimed at practicing building a typical Spring Boot application in Java
- Java 21
- Spring boot 3.2.5
- PostgreSQL
- Firebase Storage
- Vertex AI
- GitHub Actions
- SonarCloud
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.
- 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 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 |
Include setup steps for Firebase authentication, PostgreSQL database connection, and any other necessary configurations.
-
Set up Firebase:
- Create a Firebase project in the Firebase Console.
- Configure Firebase Authentication and download the service account JSON file.
-
Set up PostgreSQL:
- Install PostgreSQL on your system.
- Create a new PostgreSQL database for your application.
-
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
- Build the Project
./mvnw clean install
- Run the Application
./mvnw spring-boot:run
- Skype: live:duongminhhieu2082002
- Please ping me if you can't run the app.
- [JPA & JWT (Hoang Nguyen)] (https://github.com/hoangnd-dev/rookies-java)
- [Springboot Demo (Phu Le)] (https://github.com/phulecse2420/demo)
- [Devteria] (https://github.com/devteria/identity-service.git)
- [Yas real] (https://github.com/nashtech-garage/yas)
- NashTech Slide
- GitHub Copilot