How mdasif114/seller-portal works
Project type and purpose
• This is a Java Spring Boot full-stack web application (“Seller Portal”) that serves HTML via Thymeleaf templates, handles user registration (user, identity, address, bank), authentication, and a dashboard. It uses embedded Tomcat, Spring MVC, Spring Data JPA, Spring Security, and an H2 in-memory database.
File structure
• Top-level:
• pom.xml, Maven wrapper — build & run
• src/main/java/com/seller/portal:
– configuration: SecurityConfiguration
– controller: MVC controllers (LoginController, Registration controllers, DashboardController)
– service: business logic services
– repositories: Spring Data JPA interfaces
– entities: JPA domain models
– validators & utils: DTOs and constants
• src/main/resources:
– application.properties, session-schema.sql
– templates: Thymeleaf HTML views
• Tests under src/test validate service layer behavior.
README for additional insights
• Launch via mvn spring-boot:run or running SellerPortalApplication.java
• Default port 8080, H2 console available under /h2-console
Main components
a. User’s Web Browser (Client)
b. Embedded Tomcat Server (within SellerPortalApplication)
c. Spring Security filter chain (authentication & authorization)
d. Controllers (MVC entry points)
e. Service Layer (business logic services)
f. Repository/Data Access Layer (Spring Data JPA)
g. H2 Database (in-memory)
h. Thymeleaf View Resolver / Template Engine
Relationships & interactions
• Browser → HTTP requests → Embedded Tomcat
• Tomcat → Security Filter → Controllers
• Controller → Service → Repository → H2 DB
• Service returns data → Controller → Thymeleaf templates → Browser
• application.properties drives port, database config
Architectural patterns & design principles
• Layered MVC (Controller → Service → Repository)
• Dependency Injection (Spring Boot auto-wiring)
• Convention-over-Configuration (Spring Boot starters)
• In-memory DB for dev/test (H2 with embedded console)
• DTO/Validator pattern for request payloads
Technologies & frameworks
• Java 11+ (or configured version)
• Spring Boot (Web, Security, Data JPA, Thymeleaf)
• Maven for build & CLI run
• H2 Database (in-memory)
• Thymeleaf for view rendering