How dominic20-03/pawrescue works
PawRescue is a role-based animal rescue management application. Users authenticate, then work in a dashboard covering rescue reports, pet records, operations, medical care, shelters, adoption applications, and administration. The client’s hash-based app selects the pages; the server mounts API route modules that enforce authentication and use Prisma for persistent data. Source excerpts show the application entry point, authentication, reports, medical and shelter operations, and route registration. Several page-to-API connections are marked unverified because their request implementations were not sampled.
Main entry points: App.tsx App navigation · index.ts Express API · api.ts API request client · db.ts Prisma client
Components 26
Web client
- App navigation
client/src/App.tsx - Workspace layout
client/src/components/Layout.tsx - Sign-in / registration
client/src/pages/Auth.tsx - Client auth state
client/src/context/AuthContext.tsx - API request client
client/src/api.ts - Dashboard
client/src/pages/Dashboard.tsx - Rescue reports
client/src/pages/Reports.tsx - Pet records
client/src/pages/Pets.tsx - Operations
client/src/pages/Operations.tsx - Medical care
client/src/pages/Medical.tsx - Shelter management
client/src/pages/Shelters.tsx - Adoption applications
client/src/pages/Applications.tsx - User management
client/src/pages/UserManagement.tsx
API services
- Express API
server/src/index.ts - Authentication routes
server/src/routes/auth.ts - Report workflow
server/src/routes/reports.ts - Pet routes
server/src/routes/pets.ts - Medical / shelters
server/src/routes/operations.ts - Adoption routes
server/src/routes/adoptions.ts - Volunteer assignments
server/src/routes/assignments.ts - Dashboard data
server/src/routes/dashboard.ts - User routes
server/src/routes/users.ts - Auth / role checks
server/src/middleware/auth.ts
Persistence
- Prisma client
server/src/db.ts - Application database
Other components
- Rescue staff / public
Connections 48
- Rescue staff / public → App navigation: uses
- App navigation → Client auth state: checks session
client/src/App.tsx - App navigation → Sign-in / registration: shows signed-out
client/src/App.tsx - App navigation → Workspace layout: renders workspace
client/src/App.tsx - App navigation → Dashboard: selects page
- App navigation → Rescue reports: selects page
- App navigation → Pet records: selects page
- App navigation → Operations: selects page
- App navigation → Medical care: selects page
- App navigation → Shelter management: selects page
- App navigation → Adoption applications: selects page
- App navigation → User management: selects page
- Client auth state → API request client: requests session
client/src/context/AuthContext.tsx - Sign-in / registration → Client auth state: uses auth
- Adoption applications → API request client: submits decisions
client/src/pages/Applications.tsx - Dashboard → API request client: loads data
- Rescue reports → API request client: loads reports
- Pet records → API request client: loads pets
- Operations → API request client: loads operations
- Medical care → API request client: loads records
- Shelter management → API request client: loads shelters
- User management → API request client: loads users
- Express API → Authentication routes: mounts routes
server/src/index.ts - Express API → Report workflow: mounts routes
server/src/index.ts - Express API → Pet routes: mounts routes
server/src/index.ts - Express API → Medical / shelters: mounts routes
server/src/index.ts - Express API → Adoption routes: mounts routes
server/src/index.ts - Express API → Volunteer assignments: mounts routes
server/src/index.ts - Express API → Dashboard data: mounts routes
server/src/index.ts - Express API → User routes: mounts routes
server/src/index.ts - Authentication routes → Prisma client: reads / writes
server/src/routes/auth.ts - Report workflow → Prisma client: reads / writes
server/src/routes/reports.ts - Medical / shelters → Prisma client: reads / writes
server/src/routes/operations.ts - Pet routes → Prisma client: reads / writes
server/src/routes/pets.ts - Adoption routes → Prisma client: reads / writes
server/src/routes/adoptions.ts - Volunteer assignments → Prisma client: reads / writes
server/src/routes/assignments.ts - Dashboard data → Prisma client: reads data
server/src/routes/dashboard.ts - User routes → Prisma client: reads / writes
server/src/routes/users.ts - Auth / role checks → Prisma client: loads user
server/src/middleware/auth.ts - Authentication routes → Auth / role checks: protects session
server/src/routes/auth.ts - Report workflow → Auth / role checks: checks access
server/src/routes/reports.ts - Medical / shelters → Auth / role checks: checks roles
server/src/routes/operations.ts - Adoption routes → Auth / role checks: checks access
server/src/routes/adoptions.ts - Volunteer assignments → Auth / role checks: checks access
server/src/routes/assignments.ts - Dashboard data → Auth / role checks: checks access
server/src/routes/dashboard.ts - User routes → Auth / role checks: checks access
server/src/routes/users.ts - Prisma client → Application database: persists data
- API request client → Express API: calls API