How twilight2368/pet-care-system-software works
Project type and purpose
• This is a full-stack web application (“Pet Care Center Management System”) with a React-based frontend and a Spring Boot RESTful backend.
• It provides pet profile management, appointment booking, grooming, boarding services, notifications, and role-based access for owners, staff, vets, and admins.
File structure
• Top-level directories:
• frontend/client (React + Vite + Redux + Tailwind)
• backend/PawPalServer (Spring Boot, Maven, JPA/Hibernate)
• documents/REQUIREMENT.md
• Frontend details:
• src/app/store (Redux slices)
• src/apis/api.js (API client)
• src/pages/... & src/components/... (UI views and reusable components)
• Backend details:
• src/main/java/.../controllers (REST controllers)
• services/interfaces & services/implement (business logic)
• repositories (JPA repositories)
• domains/entities & domains/dtos (data models)
• configs (security, web, mapping, OpenAPI)
• filters (JWT auth, request logging)
• jobs (scheduled tasks)
• utils (JWT, encryption helpers)
• application.yml/properties (DB, server, mail, etc.)
Extract architecture insights from README
• Layered architecture following MVC / service-repository pattern
• Uses JWT for stateless auth, scheduled jobs for reminders
• Exposes REST endpoints for CRUD on pets, appointments, grooming, boarding, diet, medical records, notifications
• React SPA consumes these endpoints, manages global state via Redux
a. Main components
• Client (React SPA)
• API Gateway / Web Server (serving the SPA and forwarding API calls)
• Backend (Spring Boot application)
• Relational Database (e.g., MySQL/PostgreSQL or H2 for dev)
• External services:
• Email/SMS service for notifications
• Possibly cloud storage for pet photos
b. Relationships & data flows
• User → Browser → React SPA
• SPA → HTTP/HTTPS → Spring Boot Controllers
• Controllers → Services → Repositories → Database
• Services → Utils (JWT generation/validation) & Filters (auth)
• Scheduled Job → Services → Database & Notification service
• DB → Entities ↔ DTOs ↔ REST responses
c. Architectural patterns & principles
• Layered separation: Presentation (React), API (Controllers), Business (Services), Data (Repositories)
• Stateless authentication with JWT
• DTO mapping via MapperConfig and custom mappers
• Configuration classes centralize CORS, security, and OpenAPI docs
• Scheduled tasks handle periodic notifications
d. Key technologies/frameworks
• Frontend: React, Vite, Redux Toolkit, Tailwind CSS
• Backend: Spring Boot, Spring Security (JWT), Spring Data JPA, Maven
• Database: Relational (configured in application.yml)
• Build/Deployment: Maven wrapper, Vite, environment files (.env, .example.env)