How santosh4568/online-fir-system works
Project type and purpose
• This is a full-stack web application called JusticeNet – Online FIR System.
• The frontend folder contains a React/Vite Single-Page Application for user interactions (registration, login, filing & tracking FIRs).
• The backend is a Spring Boot MVC application (with Thymeleaf templates and REST controllers) that handles business logic, security, and data persistence.
File structure
• Top-level:
• Dockerfile – containerization
• pom.xml / .mvn – Maven build for the backend
• frontend/ – React SPA code (package.json, Vite config, src/components, src/pages)
• Backend (src/main/java/com/example/Online_FIR_System):
• Controller – Spring MVC controllers (UserController, error handlers)
• Model – JPA entities (User, FIR, ComplaintStatus, Role)
• Repository – Spring Data JPA interfaces for CRUD
• Services – business logic wrapping repositories
• config – WebConfig (CORS, view resolvers, static mapping)
• src/main/resources:
• application.properties – DB connection, JPA settings
• static/css & js – served assets
• templates – Thymeleaf views (login.html, home.html, officerHome.html, reports, etc.)
• Tests under src/test to verify application context and endpoints.
Key insights from README
• Core features for Users and Officers, with separate registration flows
• Spring Security + BCrypt for authentication/authorization
• MySQL as the persistent store
• MVC layering: Controllers → Services → Repositories → Database
Details
• User vs. Officer flows if space allows, showing role-based decisions in Spring Security.
• ComplaintStatus flow: filing → status update → tracking.
• Call out the WebConfig as enabling CORS if the React app is hosted separately.