How karthikgs-in/paleolocal works
Project Type and Purpose
• This is a full-stack, interactive web application (“PaleoLocal”) for discovering and exploring paleogeologic sites.
• Frontend: A React + TypeScript single-page app with a Leaflet map and AI chat UI.
• Backend: A FastAPI service providing search, site metadata, RAG-powered summaries, and chat endpoints.
• Data layer: Local vector store (ChromaDB) and an ingestion pipeline that pulls, chunks, embeds, and stores geological site data.
• External services: Google Gemini LLM (via API), web sources scraped by the ingestion script.
File Structure Analysis
• Top-level directories:
• frontend/ – SPA code, React components, hooks, services, config, build tool (Vite).
• backend/ – FastAPI application (main.py, rag_utils.py, prompts.py), scripts for ingestion, requirements.
• data/ – seed_places.csv and auto-generated chunks.jsonl (raw/static data).
• docs/ – usage and interface guides.
• specs/ – feature specs, API contracts, data models, checklists.
• scripts: start-frontend.sh, paleolocal-dev (dev launchers).
• Config files: .env, .gitignore, tsconfigs, package.json, requirements.txt.
• Patterns: clear separation of UI vs API vs data ingestion/embedding. RAG pipeline as a distinct sub-flow.
Key README Insights
• Frontend features: interactive map, dynamic side panel, floating/docked chat, responsive UI.
• Backend features: /api/search, /api/place/{id}, /api/chat, RAG retrieval via Chroma + embeddings + Gemini.
• Data ingestion flow: ingest_seed_urls.py → SentenceTransformers → ChromaDB → used at request time.
• Tech stack: React, Leaflet, FastAPI, Uvicorn, ChromaDB, SentenceTransformers, Google Generative AI, Python, Node/Vite.