How stringsaeed/brimapp works
Main Components
• App Shell & Navigation:
– Represent the main Expo Router structure found under /src/app, which houses the primary screens.
– Highlight authenticated routes (e.g., Dashboard, Notes, User screens) and authentication flows (login, verify) under /src/app/auth.
• Screens & UI:
– Create modules for screens (located in /src/screens) that include Authentication, Dashboard, Notes (with archived, trashed, and detailed note views), and User screens.
– List reusable UI components (found under /src/components) like account-info, auth-layout, note title & toolboxes, bottom sheets, and animated views.
• State Management & Custom Hooks:
– Include a block for React Context providers (in /src/contexts) dedicated to managing app state (authentication, notes, pull-to-action, country-picker, etc.).
– Mark the various custom hooks (in /src/hooks) that support business logic such as note operations, layout management, haptic feedback, and internationalization.
• Services & Integrations:
– Outline the services layer (in /src/services) with sub-components for AI functionalities (grammar and text rephrasing via Google’s Gemini API), analytics (Vexo Analytics), error tracking (Sentry), voice transcription, Supabase (authentication, database operations, realtime subscriptions), and flagsmith.
• Internationalization & Theming:
– Show a module for i18n support (/src/i18n) and theming (/src/themes) controlling language translations and styling (light/dark modes, accent customizations).
• Backend and Database:
– Represent the Supabase setup (living both in the project’s /supabase directory and integrated within the services) which provides authentication, database migrations, and real-time features.
Relationships and Data Flow
• UI <-> Navigation:
• UI Components & State Management:
– Illustrate how UI components consume data provided by Contexts and custom hooks.
• API & Service Integration:
– Connect the services layer to the UI, indicating that components (and hooks) call out to AI, analytics, and Supabase backends.
• External Integrations:
– Represent integrations with external tools and services like Sentry for error tracking and Gemini API for AI, ensuring they are clearly marked.
Architectural Patterns and Design Principles
• Separation of Concerns:
• Modular Architecture:
– Indicate the organization into mode-specific folders (screens, components, services, hooks, contexts) to emphasize reusability and clear boundaries.
• Real-Time and Asynchronous Flow:
– Mark areas indicating real-time data flow coming from Supabase and asynchronous API calls (e.g., for voice transcription and grammar fixing).
Incorporate Key Technologies, Frameworks, and Patterns
• Clearly label:
– Frontend frameworks: React Native, Expo Router, Tamagui UI components.
– Backend and Integrations: Supabase, Google’s Gemini API, Sentry, Vexo Analytics.
– State management: React Context providers and custom hooks.
– Development tools: Testing with Jest, code formatting (ESLint/Prettier), and build/deployment with EAS.