How newbie1337x/stockify works
Project type and purpose
• Stockify is a Spring Boot–based, RESTful, back-end monolith that provides an inventory and point-of-sale (POS) management system. It exposes HTTP/JSON endpoints (with HATEOAS links), uses JWT for authentication, and persists data in PostgreSQL. There is no separate front-end code here—clients (web SPA, mobile apps or Postman) consume its APIs, generate PDFs (via Thymeleaf templates), and send emails.
File structure
• Top-level folders:
• config – Spring and OpenAPI/Swagger configurations, startup/bootstrapping settings
• controller – HTTP API layer, organized by domain modules (product, provider, store, transaction, shift) plus cross-cutting controllers (AuthController, PdfGeneratorController)
• dto – Data Transfer Objects, subdivided into request/response payloads per use case
• model – domain:
– entity – JPA @Entity classes
– assembler – “ModelAssembler” classes to convert entities to HATEOAS models
– mapper – MapStruct (or manual) mappers between DTOs and entities
– repository – Spring Data JPA interfaces
– service – business-logic interfaces and implementations
– exception – application-wide exceptions and global handler
– specification – dynamic query builders for filtering
• security – Spring Security setup, JWT filters, AuthController, user/role/permit entities and repos, JwtService
• src/main/resources – application.properties, SQL scripts for DB initialization, Thymeleaf templates for PDF, Swagger UI resources
• Key build/config files: pom.xml, mvnw, .mvn/wrapper, .gitignore.
README for additional insights
• It confirms a layered architecture: Controllers → Services → Repositories
• Patterns: DTOs, MapStruct mapping, Hibernate Validator, centralized exception handling, JWT auth, HATEOAS, OpenAPI/Swagger documentation, Thymeleaf for PDF templates.