How mausmisinha/fintrack works
Project Type and Purpose
• This repository contains a Java Spring Boot backend service (“FinTrack”) for a personal finance tracking application.
• Although the README mentions a frontend stack (Oracle JET + JS), the code delivered here is purely the backend API, plus the bundled MySQL Connector library.
File‐Structure Analysis
• Top‐level:
• Db Schema.sql, Dummy Data for db.sql, Endpoint doc.txt – your database schema and endpoint specification.
• FinTrack/ – the Maven‐based Spring Boot application.
• mysql-connector-j-9.0.0/ – third-party MySQL driver source/jar (external library).
• Inside FinTrack/:
• pom.xml, .mvn/ – build configuration (Maven).
• src/main/java/com/fintrack/FinTrack/
– config/: Spring Security & JWT filter setup.
– filter/: JwtFilter for request authentication.
– controller/: REST controllers and their Impl classes (Budget_allocController, ExpenseController, etc.).
– service/: service interfaces and implementations (ExpenseServiceImpl, JWTService, MyUserDetailsService, etc.).
– repository/: Spring Data JPA repositories.
– entity/: JPA entity classes mapping to MySQL tables.
• src/main/resources/application.properties – DB, security and other configs.
• src/test/java/... – unit tests for application.
a. Main Components
• Frontend (Browser / Oracle JET + JS)
• API Gateway / Spring Boot Application
• Security Layer: SecurityConfig + JwtFilter + JWTService + MyUserDetailsService
• Controller Layer: Budget_allocController, ExpenseController, etc.
• Service (Business) Layer: ExpenseService, UserService, etc.
• Data Access Layer: Spring Data JPA Repositories
• Database: MySQL
• External Library: MySQL Connector/J
b. Relationships & Data Flows
1. User Agent (Browser or Postman) sends HTTP(S) → Spring Security filter chain (JwtFilter)
2. If authenticated, request → appropriate Controller
3. Controller delegates → Service layer
4. Service uses → Repository to perform CRUD on MySQL
5. Repository uses → MySQL Connector/J → communicates with MySQL DB
6. Response bubbles back Controller → HTTP response → User Agent
c. Architectural Patterns & Principles
• Layered (3-Tier) Architecture: Presentation (controllers), Domain (services), Persistence (repositories).
• Spring Security with JWT‐based stateless authentication.
• Dependency Injection via Spring Boot.
• Maven for build/dependency management.
• JPA for ORM mapping.
d. Key Technologies & Frameworks
• Spring Boot, Spring MVC, Spring Security, Spring Data JPA
• JWT (JSON Web Tokens)
• MySQL (8.0)
• MySQL Connector/J
• Maven