Engineering Challenges
The adoption workflow needed careful business-rule enforcement on the backend — only one adoption request per pet can ever be approved, owners can't request their own pets, and approving a request must atomically flip the pet's status to adopted so no further requests slip through. Search and filtering across pet listings (by name and species) also required tuning MongoDB's $regex and $in operators to stay fast and accurate as data grew, all behind JWT auth issued via HTTPOnly cookies rather than a client-exposed token.
