Goji-Project

goji Goji Project goji

Goji is the first ecological calendar platform to use AI-powered question and answering with real-time indicator mapping based on your location. By combining large language models with ecological data, Goji turns seasonal events into an interactive, personalized experience.


Note for the judges: The updates to my backend were made for a swift cloning and Installation Guide. The changes made were moving my requirements.txt to root and changing the path for my files to access the .env file. Originally the .env file was located in the goji-backend directory, but I changed it so that it’s in the root directory.


Inspiration

An ecological calendar is a composition of seasonal indiactors that mark the transitional periods between seasons. For instance, a flower blooming could mark the transitional period between Winter and Spring, or the sighting of bird migrations could represent that Fall is ending.

What if ecological indicators move along hidden paths—higher-dimensional trajectories shaped by complex relationships—beyond what we can easily observe?

This project is a step toward modeling, visualizing, and understanding those invisible interactions—using relivant and updated data, AI interpretation, and ecological theory.

View a demo of Goji here: (https://youtu.be/evHEawFvunQ)

Design

Why Perplexity Sonar API?

Perplexity Sonar API is ideal for an AI engine like Goji because of its:

The raw results from Perplexity are passed to Gemini (via parsers.py) for intelligent postprocessing and structuring into a MongoDB-ready JSON format.


Architectural Decisions

Frontend

The frontend is built in React with Tailwind CSS, chosen for:

Backend

The backend is powered by FastAPI, selected for:

Geolocation with Nominatim

Location data is essential to tailoring ecological calendars. We use geo_utils.py to:

Goji Architecture Diagram


Why This Structure?

Goji is built around a three-stage user journey:

  1. Identity: User.jsx captures the user’s name → initializes an empty calendar in MongoDB.
  2. Place: LocationForm.jsx resolves geographic intent using geo_utils.py.
  3. Purpose: ChatBot.jsx captures the user’s ecological inquiry → flows through chat_logic.py and parsers.py → results render in EcoCalendar.jsx.

This structure reflects Goji’s core goal: turning curiosity into seasonal, place-based ecological insight, using the strengths of modern LLMs and data pipelines.

Project Structure

This project, as mentioned before, is organized into two parts, a frontend–backend split. Here is the full layout of files and folders:

goji-frontend/
├── .gitignore
├── README.md
├── package.json
├── package-lock.json
├── index.html
├── tailwind.config.mjs
├── vite.config.js
├── eslint.config.js
├── node_modules/
├── public/
│ ├── goji berry mini.png
│ └── vite.svg
├── src/
│ ├── App.css
│ ├── App.jsx
│ ├── index.css
│ ├── main.jsx
│ ├── assets/
│ │ └── react.svg
│ ├── components/
│ │ ├── BackgroundArcs.jsx                   # Uses p5.js to draw Arcs in the background
│ │ ├── CategoryDropdown.jsx
│ │ ├── ChatBot.jsx                          # Chat Box application: Third Page
│ │ ├── EcoCalendar.jsx                      # Ecological Calendar application: Third Page
│ │ ├── LocationForm.jsx                     # Location form entered by user: Second Page
│ │ └── User.jsx                             # Username page: First Page
│ ├── hooks/
│ │ └── useLocationApi.js
│ └── lib/
│ ├── api.js
│ └── geoUtils.js

goji-backend/
├── .env
├── .gitignore
├── README.md
├── requirements.txt
├── venv/
├── json/
│ ├── example.json
│ └── indicator_type_cache.json
├── app/
│ ├── init.py
│ ├── db.py
│ ├── geo_utils.py                           # Location utilities (Nominatim, zip resolution)
│ ├── llm_utils.py                           # Shared AI helpers (if not in services)
│ ├── main.py                                # FastAPI entry point
│ ├── parsers.py                             # Gemini logic for parsing AI results
│ ├── routes/
│ │ ├── calendar.py
│ │ ├── chat.py
│ │ ├── location.py
│ │ ├── update_calendar_location.py
│ │ └── user.py
│ ├── schemas/
│ │ └── calendar_schema.py                   # Pydantic models
│ └── services/
│ ├── calendar_service.py                    # Business logic for calendar building
│ └── chat_logic.py                          # Handles AI querying + pre/postprocessing

## Project Root

├── .git/                                    # Git version control metadata
├── .gitignore                               # Ignored files for Git
├── goji-frontend/                           # React + Tailwind CSS frontend
├── goji-backend/                            # FastAPI backend with LLM, Geo, and Calendar logic

README.md                                    # Project overview and setup instructions

Next Steps & Challenges

Next Steps

Challenges

Important

Human ecology takes on a dynamic role. It is not a linear genealogical notion of relatedness (or kinship), but rather a progenerative idea of all-encompassing relationships. Relationships are not closed nor static; they are continuously shaped by external forces that impact the system as a whole. The building of an ecological calendar is an intimate process becuase it recognizes the cocreation of interactions in our natural world. Goji is a tool to assist in cogenerative learning about our beautiful world.

Prerequisites & Installation

Before you start, make sure you have the following installed:


Installation Guide

Clone the Repository

git clone https://github.com/romanqc/Goji-Project.git
cd ../Goji-Project

Backend Setup

Set up a Python Virtual Environment

cd goji-backend
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
cd ../
pip install -r requirements.txt
cp .env.example .env

The .env you create should look something like the following:

GOOGLE_GEMINI_API_KEY=your_gemini_api_key_here
PERPLEXITY_API_KEY=your_perplexity_api_key_here
MONGODB_URI=your_mongodb_connection_string_here

I am currently using a free Gemini API key, model gemini-2.0-flash-lite, and the free MongoDB starter. Both of these are easy to get:

Then, run the backend

uvicorn app.main:app --reload

The backend shouold be available and running at http://127.0.0.1:8000, on your local machine.

Frontend Setup

Open a new tab in PowerShell or your command line, and navigate to the root directory Goji-Project. Next, run the following commands:

cd goji-frontend
npm install
npm run dev

The frontend will be available at http://localhost:5173

You can ctrl + click the link in the terminal and it will open the localhost link in your default browser. Make sure that your backend is running so that the frontend can make the API calls. It will not work without the backend.

Contact

Stay tuned for updates.

Roman Q. Chavez (rqc3@cornell.edu)