Multi-model Animal Vitality Intelligence System
MAVIS is a backend system for monitoring animal health using sensor data. It collects, stores, and analyzes physiological and environmental metrics, and provides real-time updates along with basic health insights.
The focus of this project is to build a clean, scalable backend that can later support IoT devices and a frontend dashboard.
- Node.js, Express.js
- MongoDB Atlas with Mongoose
- Socket.IO (real-time updates)
- Joi (validation)
- Docker & Docker Compose
The backend follows a layered structure:
- Controller → handles requests/responses
- Service → business logic
- Repository → database operations
This separation keeps the code organized and easier to extend.
MAVIS/
├── backend/
│ ├── config/
│ ├── controllers/
│ ├── middlewares/
│ ├── models/
│ ├── repositories/
│ ├── routes/
│ ├── services/
│ ├── schemas/
│ └── server.js
├── frontend/ (planned)
├── docker-compose.yml
└── README.md
- Store sensor data (temperature, heart rate, etc.)
- Fetch latest data per animal
- Query historical data using time ranges
- Basic alert conditions (e.g., high temperature, low battery)
- Real-time updates using Socket.IO
GET /→ Health checkPOST /api/sensor→ Add sensor dataGET /api/sensor/latest/:animalId→ Latest dataGET /api/sensor/history/:animalId→ Historical data
git clone <repo-link>
cd MAVISPORT=5000
MONGO_URI=mongodb+srv://<username>:<password>@<cluster>/mavisMake sure
.envis not committed
docker compose up --build- API: http://localhost:5000
- Database: MongoDB Atlas
- MongoDB is hosted on Atlas (no local DB required)
- CORS is currently open for development and will be restricted later
- Error handling and validation are implemented for API safety
- Add anomaly detection on sensor data
- Build frontend dashboard
- Integrate with actual IoT devices
- Improve alert system
Project is still under development and being actively improved.