Pet NGO is a complete project designed to make responsible animal adoption easier. NGOs can register pets that are available for adoption, while interested users can find them by location and filters such as size, age, and energy level.
The system was built with scalability, organized code, and sound architectural practices in mind, using modern technologies from the Node.js ecosystem.
Technologies
- Node.js + Fastify: A lightweight, high-performance API with strong TypeScript typing.
- PostgreSQL + Prisma ORM: A robust relational database with intuitive object-relational mapping.
- Zod: Safe validation for input data and DTOs.
- JWT: Token-based authentication and route-level access control.
- Vitest: Unit and end-to-end tests that improve reliability.
- Docker + Docker Compose: An isolated environment ready for deployment.
Key Features
- NGO registration with address and WhatsApp validation.
- Secure login using JWT authentication.
- Pet registration, linking every animal to an NGO.
- Pet search by city, which is required, plus optional filters.
- Detailed pet pages with complete information.
- Direct WhatsApp contact with the responsible NGO.
Project Organization
The code is divided into layers following Clean Architecture principles. Business rules (use-cases), data access (repositories), HTTP routes, and shared logic remain separate, making the system scalable, reusable, and testable.
src
├── use-cases # Business rules
├── repositories # Database interfaces and implementations
├── http # Routes, controllers, and validation
├── lib, utils # Authentication, helpers, and shared modules
├── env # Environment configuration
└── server.ts # Server initialization
Result
Pet API connects technology with meaningful social impact. By helping NGOs publish and manage animals and helping adopters quickly find the right pet, the project can increase adoption opportunities and reduce the number of abandoned animals.