How trypear/pearai-master works
Main Components
• pearai-app: This is the main VSCode fork and acts as the core application. It houses the editor functionalities.
• pearai-submodule: Integrated as a submodule of pearai-app, this holds the AI chat features.
• pear-landing-page: A Next.js/React-based front-end website that serves as the landing page and directs users into the ecosystem.
• pearai-documentation: The documentation site offering detailed guides and API docs to users.
• pearai-server: A Python FastAPI server with a Supabase database which handles backend and authentication services for users who choose convenience over managing their own API keys.
• pearai-server-issues-public: A separate repository that publicly logs issues for the server, representing the monitoring or support layer.
• Additional directories (like PearAI-Roo-Code and pearai-mcp) should be checked for specialized internal functionalities or tooling, even if they are not explicitly mentioned in the README. They might represent support code or further integrations.
Relationships and Interactions
• Submodule Integration: Under the pearai-app, pearai-submodule provides AI chat functionalities. Indicate this as a nested relationship or an internal module within the core app.
• Authentication and Database: The landing page uses Supabase for authentication on a Next.js/React setup. Represent this by linking the landing-page component with both the Supabase service (possibly shown as an external service or a cloud resource) and supporting design elements like TailwindCSS with Shadcn.
• Logging/Telemetry: Axiom is used for logging and telemetry. Add this element as an optional service that connects with multiple components (such as the server or possibly even pearai-app) to monitor operations.
Architectural Patterns and Design Principles
• Modularity: Emphasize the modular organization of the project – each repository has a focused responsibility, which is ideal for scaling and individual contributions.
• Microservices / Separation of Concerns: The separation between frontend elements (pearai-app, pear-landing-page, pearai-documentation) and backend (pearai-server) reflects a common microservices or service-oriented pattern.
• Submodule Integration: Represent the use of submodules, showing that pearai-submodule is tightly coupled with pearai-app.
• Use of Standard Technologies: Indicate the tech stacks (TypeScript/Electron.js for the app, Next.js/React for the landing page, Python FastAPI for the backend) to provide further context on how components interact.
• Clear labels for each component (e.g., “pearai-app (VSCode-based core)”, “AI Chat - pearai-submodule”, “Landing Page – Next.js/React”, “Backend API – Python FastAPI”, “Documentation Site”, “Logging/Telemetry - Axiom”, “Auth & DB – Supabase”).
– Data flow between pearai-app (and its submodule) to pearai-server.
– User interactions with pear-landing-page, which in turn may interact with the documentation site and authentication systems.
– Communication lines (APIs) between client-side components and backend services.
– Frontend components (perhaps using rounded rectangles for all web-based UI items).
– External/integrated services like Supabase and Axiom.
– Supporting tools/scripts (like the setup_master_repo.sh and update_submodules.sh scripts can be annotated as orchestration/build/configuration tools).