A full-featured Bookstore Web Application built using Spring Boot
, Thymeleaf
, and Bootstrap
.
This project demonstrates CRUD operations, Add to Cart, Role-Based Access Control, and Session management, making it perfect for real-world internship/project showcase.
- ✅ View list of all books
- ✅ Add books to cart
- ✅ View cart with total price
- 🔐 Cannot Add/Delete/Update books
- ✅ Add New Book (with image, price, stock, etc.)
- ✅ Update existing book by Title
- ✅ Delete book by Title
- ✅ Role-based protected routes
- ✅ Secure login/logout functionality
- Built using MVC Architecture
- Cart stored in HttpSession
- Dynamic routing using Thymeleaf
- Session-based cart management
- Proper validations and fallback logic
Layer | Technology |
---|---|
Backend | Spring Boot, Java |
Frontend | Thymeleaf + Bootstrap |
Build Tool | Maven |
View Engine | Thymeleaf |
Security | Spring Security (RBAC) |
Database | In-Memory (for now) |
Hosting | (optional) Render/Railway |
For testing login system:
Role | Username | Password |
---|---|---|
ADMIN | admin | admin123 |
USER | user | user123 |
-
New Login Page
git clone https://github.com/yourusername/online-bookstore.git cd online-bookstore
Use the following command to run the project:
./mvnw spring-boot:run
├── Controller/ # All controllers (routes)
├── Model/ # Book.java entity
├── Service/ # Service layer interfaces and implementations
├── Repository/ # BookRepository interface (JPA)
├── config/ # Spring Security configuration
├── templates/ # Thymeleaf HTML pages
├── static/ # CSS, JavaScript, and images
└── application.properties
- New Login UI
- User registration and profile management
- Pagination and sorting on the homepage
- RESTful APIs with Postman Collection
- Payment Gateway Integration Soon...
My License – Free for learning, educational use, and personal modifications.
Ankit Kumar Gurjar
📧 Email: ankdoi82@gmail.com
🔗 LinkedIn: https://www.linkedin.com/in/ankit-kumar-gurjar
📂 GitHub: https://github.com/ankitdoi--coder