Account access
A visitor registers as pet owner, farmer, or provider, then receives HttpOnly JWT cookies. Provider accounts start inactive.
Public discovery
Visitors read the animal catalog, bilingual resources, and the Bangladesh geography tree without authentication.
AI diagnosis
An anonymous or signed-in user submits an animal type and problem description; Gemini returns urgency, diagnosis, care advice, resources, and ranked providers.
Provider onboarding
A provider-role user creates one flat ServiceProvider profile with type, location, contact, and supported animals. It remains unverified and hidden from public lists.
Provider verification
Verification happens only in Django admin. The approve action generates a new password, activates the user, marks the profile verified, and emails credentials.
Service setup
The provider adds priced services and keeps supported animal links in sync, then customers can select those services when booking.
Provider search
Public discovery filters verified active providers by type, animal, region, or 15km GPS radius and reports whether the match was exact or a fallback.
Provider detail
The detail page shows verified provider information, location, contact, services, supported animals, rating, and public reviews.
AI chat session
A signed-in user starts or continues a session; the API injects resource context, appends turns, and on completion writes urgency, advice, and provider matches.
Create booking
A pet owner or farmer books a specific provider service and animal type. The API validates the relationship and creates a pending appointment.
Booking decision
The provider owner changes the appointment status; customers may only cancel and admins may set any status.
Booking cancelled
A customer or provider cancels the appointment. The status persists and the counterpart is notified; no payment or slot release exists.
Visit completed
The provider or admin marks the booking completed, which unlocks the customer's one review.
Write review
The booking customer submits one 1-5 review with an optional bilingual comment. The reviewer and provider are derived, and the provider aggregate refreshes.
Review lifecycle
The review author or an admin can update or delete a review; deletion recalculates the provider rating.
Create rehoming listing
An authenticated owner publishes pet identity, health, photo, reason, requirements, and location. Only cat and dog types pass validation.
Rehoming discovery
Public discovery exposes active listings, filtered by district, GPS radius, or the signed-in user's local network fallback.
Submit application
A signed-in user applies to an active listing with a message. Self-application, inactive listings, and duplicates are rejected before AI scoring.
AI adoption score
Gemini receives the listing requirements and applicant message and returns a 0-10 fit score that is stored on the application.
Adoption decision
The listing owner or admin moves an application to reviewed, rejected, approved, or cancelled. Approval closes the listing and rejects every other application.
Adoption complete
The listing leaves public discovery and the approved application is final. No pet-ownership record is transferred.
Notification feed
Booking, application, and review signals create bilingual notification rows; users read and mark them through a self-scoped inbox.
Saved items
Authenticated users bookmark providers or resources through a generic saved-item table and see saved state on detail/list responses.
Admin operations
Django admin handles account activation, provider verification, and moderation; the API adds only admin-only animal-type writes.