💡 Inspiration

Managing animal sanctuaries, nurseries, or mixed-species farms has always been a game of guesswork. Traditional methods rely on scattered paperwork or generic calculators, often leading to overcrowded spaces, stressed animals, and dangerous predator-prey conflicts. We wanted to transform how sanctuaries are built by moving from guesswork to mathematical precision, prioritizing animal welfare and ecosystem sustainability.

⚙️ What it does

Ani-plan is a next-generation Veterinary Herd Canvas Engine.

  • True-Scale Canvas: Users input enclosure dimensions (e.g., 20x20m), and the engine creates a proportional grid. Animals are placed as SVG nodes sized strictly to their real-world footprint requirements.
  • Ecosystem Synergy Matrix: The engine dynamically calculates relationships. If you attempt to place a predator near prey, the Conflict Defense system immediately warns you to prevent a disaster.
  • Context-Aware AI Vet: Powered by Gemini 1.5 Pro, the built-in Vet Expert silently ingests your exact farm state (animals, area, weather) to give highly tailored veterinary advice.
  • AI Farm Visualizer: Using Pollinations.ai, the dashboard generates a breathtaking, photorealistic 8K 3D render of your specific animals coexisting in a vibrant sanctuary field.

🛠️ How we built it

We built the frontend using Next.js (App Router), React 18, and TypeScript, styling it with a rich emerald glassmorphism theme via Tailwind CSS. For the intelligence layer, we deeply integrated the Google Gemini API for veterinary context, and Pollinations.ai for prompt-engineered 3D image generation. The state is synchronized across isolated React components using a custom event listener system paired with localStorage.

🚧 Challenges we ran into

  • State Synchronization: Passing data seamlessly between the Enclosure Setup Modal and the Main Canvas without a heavy global state manager like Redux. We engineered a custom window.dispatchEvent system.
  • Proportional SVG Math: Calculating the exact relative pixel radius for each animal based on their required sq.m, and ensuring they fit perfectly within the boundaries of the absolute grid.
  • AI Rate Limiting: During heavy testing, APIs would overload. We built a robust Fallback Chain Array that automatically switches between Gemini Pro and Flash models without the user ever noticing an error.

🚀 What's next for Ani-plan

We plan to introduce terrain-specific layouts (mud, aquatic, pasture) that actively affect animal happiness scores, and integrate real-world veterinary clinic APIs to connect farmers with local vets instantly.

Built With

Share this project:

Updates

Submission history