A final graduation project at FPT Polytechnic, a shoe store website made with Spring Boot, payment integration with Paypal Sandbox, there are 4 roles: USER, ADMIN, SHIPPER and STAFF. USER can only visit homepage, SHIPPER can visit both homepage and shipper page while STAFF and ADMIN can visit both homepage and admin page. User can sign in and sign up with normal account or with OAuth2 account (GG,FB), edit profile, change password, add favorite products, print order receipt, see orders history, reset password, and checkout with or without voucher, search & sort products. ADMIN and STAFF both can visit admin page, view Dashboard, CRUD User, Product, Order, Category & SubCategory, Voucher, only ADMIN have authorizing privilege, export data to excel, pdf, csv, upload excel, pdf, csv to db (to be added). Testing with TestNG that can read Excel data then export results to Excel.
Stack used:
- Stack:
- Frontend: AngularJS, Thymeleaf, MDBootstrap 5, JQuery
- Backend: Spring Boot, Spring Data JPA, Spring Security, OAuth2
- Database: SQL Server 2019 (Somee.com)
- Testing: TestNG
- Software:
- Visual Studio Code + Spring Boot extension
- Adoptium Temurin JDK 17
- Clone this repo, create database by running the shoeshy_db.sql script inside db folder
- Config application.properties according to your credentials
# for SQLServer Database connection
spring.datasource.url=jdbc:sqlserver://localhost:1433;database=<your database>
spring.datasource.username=<your username>
spring.datasource.password=<your password>
spring.datasource.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
spring.jpa.hibernate.dialect=org.hibernate.dialect.SQLServer2012Dialect
spring.jpa.show-sql=false
spring.jpa.hibernate.ddl-auto = none
- Create a app password for your gmail in order to send email in this webapp
# for send mail contact
spring.mail.host=smtp.gmail.com
spring.mail.port=587
spring.mail.username=<your gmail username>
spring.mail.password=<your gmail app password>
spring.mail.properties.mail.smpt.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
- Create Google, Facebook OAuth app and put your client-id, secret key to here, if you don't know how pls check this link
# Google
spring.security.oauth2.client.registration.google.client-id=<your google client id>
spring.security.oauth2.client.registration.google.client-secret=<your google client secret>
spring.security.oauth2.client.registration.google.scope=email,profile
# Facebook
spring.security.oauth2.client.registration.facebook.client-id=<your facebook client id>
spring.security.oauth2.client.registration.facebook.client-secret=<your facebook client secret>
spring.security.oauth2.client.registration.facebook.scope=email,public_profile
- Create a Paypal Sandbox account and fill your business account id and secret here (tips: when checkout use your sandbox personal account email and password)
paypal.mode = sandbox
paypal.client.id=<your sandbox business account id>
paypal.client.secret=<your sandbox business account secret>
- Subscribe to apilayer.com's Exchange Rate Data API and fill your api key here
apilayer.apikey=<your api key>
- User homepage
- Admin homepage
If things are unclear, PM me at [email protected]
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Authors of this project: