Skip to content

Latest commit

 

History

History
58 lines (40 loc) · 1.46 KB

File metadata and controls

58 lines (40 loc) · 1.46 KB

Gemini AI Project Guide

1. Project Overview

This is Kudocracy.Survey, an open-source platform for citizen consultation and participatory democracy.

  • Frontend: React, Vite, Tailwind CSS.
  • Backend: Netlify Functions (Serverless).
  • Database: Supabase (PostgreSQL).
  • AI: Integrates with OpenAI, Hugging Face, and Anthropic.
  • Key Features: Wiki, Forum, Voting, AI Assistant (Ophélia).

2. Setup & Development

Refer to .rules.md for environment requirements and coding standards.

Installation

pnpm install
cp .env.example .env

Running Locally

# Start Netlify dev server
netlify dev

URL: http://localhost:8888

3. Testing AI & Data

The project includes specialized CLI tools for testing RAG and SQL logic:

RAG Chat Test:

node scripts/rag_chat_cli.js "Your question for Ophélia" --top 8 --fetch-limit 1500 --json

SQL Endpoint Test:

RAG_SQL_ENDPOINT=https://<your-site>/api/chat-stream \
CLI_TOKEN=<your-netlify-cli-token> \
node scripts/rag_chat_cli.js --sql "SELECT id, title FROM wiki_pages ORDER BY updated_at DESC" --limit 50 --json

4. AI-Specific Context

  • Central Config: Uses a "vault" system. See docs/CONFIGURATION_VAULT.md.
  • Knowledge Base: AI knowledge is synced via scripts/sync-actes-rag.js.
  • API Reference: See .api-docs.md for available tools and schemas