A Spring Boot web application designed for managing products and vendors in a secure database environment. This application provides a comprehensive solution for product catalog management with features for adding, viewing, and managing products and their associated vendors.
- Add Products: Create new products with detailed information including:
- Product name, part number, and manufacturer part number
- Price and category classification
- Manufacturer selection from predefined options
- Detailed product descriptions (facts, installation notes, general description)
- View Products: Browse all products with filtering capabilities
- Update Products: Edit existing product information
- Delete Products: Remove products from the catalog
- Filter Products: Filter by category and manufacturer
- Search Products: Find products by keyword
- Add Vendors: Register new vendors with contact information
- View Vendors: Display all registered vendors
- Vendor-Product Association: Link vendors with products they supply
- Filters are handled via enum class objects
- New filters can easily be added
- Framework: Spring Boot 3.5.3
- Language: Java 21
- Database: H2 Database (file-based persistence)
- Web Framework: Spring MVC
- Template Engine: Thymeleaf
- ORM: Spring Data JPA with Hibernate
- Validation: Jakarta Bean Validation
- Build Tool: Gradle (Kotlin DSL)
- Frontend: Bootstrap 5.1.3
- Java 21 or higher
- Gradle 7.0 or higher (wrapper included)
git clone https://github.com/lando-tech/product-db-webapp.git
cd product-db-webapp# Using Gradle wrapper (recommended)
./gradlew bootRun
# Or build first, then run
./gradlew build
java -jar build/libs/db_secure-0.0.1-SNAPSHOT.jar- Main Application: http://localhost:8080
- H2 Database Console: http://localhost:8080/h2-console
- JDBC URL:
jdbc:h2:file:~/spring-boot-h2-db102-v3 - Username:
sa - Password: (empty)
- JDBC URL:
src/
βββ main/
β βββ java/com/easyrok/db_secure/
β β βββ Main.java # Application entry point
β β βββ controllers/ # MVC Controllers
β β β βββ AddProductFormController.java
β β β βββ AddVendorFormController.java
β β β βββ DashboardController.java
β β β βββ ProductViewController.java
β β β βββ VendorViewController.java
β β β βββ SiteSurveyController.java
β β βββ models/ # Entity classes
β β β βββ Product.java # Abstract base class
β β β βββ GenericProduct.java # Concrete product implementation
β β β βββ ProductDescription.java # Product details
β β β βββ Vendor.java # Vendor entity
β β β βββ User.java # User entity
β β β βββ Auditor.java # Audit tracking
β β β βββ ProductAuditor.java # Product-specific auditing
β β βββ repositories/ # Data access layer
β β β βββ ProductRepo.java
β β β βββ VendorRepo.java
β β β βββ ProductDescriptionRepo.java
β β βββ services/ # Business logic layer
β β β βββ ProductService.java
β β β βββ ProductServiceImpl.java
β β β βββ VendorService.java
β β β βββ VendorServiceImpl.java
β β β βββ ProductFilterServiceImpl.java
β β βββ filters/ # Enums and filters
β β β βββ ProductCategory.java
β β β βββ Manufacturer.java
β β β βββ ProductFilter.java
β β βββ validators/ # Custom validators
β βββ resources/
β βββ application.properties # Application configuration
β βββ static/ # Static resources
β βββ templates/ # Thymeleaf templates
β βββ dashboard.html
β βββ productForm.html
β βββ productView.html
β βββ vendorForm.html
β βββ vendorView.html
β βββ fragments/
βββ test/ # Test classes
The application uses H2 database with file-based persistence. Configuration in application.properties:
# H2 Database
spring.h2.console.enabled=true
spring.h2.console.path=/h2-console
spring.datasource.url=jdbc:h2:file:~/spring-boot-h2-db102-v3
spring.datasource.username=sa
spring.datasource.password=
spring.datasource.driverClassName=org.h2.Driver
# JPA/Hibernate
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=trueGET /dashboard- Application dashboardGET /productForm- Add new product formPOST /productForm- Submit new productGET /productView- View all products (with filtering)GET /showProductUpdateForm/{id}- Edit product formPOST /deleteProduct/{id}- Delete product
GET /vendorForm- Add new vendor formPOST /vendorForm- Submit new vendorGET /vendorView- View all vendors
GET /siteSurveyForm- Site survey formGET /h2-console- Database console
id(Primary Key)name(Product name)partNumber(Internal part number)manufacturerNumber(Manufacturer's part number)price(Product price)productCategory(Category enum)manufacturer(Manufacturer enum)auditor(Audit information)
id(Primary Key)name(Vendor name)pocEmail(Point of contact email)pocPhoneNumber(Contact phone)cageCode(Commercial and Government Entity Code)
id(Primary Key)productFacts(Product specifications)installationDescription(Installation notes)generalDescription(General description)product(One-to-one relationship with Product)
- Input validation using Jakarta Bean Validation
- SQL injection protection through JPA/Hibernate
- XSS protection through Thymeleaf templating
- Audit trail for product changes
Run the test suite:
./gradlew testThis project is actively under development. See TODO.md for current development priorities and planned features.
- β Core product CRUD operations
- β Vendor management system
- β Product filtering and search
- β Audit trail implementation
- β Form validation
- π UI/UX improvements
- π Advanced search functionality
- π Inventory tracking features
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions, please contact the development team or create an issue in the repository.
- Group: com.demo
- Artifact: db_secure
- Version: 0.0.1-SNAPSHOT
- Java Version: 21
- Spring Boot Version: 3.5.3