A comprehensive asset management system designed for Wildlife SOS rescue centers across India. Track medical supplies, equipment, and resources for wildlife conservation with real-time updates and advanced filtering capabilities.
- Asset Management: Add, view, edit, and track conservation assets
- Real-time Updates: Automatic table refresh after asset operations
- Location-based Filtering: Filter assets by Wildlife SOS rescue centers
- Asset Type Filtering: Filter by long-term equipment, medical supplies, or perishable items
- Search Functionality: Search assets by name, description, or details
- CSV Export: Export filtered asset data with summary statistics
- Google OAuth Integration: Secure login with Google accounts
- Session Management: NextAuth.js-based authentication
- User Tracking: "Logged By" field tracks who added/updated assets
- Protected Routes: Middleware-based route protection
- MongoDB Integration: Mongoose-based database operations
- Data Validation: Zod schema validation for all inputs
- Error Handling: Comprehensive error handling and user feedback
- Database Health Monitoring: API endpoints for system diagnostics
- Responsive Design: Mobile-first design using Tailwind CSS
- Wildlife SOS Branding: Custom theme with organization colors and branding
- Loading States: Smooth loading animations and feedback
- Form Validation: Real-time form validation with helpful error messages
- Toast Notifications: Success and error feedback for user actions
- Frontend: Next.js 15, React 18, TypeScript
- Styling: Tailwind CSS, Custom Wildlife SOS theme
- Authentication: NextAuth.js with Google Provider
- Database: MongoDB with Mongoose ODM
- Validation: Zod schema validation
- Form Handling: React Hook Form with Zod resolver
- Deployment: Vercel-ready with environment configuration
The system supports asset tracking across all major Wildlife SOS facilities:
- Elephant Conservation and Care Centre
- Agra Bear Rescue Facility
- Bannerghatta Bear Rescue Centre
- Manikdoh Leopard Rescue Centre
- Elephant Hospital
- Dachigam Rescue Centre
- Pahalgam Rescue Centre
- Elephant Rehabilitation Centre
- Wildlife SOS Transit Facility
- Human Primate Conflict Mitigation Centre
- Van Vihar Bear Rescue Facility
- West Bengal Bear Rescue Centre
- Node.js 18+
- MongoDB database (local or Atlas)
- Google OAuth credentials
- Clone the repository
git clone https://github.com/Aadhavsb/inventory360.git
cd inventory360- Install dependencies
npm install- Set up environment variables
Create a
.env.localfile in the root directory:
# MongoDB
MONGODB_URI=your_mongodb_connection_string
# NextAuth.js
NEXTAUTH_SECRET=your_nextauth_secret
NEXTAUTH_URL=http://localhost:3000
# Google OAuth
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret- Run the development server
npm run devOpen http://localhost:3000 to view the application.
npm run build
npm startinventory360/
βββ app/
β βββ api/ # API routes
β β βββ asset/ # Asset CRUD operations
β β βββ auth/ # NextAuth configuration
β β βββ debug/ # System diagnostics
β βββ inventory/ # Main inventory dashboard
β β βββ AssetForm.tsx # Asset creation/editing form
β β βββ AssetTable.tsx # Asset display and management
β β βββ ui.tsx # Main dashboard UI
β βββ login/ # Authentication pages
β βββ globals.css # Global styles and Wildlife SOS theme
βββ lib/
β βββ models/ # MongoDB/Mongoose models
β βββ auth.ts # NextAuth configuration
β βββ mongodb.ts # Database connection
β βββ validation.ts # Zod schemas
βββ public/ # Static assets and logo
βββ middleware.ts # Route protection and rate limiting
GET /api/asset- Fetch all assetsPOST /api/asset- Create new assetPUT /api/asset- Update existing asset
POST /api/auth/signin- Google OAuth signinPOST /api/auth/signout- User signout
GET /api/debug- System health checkGET /api/test-db- Database connectivity test
The application uses a custom Wildlife SOS theme defined in tailwind.config.js:
- Primary Green:
#2D5016(wildlife-green) - Background:
#F8F6F0(wildlife-ivory) - Accent Colors: Various shades for different UI elements
- Typography: Poppins font family for modern, clean appearance
- Environment Variable Protection: Sensitive data in environment variables
- Git History Cleaning: Removed any accidentally committed secrets
- Rate Limiting: API endpoint protection against abuse
- Input Validation: Comprehensive client and server-side validation
- Session Security: Secure JWT-based session management
Each asset contains:
- Basic Information: Name, type, status, acquisition method
- Location Data: Wildlife SOS center assignment
- Temporal Data: Acquisition date, creation/update timestamps
- User Tracking: Who logged/updated the asset
- Additional Details: Optional description field
- Connect your GitHub repository to Vercel
- Configure environment variables in Vercel dashboard
- Deploy automatically on push to main branch
Ensure all environment variables are properly set in your deployment platform:
MONGODB_URINEXTAUTH_SECRETNEXTAUTH_URLGOOGLE_CLIENT_IDGOOGLE_CLIENT_SECRET
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is built for Wildlife SOS conservation efforts. Please respect the organization's mission and use responsibly.
For support or questions:
- Create an issue in the GitHub repository
- Contact the Wildlife SOS technical team
- Check the documentation for common solutions
Built with β€οΈ for Wildlife Conservation
Inventory360 helps Wildlife SOS rescue centers efficiently manage their conservation assets, ensuring better care for rescued wildlife across India.
.jpg)