How vatsalgandhi83/sj-hopes works
Project type and purpose
• SJ Hopes is a full-stack web application built for managing homelessness services (shelter availability, client casework, work opportunities, admin analytics).
• It consists of a React/Next.js frontend, a Spring Boot backend, and a relational database (MySQL/PostgreSQL).
File structure
• Top‐level directories:
– /backend/sjHopes → Spring Boot project (Gradle, Java 17+, layered MVC pattern)
– /frontend → Next.js/React application (TypeScript, MUI, Google Maps integration)
– /backend/sql/sample-data → raw SQL scripts for sample data
• Backend layering:
– src/main/java/com/sjhacks/sjhopes/controller → HTTP controllers (REST endpoints)
– mapper → DTO ↔ entity conversion
– service → business logic interfaces & implementations
– repository → Spring Data JPA repositories
– models/entity & models/dto → persistence models and API payloads
• Key config files: application.properties (datasource, JPA), Swagger/OpenAPI, Gradle wrapper.
• Frontend structure:
– src/app → Next.js “app router” pages (admin, clients, opportunities, shelters, tasks)
– src/api → Axios wrappers for REST endpoints
– src/components → reusable UI (modals, cards, maps, sections)
– src/hooks/useAuth.ts → authentication context
– public/images, globals.css, next.config.js, tsconfig.json.
README for additional insights
• Role-based access (public, caseworker, admin) drives conditional UI flows.
• Uses Springdoc OpenAPI to expose Swagger UI.
• Google Maps API for real-time shelter map.
• MySQL (or PostgreSQL) as primary datastore.
Detail
• Package-level breakdown if needed (e.g., controller vs service packages).
• Interactions like JWT/session auth if implemented.
• Data flow for key use cases: shelter search, client registration, task assignment, analytics retrieval.