Add "wellmann-shop"
+124
@@ -0,0 +1,124 @@
|
||||
# 🛒 wellmann-shop — B2B Printing Shop
|
||||
|
||||

|
||||
|
||||
**wellmann-shop** is a Java EE web application for a B2B printing and stationery company (Wellmann). It provides product browsing, customer management, a shopping cart, domain ticket tracking, and role-based access control for both regular users and managers. Built from scratch by Patrick using NetBeans and PrimeFaces — no AI assistance.
|
||||
|
||||
## Architecture
|
||||
|
||||
Single-module Maven WAR project following classic Jakarta EE layered architecture:
|
||||
|
||||
```
|
||||
src/main/java/
|
||||
├── httpauthenticationmechanism/
|
||||
│ ├── ApplicationConfig.java ← JAX-RS + Security config
|
||||
│ └── LoginBean.java ← Authentication backing bean
|
||||
└── plate/wellmann/shop/
|
||||
├── business/ ← @Named @SessionScoped CDI service beans
|
||||
│ ├── CustomerManager.java ← Customer CRUD + active customer producer
|
||||
│ ├── ItemManager.java ← Product/item management + ticket retrieval
|
||||
│ ├── MyPasswordHash.java ← PBKDF2 password hashing implementation
|
||||
│ ├── PasswordManager.java ← Password lifecycle management
|
||||
│ ├── ShoppingcartManager.java ← Shopping cart state + operations
|
||||
│ └── UserDomainManager.java ← User domain + role management
|
||||
│ └── test/ ← JPA Facade classes (generated)
|
||||
│ ├── MyUserGroupsFacade.java
|
||||
│ ├── PaperFacade.java
|
||||
│ ├── PasswordFacade.java
|
||||
│ ├── SaltFacade.java
|
||||
│ └── UserDomainFacade.java
|
||||
└── controller/ ← JSF backing controllers
|
||||
├── CostumerController.java ← Customer profile controller
|
||||
├── CustomerController.java ← Customer list/management controller
|
||||
├── DomainTicketController.java ← Support ticket controller
|
||||
├── ProductController.java ← Product catalog controller
|
||||
├── ShoppingcartController.java ← Cart view controller
|
||||
├── ThemeController.java ← PrimeFaces theme switcher
|
||||
└── user/
|
||||
├── EmailController.java ← Contact/email form controller
|
||||
└── UserTicketsController.java ← User-facing ticket view
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
- **Product Catalog** — Browse printing products (business cards, letterheads, forms, envelopes) with images
|
||||
- **Shopping Cart** — `@SessionScoped` cart with add/remove, persistent across page navigation
|
||||
- **Customer Management** — Full CRUD for B2B customers with billing information
|
||||
- **User Authentication** — Jakarta Security API login with PBKDF2 + salt password hashing
|
||||
- **Role-Based Access Control** — Separate manager and user view areas
|
||||
- **Domain Ticket System** — Support/inquiry ticket tracking per customer
|
||||
- **Theme Switching** — PrimeFaces theme selector (all-themes 1.0.10)
|
||||
- **Business Card Generator** — Custom business card configurator (`visitenkarten-klassiker.xhtml`)
|
||||
- **Responsive Layout** — Template-based JSF layout with custom CSS
|
||||
|
||||
## UI Pages
|
||||
|
||||
```
|
||||
webapp/
|
||||
├── index.html / index.xhtml ← Landing page
|
||||
├── login.xhtml ← Authentication page
|
||||
├── welcome.xhtml ← Post-login welcome
|
||||
├── welcomePrimefaces.xhtml ← PrimeFaces demo/test page
|
||||
├── error.xhtml ← Error page
|
||||
└── resources/
|
||||
├── layout/template.xhtml ← Master Facelets template
|
||||
├── manager/ ← Manager role views
|
||||
│ ├── welcome.xhtml ← Manager dashboard
|
||||
│ ├── products.xhtml ← Product management
|
||||
│ ├── shoppingcart.xhtml ← Manager cart view
|
||||
│ ├── visitenkarten.xhtml ← Business card management
|
||||
│ └── generator/
|
||||
│ └── visitenkarten-klassiker.xhtml ← Card configurator
|
||||
└── users/ ← Regular user views
|
||||
├── welcome.xhtml ← User dashboard
|
||||
└── shoppingcart.xhtml ← User cart view
|
||||
```
|
||||
|
||||
## Tech Stack (from pom.xml)
|
||||
|
||||
| Dependency | Version | Purpose |
|
||||
|---|---|---|
|
||||
| `org.primefaces:primefaces` | 6.2 | JSF component library |
|
||||
| `org.primefaces.themes:all-themes` | 1.0.10 | PrimeFaces theme pack |
|
||||
| `org.eclipse.persistence:eclipselink` | 2.7.3 | JPA implementation |
|
||||
| `org.eclipse.persistence:javax.persistence` | 2.2.1 | JPA API (provided) |
|
||||
| `javax:javaee-api` | 8.0 | Java EE 8 API (provided) |
|
||||
| `mysql:mysql-connector-java` | 5.1.46 | MySQL JDBC driver |
|
||||
| `commons-codec:commons-codec` | 1.11 | PBKDF2 password hashing |
|
||||
| `log4j:log4j` | 1.2.17 | Logging |
|
||||
| `junit:junit` | 4.11 | Unit testing (test scope) |
|
||||
| `selenium-java` | 2.44.0 | UI testing (test scope) |
|
||||
|
||||
- **Java version:** 1.8 (Java 8)
|
||||
- **Packaging:** WAR
|
||||
- **GroupId:** `Plate`, ArtifactId: `Wellmann-Shop`, Version: `0.2`
|
||||
- **Persistence unit:** `MySQL-Wellmann` (configured in `META-INF/persistence.xml`)
|
||||
|
||||
## Key Packages
|
||||
|
||||
| Package | Role |
|
||||
|---|---|
|
||||
| `httpauthenticationmechanism` | Security config + login |
|
||||
| `plate.wellmann.shop.business` | `@Named` CDI service beans |
|
||||
| `plate.wellmann.shop.business.test` | JPA Facade classes (entity access) |
|
||||
| `plate.wellmann.shop.controller` | JSF backing beans |
|
||||
| `plate.wellmann.shop.controller.user` | User-specific view controllers |
|
||||
| `plate.wellmann.shop.persistence` | JPA entities (Customer, Item, UserDomain, etc.) |
|
||||
|
||||
## Build & Deploy
|
||||
|
||||
```bash
|
||||
cd java/wellmann-shop
|
||||
mvn clean package
|
||||
# Deploy target/Wellmann-Shop-0.2.war to WildFly/JBoss
|
||||
# Configure MySQL datasource: persistence.xml -> MySQL-Wellmann
|
||||
```
|
||||
|
||||
### WildFly Deployment Descriptors
|
||||
- `WEB-INF/jboss-web.xml` — context root configuration
|
||||
- `WEB-INF/jboss-app.xml` — application metadata
|
||||
- `WEB-INF/faces-config.xml` — JSF navigation rules
|
||||
|
||||
## Notes
|
||||
|
||||
Built by Patrick using NetBeans IDE. The project demonstrates full-stack Java EE development: JSF frontend, CDI-managed business layer, JPA persistence against MySQL, and Jakarta Security for authentication — all without Spring Boot or any modern framework abstraction.
|
||||
Reference in New Issue
Block a user