An elegant, secure, and modern web application developed for campus stray animal care coordination. Featured as a university course term project.
- About the Project
- Key Features
- System Architecture
- Technology Stack
- Project Directory Structure
- Setup and Run
- Demo Users & QR Codes
- API Endpoints
- License
PatiLink digitalizes and coordinates care processes for stray animals living on university campuses. Built with a responsive React frontend and a fast ASP.NET Core Minimal API backend, it connects volunteers, campus veterinarians, and administrators to ensure that no animal is left without water, food, or medical attention.
Below is the high-level system architecture showing how the client, backend API, database, and background services interact:
graph TD
subgraph Frontend ["Frontend (React Client - Port 5173)"]
UI["Vite & React App"] -->|Axios Requests| Proxy["Vite Proxy"]
end
subgraph Backend ["Backend (C# API Server - Port 5055)"]
Proxy -->|API Requests| API["Minimal API Endpoints"]
API -->|EF Core| DB[("SQLite Database")]
Worker["CareStatus Background Service"] -->|Database Scan| DB
end
style UI fill:#20232a,stroke:#61dafb,stroke-width:2px,color:#fff
style API fill:#512bd4,stroke:#fff,stroke-width:1px,color:#fff
style DB fill:#003b57,stroke:#fff,stroke-width:1px,color:#fff
style Worker fill:#e28743,stroke:#fff,stroke-width:1px,color:#fff
- π± Animal Directory: Dynamic catalog with filtering options (by campus location, urgency, status).
- π Interactive Location Map: Leaflet.js-powered campus map showing live feeding points. Markers dynamic color shift (green for routine, pulsing red for hungry/urgent).
- π± Smart Location-Verified QR System: Volunteers scan physical QR codes at feeding points using their mobile camera. The system checks location validity and highlights tasks on screen, preventing remote task manipulation.
- β° 6-Hour Care Policy: An integrated backend background service scans data every 15 minutes, automatically shifting care status to "Hungry" if 6 hours have passed since last feeding.
- π₯ Health & Medical Records: Dedicated panels for veterinarians to document check-ups, vaccines, and treatments, automatically triggering follow-up tasks.
- π¦ Need & Donation Tracking: Real-time listing of items needed (food, medication, dog beds) and tracking of volunteer donation commitments.
- π Secure Role-Based Access Control: Standard JWT authentication protecting APIs according to roles (
Admin,Vet,Volunteer).
- .NET 8 (ASP.NET Core) β Minimal API framework for lightweight, fast endpoints.
- Entity Framework Core (EF Core) β Code-First ORM supporting relational modeling.
- SQLite β Default embedded database for easy setup (SQL Server option available in settings).
- JWT Bearer Authentication β Secure token-based user sessions.
- BCrypt.Net-Next β Modern password hashing.
- Hosted Service (BackgroundService) β Scheduler for the 6-hour status checker.
- React 19 β Powered by Vite for fast, optimized hot-reloads.
- Tailwind CSS v4 β Utility-first styling with modern native HSL palettes and custom transitions.
- React Router v7 β Declarative routing with guard components.
- Leaflet & React Leaflet β Interactive maps based on OpenStreetMap.
- React QR Scanner β Camera-based QR decoding.
- Lucide React β Premium icon set.
patilink/
βββ server/ # Backend API (C#)
β βββ PatiLink.Api/
β βββ Data/
β β βββ PatiLinkDbContext.cs # EF Core context class
β β βββ DbSeeder.cs # Automatic demo data seed logic
β βββ Models/
β β βββ PatiLinkModels.cs # Data schema & DTO definitions
β βββ Services/
β β βββ CareStatusBackgroundService.cs # 6-hour care rule scheduler
β βββ Program.cs # Config and API routing endpoints
β βββ appsettings.json # DB & JWT configurations
βββ client/ # Frontend (React)
β βββ src/
β βββ api/
β β βββ apiClient.js # Axios middleware & headers configuration
β βββ components/
β β βββ Navbar.jsx # Responsive, role-based navigation bar
β β βββ Footer.jsx # Footer details
β β βββ ProtectedRoute.jsx # Route guardian checks
β βββ contexts/
β β βββ AuthContext.jsx # Global context for active sessions
β βββ pages/
β β βββ Home.jsx # Summary metrics and quick alerts
β β βββ Animals.jsx # Animal index page
β β βββ AnimalDetail.jsx # Detail, health logs, and tasks
β β βββ Needs.jsx # Needs board
β β βββ Donations.jsx # Donation tracker
β β βββ HealthLogs.jsx # Veterinary logs
β β βββ FeedingPoints.jsx # Map-based location organizer
β β βββ Contact.jsx # User reports
β β βββ VolunteerPanel.jsx # Simulation of camera scan
β β βββ AdminPanel.jsx # Admin settings
β βββ App.jsx # Route settings
β βββ index.css # Tailwind CSS tokens
βββ docs/ # Schema & documentation notes
βββ README.md
cd server/PatiLink.Api
dotnet run- The server will start by default at
http://localhost:5055. - A
PatiLink.dbfile will be created locally on first run and populated with rich sample data automatically. - Security Note: A development secret key is defined in
appsettings.json. Replace it with a secure environment variable key in production.
cd client
npm install
npm run dev- The web app will run locally at
http://localhost:5173. - API requests are automatically proxied to the backend via Vite config.
You can test the different access control levels using the following credentials:
| Password | Role | Access Level | |
|---|---|---|---|
admin@patilink.edu.tr |
123 |
Admin | Full control over locations, animals, and logs |
vet@patilink.edu.tr |
123 |
Veterinarian | Can log health reports and bypass QR codes for medical tasks |
gonullu@patilink.edu.tr |
123 |
Volunteer | Can assign themselves to tasks and resolve them via QR scan |
In the Volunteer Panel, you can simulate camera input by inputting these codes corresponding to local points:
| QR Code Identifier | Physical Location Point |
|---|---|
QR-ENG-001 |
Faculty of Engineering |
QR-LIB-002 |
Behind the Library |
QR-SPO-003 |
Sports Hall |
POST /api/auth/registerβ Standard user registration.POST /api/auth/loginβ Login (returns JWT Token).
GET /api/animalsβ Retreive animal list (supports query parameters).GET /api/animals/{id}β Retrieve detailed record.POST /api/animalsβ Create a new entry (Admin/Vet only).PUT /api/animals/{id}β Update animal profile (Admin/Vet only).DELETE /api/animals/{id}β Remove animal profile (Admin only).
GET /api/tasksβ List care duties.POST /api/tasksβ Create task duty.PATCH /api/tasks/{id}/assignβ Connect task with active volunteer.POST /api/tasks/{id}/completeβ Finish task (validates location QR code).
GET /api/needsβ List needed items.POST /api/needsβ Register new campus need.PATCH /api/needs/{id}/statusβ Modify need status.GET /api/donationsβ Retrieve donation logs.POST /api/donationsβ Record new donation commitment.
This project is licensed under the MIT License - see the LICENSE file for details. Developed as a term project.
