PitosPies is a Spring Boot server-side Web Application designed for Online Ordering and Order Aanagement, with a focus on traditional Greek pies. The application provides a complete customer journey, from browsing the product catalog and managing a shopping cart to placing and reordering orders. It also includes user authentication, email verification, password recovery, input validation, email notifications, and a basic administration area.
- Browse the traditional pie catalog with prices and images.
- View detailed information about each pie, including ingredients and awards.
- View information about the physical store, including contact and location details.
- Register a new account with email verification.
- Log in and log out securely.
- Use the "Remember Me" option when logging in.
- Request a password reset by email.
- Add pies to the shopping cart and manage quantities.
- Place an order as a guest or authenticated user.
- Select delivery information, delivery area, payment method, and order comments.
- View the five most recent orders when logged in.
- Reorder a previous order.
- Receive order and account-related email notifications.
- Contact the store through the contact form.
- Access the administration panel with the
ROLE_ADMINauthority. - View the number of users who have not completed email verification.
- Manage unverified user accounts.
| Category | Technology |
|---|---|
| Language | Java 17+ |
| Framework | Spring Boot 3.x |
| Web Layer | Spring Web MVC |
| Views | Thymeleaf |
| Persistence | Spring Data JDBC |
| Database | MySQL |
| Security | Spring Security |
| Password Hashing | BCrypt |
| Validation | Jakarta Bean Validation + custom constraints |
Spring Mail / JavaMailSender |
|
| SMS Integration | Twilio SDK |
| Boilerplate Reduction | Lombok |
| Frontend | Thymeleaf(HTML) + SCSS + JavaScript |
| Database Driver | MySQL Connector |
Registration flow:
GET /register → enter user details → validation → verification email → GET /register/{code} to activate the account.
| Registration Form | Validation Messages | Verification Email |
|---|---|---|
![]() |
![]() |
![]() |
Login is handled through Spring Security form login, with success and error states and an optional Remember Me feature.
| Login Form | Successful Login | Invalid Credentials |
|---|---|---|
![]() |
![]() |
![]() |
The password recovery flow allows a user to request a verification code by email and then set a new password.
| Reset Request | Verification Email | New Password |
|---|---|---|
![]() |
![]() |
![]() |
Users can submit their name, email, telephone number, and message through the contact form. The application sends an email notification to the administrator and a confirmation email to the user.
| Contact Form | Successful Submission | Confirmation Email |
|---|---|---|
![]() |
![]() |
![]() |
The catalog is available at /pies. Users can open a pie's details page to view its information, ingredients, and awards, and can add a selected quantity to the cart.
| Pie Catalog | Pie Details |
|---|---|
![]() |
![]() |
The store page provides information about the physical shop, including its address, opening hours, and contact details.
| Store Page |
|---|
![]() |
The /buy page handles the shopping cart and checkout process.
Users can:
- Review the current cart.
- Select or enter delivery information.
- Select a delivery area.
- Select a payment method.
- Add comments to the order.
- Review their five most recent orders when logged in.
- Reorder a previous order.
When an order is successfully submitted, it is stored in the database and confirmation emails are sent to the customer and administrator.
| Order Form | Previous Orders | Validation Errors | Successful Order | Order Confirmation Email |
|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
The application follows a traditional Spring Boot MVC architecture:
src/main
├── java
│ └── com.nikolas.app
│ ├── config
│ ├── controllers
│ ├── repositories
│ ├── services
│ ├── models
│ └── ...
└── resources
├── static
│ ├── js
│ ├── sass
│ └── styles
├── templates
└── application.properties
The main application layers are:
- Controllers - handle HTTP requests and application flows.
- Services - contain business logic such as authentication, email delivery, SMS integration, and visit metrics.
- Repositories - provide database access through Spring Data JDBC and SQL queries.
- Models - represent users, pies, orders, ingredients, awards, roles, and delivery areas.
- Templates - Thymeleaf views for the web interface.
- Static assets - SCSS/CSS and JavaScript used by the frontend.
The main domain objects are:
- User - account information, credentials, verification status, and user details.
- Role - application roles such as
USERandADMIN. - Pie - name, price, image, ingredients, and awards.
- Ingredient ingredients associated with pies.
- Award - awards associated with pies.
- Order - customer, delivery, payment, and order information.
- OrderItem - individual pies and quantities belonging to an order.
- Area - available delivery areas.
Spring Data JDBC is used for persistence. Collections such as order items and pie awards are mapped using @MappedCollection, while some many-to-many relationships are handled through SQL queries.
Authentication and authorization are implemented with Spring Security.
- Custom
UserDetailsServiceloads users and their roles from the database. - Passwords are hashed using BCrypt.
- Form-based login is supported.
- Logout is handled by Spring Security.
- Remember Me is supported.
- CSRF protection is enabled.
The application uses role-based authorities, including ROLE_ADMIN.
The administration entry point is protected with:
.authorizeHttpRequests(authorize -> authorize
.requestMatchers("/admin").hasAuthority("ROLE_ADMIN")
.anyRequest().permitAll()
)The application uses Jakarta Bean Validation together with custom validation constraints.
Implemented validation rules include:
@AtLeastOneItemInOrderConstraint- ensures that an order contains at least one pie.@EmailNotExistsConstraint- validates email uniqueness where required.@UsernameNotExistsConstraint- validates username uniqueness during registration.@TelephoneConstraint- validates Greek telephone number formats.@OrderTimestampConstraint- validates order timing according to the application's order rules.@OrderItemValuesConstraint- validates pie quantities from 0 to 100.@MessageConstraint- validates contact messages between 5 and 100 characters.
Handles authentication-related operations and user registration. Passwords are encoded with BCrypt before being stored.
Provides reusable email functionality through JavaMailSender, including plain-text and HTML emails.
Builds the email content used by the application for:
- Account verification.
- Contact form confirmations.
- New order notifications.
- Order confirmations.
- Password reset messages.
Provides the application's Twilio-based SMS integration.
Maintains basic in-memory visit counters for application pages and pies.
Email delivery is implemented through Gmail SMTP using Spring Mail.
The application sends emails for important user and order events, including:
- Account verification.
- Password recovery.
- Contact form confirmation.
- New order notification.
- Order confirmation.
The application also includes a Twilio-based SMS service for notification-related functionality.
The project includes message property files for English and Greek locales, providing a foundation for localized application messages.
VisitsMetricsService provides basic in-memory visit statistics for pages and pies. The counters are maintained while the application is running and reset when the application restarts.
| Method | Path | Controller | Description |
|---|---|---|---|
| GET | / |
IndexController |
Home page |
| GET | /pies |
PiesController |
Pie catalog |
| GET | /pies/{id} |
PiesController |
Pie details and ingredients |
| POST | /pies/{id} |
PiesController |
Add pie quantity to cart |
| GET / POST | /buy |
BuyController |
Cart and checkout |
| GET / POST | /contact |
ContactController |
Contact form |
| GET | /store |
StoreController |
Store information |
| GET | /login |
AuthController |
Login page |
| POST | /login |
Spring Security | Process login |
| GET | /do-logout |
AuthController |
Logout confirmation page |
| GET | /logout |
Spring Security | Logout |
| GET / POST | /register |
AuthController |
User registration |
| GET | /register/{code} |
AuthController |
Email verification |
| GET / POST | /password-reset |
AuthController |
Password reset request |
| GET | /password-reset/{code} |
AuthController |
Password reset code verification |
| POST | /password-reset2 |
AuthController |
Set new password |
| GET | /admin |
AdminController |
Administration panel |
| GET | /admin/{action} |
AdminController |
Administration action |
| GET | /send-sms |
SendSMSController |
SMS notification endpoint |
| GET | /attr |
AttrController |
Application/demo endpoint |
| GET | /error |
CustomErrorController |
Custom error page |
Developed by Nikolaos Poulopoulos.




















