A simple CoffeeShop application built with Spring Boot, PostgreSQL, Angular, maildev, Sessions and CSRF tokens.
- Admin Login
- Product listing, editing and deletion
- About Us and Contact page customization
- JSESSIONID based authentication
- CSRF tokens for XSS attacks
- Contact Us trough email option
Make sure you have the following tools installed before setting up the application:
-
Clone the repository:
git clone https://github.com/confusedGustas/CoffeeShop cd CoffeeShop
-
Configure PostgreSQL:
- Create a new database (coffeeshop)
- Leave the default settings as it is, Spring Boot will create the needed tables.
- If you want configurate the settings, you can do it so by accessing the
application.yaml
file
url: jdbc:postgresql://localhost:5432/coffeeshop username: postgres password: postgres
-
Build and run the application:
npm install npm i maildev maildev mvn spring-boot:run cd frontend ng serve
- Spring Boot backend will start on
http://localhost:8080
- Angular frontend on
http://localhost:4200
- maildev on
http://localhost:1080
- Spring Boot backend will start on
- Access the application through your browser, Login with the default credentials (Admin/Admin). The password can be changed through the browser.
- Contact, About and Home pages will be empty by default. You need to log in and edit these areas through the admin panel.
- Contact page will contain a "Contact us" option. To test it out, fill out the blanks and visit maildev to check out the received message.
This project is licensed under the MIT License.