Krishnvani
Welcome to your Expo app This is an Expo project created with create-expo-app. Get started 1. Install dependencies ``bash npm install ` 2. Start the app `bash npx expo start `` In ...
Technical Architecture & Engineering Overview
Detailed system design and core implementation
The application follows a modular monorepo structure separating platform‑specific entry points (krishnvani/app/*.tsx for Expo) from shared web components (src/*.tsx). The frontend architecture is centered on React functional components with hooks for navigation (useRouter), context (useAppContext), and data fetching via React Query. State such as onboarding status, language preference, and verse data is stored in context providers (AppContext, GitaProvider).
Data ingestion is performed locally through the gitaService module, which supplies static chapter and verse information. Random verse generation (getRandomVerse) and chapter listings (getAllChapters) are pure functions, enabling instant UI updates without network latency. The execution flow starts at a splash screen that delays 1.5 seconds before routing the user based on onboarding state, then proceeds to screens like ChaptersScreen and RandomVerseScreen, each wrapped in a ScreenWrapper that provides consistent padding and theming.
Security guardrails are implicit: the app does not expose external APIs, avoiding network attack surfaces. All assets are bundled with the Expo build, and the web build uses Vite's production optimizations. The build topology includes an Expo managed workflow for iOS/Android (app.json with EAS project ID) and a Vite configuration for the SPA, both sharing TypeScript configurations and ESLint rules for code quality.
The UI layer employs Framer Motion for page transitions and card animations, while Tailwind CSS and Shadcn/UI provide responsive, theme‑aware components. Accessibility is considered via StatusBar settings and proper aria attributes in web components. The architecture enables rapid iteration and easy extension to new languages or verse collections.
System Diagrams & Flow Visualizations
Interactive Mermaid architecture & execution flows
Core System Features
Key capabilities & architectural features
Cross‑platform support for iOS, Android, and Web
Cross‑platform support for iOS, Android, and Web
Dynamic language toggle between Hindi and English
Dynamic language toggle between Hindi and English
Splash screen with onboarding flow detection
Splash screen with onboarding flow detection
Full list of Gita chapters with navigation to detailed view
Full list of Gita chapters with navigation to detailed view
Random verse generator with animated transitions
Random verse generator with animated transitions
Share modal for verses using native share APIs
Share modal for verses using native share APIs
Responsive glass‑morphic UI powered by Tailwind and Shadcn/UI
Responsive glass‑morphic UI powered by Tailwind and Shadcn/UI
Smooth page and component animations via Framer Motion
Smooth page and component animations via Framer Motion
Local data service (`gitaService`) delivering chapter and verse content
Local data service (`gitaService`) delivering chapter and verse content
Global state management with React Context and React Query
Global state management with React Context and React Query
Engineering Challenges & Solutions
Problem statements & resolution strategies
Balancing a single codebase for both Expo React‑Native and Vite React required careful abstraction of navigation and UI components
Balancing a single codebase for both Expo React‑Native and Vite React required careful abstraction of navigation and UI components
Ensuring type safety across shared TypeScript definitions while supporting platform‑specific props
Ensuring type safety across shared TypeScript definitions while supporting platform‑specific props
Managing asset loading (e.g., splash background) for both native bundles and web static assets
Managing asset loading (e.g., splash background) for both native bundles and web static assets
Implementing consistent theming and dark/light mode across native and web environments
Implementing consistent theming and dark/light mode across native and web environments
Optimizing performance of large static JSON data without network requests
Optimizing performance of large static JSON data without network requests
Key Code Modules & Architecture
Core file entrypoints and service responsibilities
krishnvani/appModule component managing app source logic
src/componentsModule component managing components source logic
src/hooksModule component managing hooks source logic
krishnvani/scriptsModule component managing scripts source logic
src/servicesModule component managing services source logic
src/typesModule component managing types source logic
krishnvani/utilsModule component managing utils source logic
srcModule component managing src source logic
src/components/uiModule component managing ui source logic
src/libModule component managing lib source logic
src/pagesModule component managing pages source logic
User Journey Pipeline
- 1User Access & Preset Selection: User opens client interface and configures request parameters or task workflow presets.
- 2Client Payload Dispatch: Front-end components (React, TailwindCSS) serialize input objects and send HTTP/WebSocket requests to `/api/analyze`.
- 3Middleware & Validation Check: API Gateway evaluates CORS headers, authorization tokens, and input validation schemas.
- 4Service & Inference Execution: Service controllers dispatch request frames to model inference engine (Local Engine) or storage layer.
- 5Response Delivery & State Synchronization: Serialized output payload is returned to the client and rendered in the visual workspace.
Execution Code Flow
- 1Entrypoint Invocation: Request enters network interface layer via `POST /api/analyze`.
- 2Schema & Guardrail Verification: Middleware sanitizes payload parameters and checks rate-limiting limits.
- 3Controller Dispatch: Router delegates validated object to `App` service controller.
- 4Engine Execution & Storage Operations: Controller executes business logic, queries database models (Persistence), and invokes ML workers.
- 5Response Serialization: Result model is formatted into standard JSON response frame and delivered with HTTP 200 OK.
System FAQ & Technical Specifications
Frequently asked questions and core architecture details
Q: What technologies are used in Krishnvani?
Krishnvani is engineered using modern full-stack frameworks.
Q: What core engineering problem does Krishnvani solve?
Welcome to your Expo app This is an Expo project created with create-expo-app. Get started 1. Install dependencies ``bash npm install ` 2. Start the app `bash npx expo start `` In ...
Q: How is 'Balancing a single codebase for both Expo React‑Native and Vite React required careful abstraction of navigation and UI components' resolved in Krishnvani?
Resolved through specialized system architecture and resilient state handling.
Related Systems & Case Studies
Explore similar technical architectures and projects