How julianapeace/flora works
Main Components
• Frontend Applications:
• “askflora.earth”: This directory contains a Next.js application (with files like layout.tsx, page.tsx, next.config.ts, Tailwind configuration, etc.) that represents one web interface for interacting with Flora.
• “client”: A separate client-side application built using React with Vite (notice the App.tsx, main.tsx, router.tsx, and components under client/src) that likely serves another interface—perhaps a specialized chat or dashboard.
• Backend and Core Logic (located in “src”):
• The src folder includes modules for core functionality such as chat logic (src/chat), API clients (src/clients), configuration (src/config), and database interactions (src/database). This indicates a backend layer that processes incoming requests, integrates with the knowledge base, and maintains system state.
• Knowledge and Character Data:
• “characters” holds JSON files defining various “characters” (e.g., flora, eliza, etc.) and even contains an Excel document with a Veg Spec Database.
• “knowledge” includes multiple markdown documents (and even a PDF) serving as a knowledge base that the AI may reference when generating insights.
• Custom Actions:
• The “custom_actions” folder showing custom script (myAction.ts) which likely extends Flora’s behavior or integrates with external systems.
• Supporting Files and Configurations:
• Top-level configuration files (such as .env.example, Dockerfile, pnpm workspace files) indicate deployment and development infrastructure.
• Additional resources like ESLint, PostCSS, Tailwind configs spread across the client and askflora.earth indicate styling/quality enforcement practices.
Relationships and Interactions
• Web Interfaces (askflora.earth and client) will serve as entry points. They can communicate with the backend services either via RESTful APIs or through server-side rendering (in Next.js).
• The backend (src directory) mediates interactions:
• Chat modules handle the AI-conversation aspects.
• Database modules possibly persist user data or session logs.
• Client integrations and configuration modules keep the system flexible.
• The knowledge base (knowledge and characters) supplies reference data that the AI uses to provide contextually relevant responses.
• Custom actions may serve as triggers for specific behaviors or integrations (for example, specialized commands or IoT actions).
Architectural Patterns and Technologies
• The backend is built using a modular approach, with clear boundaries (chat, clients, database, config) aligning with either a layered architecture or even micro-modules if scaled.
• Usage of Tailwind CSS, TypeScript (e.g., .ts and .tsx files), and containerization hints at modern web and cloud-native practices.