Team: absolute (Bera Serdaroğlu, Çınar Okta, Abdulkadir Gül)

Inspiration

We were inspired by the persistent gap between climate awareness and tangible daily action. Everyone knows climate change is a threat, but the sheer scale of the problem leads to action paralysis—people feel overwhelmed and unsure where to start. We realized that simple, repeated actions, like choosing to recycle or saving water, have a huge cumulative impact. Our goal was to make these small actions feel personally rewarding and fun, rather than a chore. The idea of linking real-world good deeds to the health and evolution of a digital companion (a virtual pet) provided the perfect gamified incentive.

What it does

EcoPet transforms climate action into a rewarding mobile game. Users are presented with daily, achievable eco-friendly tasks (e.g., "Take a 5-minute shower," "Use a reusable coffee cup"). As they complete and verify these tasks, their virtual pet gains EXP and evolves from an egg to an adult.

The app's core features include:

Virtual Pet System: Motivates continuous action through pet care and evolution.

Eco-Task Log: A simple checklist for tracking daily commitments.

AI Climate Tutor Chatbot: Provides instant, reliable educational content, explaining the science behind each task and answering specific climate questions (e.g., "Why is saving water important in my region?").

Impact Statistics: Quantifies the user's positive impact in real metrics (e.g., liters of water saved, estimated $CO_2$ reduction).

How we built it

We chose a single-file React application to maximize speed and focus during the hackathon.

Frontend (React & Tailwind CSS): We focused on building a clean, responsive UI that feels intuitive and mobile-first. Tailwind helped us rapidly style the pet visualization, task cards, and progress bars.

State Management: We used React's useState and useReducer hooks to manage the pet's evolution status (Egg $\rightarrow$ Hatchling $\rightarrow$ Adult) and track the user's EXP.

Data Persistence (Firestore): We utilized Google Firebase's Firestore database to ensure that the pet's progress, task history, and unique userId are persistently stored in /artifacts/{appId}/users/{userId}/pet_data. This was crucial for creating a truly owned and durable pet experience.

LLM Integration: The AI Climate Tutor Chatbot was implemented using the Gemini API. We set up an asynchronous fetch function to call the gemini-2.5-flash-preview-09-2025 model with a strong system instruction to act as an encouraging, factual climate educator, grounding the responses using Google Search to ensure accuracy.

Challenges we ran into

The biggest challenge was integrating real-time database listeners and authentication within a rapid development timeframe. Setting up the Firebase authentication flow and ensuring our Firestore onSnapshot listeners correctly awaited the __initial_auth_token login was tricky. We encountered errors trying to read data before the user object was fully available, which we solved by adding strict guard clauses to our data-fetching useEffect hooks.

Another difficulty was designing a smooth pet evolution curve. We needed to find the right balance so that the pet evolved fast enough to be motivating, but not so fast that the users ran out of goals, leading to several iterations on the EXP requirements.

Accomplishments that we're proud of

We are most proud of successfully integrating the AI Climate Tutor Chatbot. Having an interactive, contextual educational tool available inside the game itself elevates EcoPet beyond a simple checklist app and makes it a powerful learning platform. We're also very proud of the responsive, clean design that truly feels like a ready-to-launch mobile application.

What we learned

We learned the critical importance of robust asynchronous data handling when dealing with external services like Firebase, especially the authentication lifecycle. Furthermore, we gained valuable experience in prompt engineering (defining the system instruction for the AI tutor) to ensure the educational content was always accurate, encouraging, and on-topic, significantly enhancing the app's core value proposition.

Share this project:

Updates

Submission history