# rawat-arjun/rapidverse architecture

> Architecture diagram of the GitHub repository rawat-arjun/rapidverse, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rawat-arjun/rapidverse
- Repository: https://github.com/rawat-arjun/rapidverse

## Overview

1. **Repository type and boundary**
   - RapidVerse is a **Flutter client application** with platform shells for Android, iOS, web, Linux, macOS, and Windows.
   - The core architecture lives in `lib/`; platform folders are mostly Flutter-generated launch/runtime wrappers.

2. **Primary user-facing flows**
   - The app presents **snackable content** in four categories: **Quotes, Poetry, Jokes, Facts**.
   - The main user journeys are:
     - first-run onboarding / welcome
     - browsing content by category
     - saving content to favorites
     - sharing content as a wallpaper-style image

3. **App entry and navigation**
   - `lib/main.dart` is the application entry point.
   - The screen flow appears to start with **splash → welcome/onboarding → home**.
   - `lib/widgets/main_tab_bar.dart` and `lib/screens/home/home_screen.dart` suggest a **tab-based main shell** after onboarding, likely switching between category screens and favorites.

4. **Screen structure**
   - `lib/screens/welcome/splash/` contains the splash experience.
   - `lib/screens/welcome/onboarding/` contains onboarding screens and onboarding data presentation.
   - `lib/screens/home/` appears to host the main landing/navigation area.
   - `lib/screens/categories/` contains one screen per content type: facts, jokes, poetry, quotes.
   - `lib/screens/favourite/` contains the favorites view.

5. **Content domain model**
   - `lib/models/api_content_model.dart` represents fetched content items.
   - `lib/models/share_content_model.dart` represents the data needed for share/wallpaper generation.
   - `lib/models/onboarding_data_model.dart` represents the onboarding carousel or intro content.
   - `lib/constants/onboarding_data.dart` likely provides static onboarding copy/data.

6. **Data sources and persistence**
   - The app does not show a backend in the repository; the architecture looks **client-centric**.
   - `lib/services/api_service.dart` is the main abstraction for retrieving content, likely from an external API or bundled endpoint.
   - `lib/services/favourite_storage.dart` provides **local persistence** for favorites, so saved items survive app restarts.

7. **Sharing and media generation**
   - `lib/services/share_service.dart` is responsible for converting content into a shareable form, likely using the wallpaper assets.
   - The presence of `assets/wallpaper/` and category-specific animation files suggests the app prepares polished visual output for sharing rather than plain text-only sharing.

8. **UI component boundaries**
   - `lib/widgets/category_tile.dart` encapsulates category selection UI.
   - `lib/widgets/title_card_widget.dart` likely renders an item/content card with title and actions.
   - `lib/widgets/favourite_icon_button.dart` isolates favorite toggle behavior.
   - These widgets keep the category screens thin and reusable.

9. **Assets and presentation layer**
   - `assets/animation/*.json` indicates **animation assets**, very likely Lottie files for the four content types.
   - `assets/wallpaper/` holds background imagery used for sharing and visual composition.
   - The app’s “minimal & clean UI” is supported by these static assets rather than heavy backend-driven rendering.

10. **State and interaction pattern**
   - The repo description mentions “Clean UI + State Management,” but no heavyweight state package is visible from the tree alone.
   - The architecture likely follows a **screen + service + model** pattern, with state held locally in screens/widgets and persisted through services.

11. **Platform integration**
   - The Android/iOS/macOS/Linux/Windows directories are standard Flutter runners.
   - Native code is minimal: mostly app startup, manifests, plist/configuration, and generated plugin registrants.
   - There is no sign of custom native subsystems beyond Flutter’s platform glue.

12. **Testing and quality**
   - `test/widget_test.dart` provides Flutter widget testing coverage.
   - `analysis_options.yaml` indicates linting/static analysis is enabled, supporting maintainability across the app’s screens and services.

13. **Architecture diagram takeaway**
   - A useful diagram would show:
     - **Flutter app shell**
     - **startup flow** (splash/onboarding to home)
     - **category screens** consuming content via `api_service`
     - **favorites** written to local storage via `favourite_storage`
     - **share pipeline** via `share_service`
     - **shared models/widgets** used across all screens
   - The main boundary is between **presentation** (`screens`, `widgets`) and **services/data** (`api_service`, `favourite_storage`, `share_service`), with assets supporting the visual layer.

Main entry points: [`lib/widgets/main_tab_bar.dart`](https://github.com/rawat-arjun/rapidverse/blob/main/lib/widgets/main_tab_bar.dart) (Tab bar), [`lib/widgets/title_card_widget.dart`](https://github.com/rawat-arjun/rapidverse/blob/main/lib/widgets/title_card_widget.dart) (Title card), [`lib/services/api_service.dart`](https://github.com/rawat-arjun/rapidverse/blob/main/lib/services/api_service.dart) (API service), [`lib/screens/categories/quote_screen.dart`](https://github.com/rawat-arjun/rapidverse/blob/main/lib/screens/categories/quote_screen.dart) (Quotes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App Shell"]
  node_main["main.dart<br/>flutter entry<br/>[main.dart]"]
end

subgraph group_ui["Presentation"]
  node_welcome_splash["Splash<br/>startup screen<br/>[splash_screen.dart]"]
  node_welcome_onboarding["Onboarding<br/>intro flow"]
  node_welcome_data["Intro data<br/>onboarding content"]
  node_home_screen["Home<br/>main shell<br/>[home_screen.dart]"]
  node_tab_bar["Tab bar<br/>navigation widget<br/>[main_tab_bar.dart]"]
  node_quote_screen["Quotes<br/>category screen<br/>[quote_screen.dart]"]
  node_poetry_screen["Poetry<br/>category screen<br/>[poetry_screen.dart]"]
  node_joke_screen["Jokes<br/>category screen<br/>[joke_screen.dart]"]
  node_fact_screen["Facts<br/>category screen<br/>[fact_screen.dart]"]
  node_favourite_screen["Favorites<br/>saved items screen"]
  node_category_tile["Category tile<br/>ui component<br/>[category_tile.dart]"]
  node_title_card["Title card<br/>content card"]
  node_fav_button["Fav button<br/>action widget"]
end

subgraph group_data["Data & Services"]
  node_api_service["API service<br/>content client<br/>[api_service.dart]"]
  node_favourite_storage[("Local storage<br/>persistence")]
  node_share_service["Share service<br/>share pipeline<br/>[share_service.dart]"]
  node_api_content["API content<br/>content model"]
  node_share_content["Share content<br/>share model"]
  node_onboarding_model["Onboarding model<br/>intro model"]
  node_onboarding_data["Onboarding data<br/>static content"]
end

subgraph group_assets["Assets"]
  node_animations(("Animations<br/>asset set"))
  node_wallpapers(("Wallpapers<br/>asset set"))
end

node_main -->|"starts"| node_welcome_splash
node_welcome_splash -->|"continues"| node_welcome_onboarding
node_welcome_onboarding -->|"enters"| node_home_screen
node_home_screen -->|"hosts"| node_tab_bar
node_tab_bar -->|"switches"| node_quote_screen
node_tab_bar -->|"switches"| node_poetry_screen
node_tab_bar -->|"switches"| node_joke_screen
node_tab_bar -->|"switches"| node_fact_screen
node_tab_bar -->|"switches"| node_favourite_screen
node_quote_screen -->|"loads"| node_api_service
node_poetry_screen -->|"loads"| node_api_service
node_joke_screen -->|"loads"| node_api_service
node_fact_screen -->|"loads"| node_api_service
node_api_service -->|"returns"| node_api_content
node_quote_screen -->|"renders"| node_title_card
node_poetry_screen -->|"renders"| node_title_card
node_joke_screen -->|"renders"| node_title_card
node_fact_screen -->|"renders"| node_title_card
node_title_card -->|"includes"| node_fav_button
node_fav_button -->|"writes"| node_favourite_storage
node_favourite_screen -->|"reads"| node_favourite_storage
node_title_card -->|"shares"| node_share_service
node_share_service -->|"builds"| node_share_content
node_share_service -->|"composes"| node_wallpapers
node_quote_screen -->|"decorates"| node_animations
node_poetry_screen -->|"decorates"| node_animations
node_joke_screen -->|"decorates"| node_animations
node_fact_screen -->|"decorates"| node_animations
node_welcome_onboarding -->|"shows"| node_welcome_data
node_welcome_data -->|"uses"| node_onboarding_model
node_welcome_data -->|"sources"| node_onboarding_data
node_main -->|"routes"| node_home_screen

click node_main "https://github.com/rawat-arjun/rapidverse/blob/main/lib/main.dart"
click node_welcome_splash "https://github.com/rawat-arjun/rapidverse/blob/main/lib/screens/welcome/splash/splash_screen.dart"
click node_welcome_onboarding "https://github.com/rawat-arjun/rapidverse/blob/main/lib/screens/welcome/onboarding/onboarding_screen.dart"
click node_welcome_data "https://github.com/rawat-arjun/rapidverse/blob/main/lib/screens/welcome/onboarding/onboarding_data_screen.dart"
click node_home_screen "https://github.com/rawat-arjun/rapidverse/blob/main/lib/screens/home/home_screen.dart"
click node_tab_bar "https://github.com/rawat-arjun/rapidverse/blob/main/lib/widgets/main_tab_bar.dart"
click node_quote_screen "https://github.com/rawat-arjun/rapidverse/blob/main/lib/screens/categories/quote_screen.dart"
click node_poetry_screen "https://github.com/rawat-arjun/rapidverse/blob/main/lib/screens/categories/poetry_screen.dart"
click node_joke_screen "https://github.com/rawat-arjun/rapidverse/blob/main/lib/screens/categories/joke_screen.dart"
click node_fact_screen "https://github.com/rawat-arjun/rapidverse/blob/main/lib/screens/categories/fact_screen.dart"
click node_favourite_screen "https://github.com/rawat-arjun/rapidverse/blob/main/lib/screens/favourite/favourite_screen.dart"
click node_category_tile "https://github.com/rawat-arjun/rapidverse/blob/main/lib/widgets/category_tile.dart"
click node_title_card "https://github.com/rawat-arjun/rapidverse/blob/main/lib/widgets/title_card_widget.dart"
click node_fav_button "https://github.com/rawat-arjun/rapidverse/blob/main/lib/widgets/favourite_icon_button.dart"
click node_api_service "https://github.com/rawat-arjun/rapidverse/blob/main/lib/services/api_service.dart"
click node_favourite_storage "https://github.com/rawat-arjun/rapidverse/blob/main/lib/services/favourite_storage.dart"
click node_share_service "https://github.com/rawat-arjun/rapidverse/blob/main/lib/services/share_service.dart"
click node_api_content "https://github.com/rawat-arjun/rapidverse/blob/main/lib/models/api_content_model.dart"
click node_share_content "https://github.com/rawat-arjun/rapidverse/blob/main/lib/models/share_content_model.dart"
click node_onboarding_model "https://github.com/rawat-arjun/rapidverse/blob/main/lib/models/onboarding_data_model.dart"
click node_onboarding_data "https://github.com/rawat-arjun/rapidverse/blob/main/lib/constants/onboarding_data.dart"
click node_animations "https://github.com/rawat-arjun/rapidverse/tree/main/assets/animation"
click node_wallpapers "https://github.com/rawat-arjun/rapidverse/tree/main/assets/wallpaper"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main toneBlue
class node_welcome_splash,node_welcome_onboarding,node_welcome_data,node_home_screen,node_tab_bar,node_quote_screen,node_poetry_screen,node_joke_screen,node_fact_screen,node_favourite_screen,node_category_tile,node_title_card,node_fav_button toneAmber
class node_api_service,node_favourite_storage,node_share_service,node_api_content,node_share_content,node_onboarding_model,node_onboarding_data toneMint
class node_animations,node_wallpapers toneRose
```

## Components

### App Shell

Entry point and platform launcher wrappers.

- [main.dart](https://github.com/rawat-arjun/rapidverse/blob/main/lib/main.dart): flutter entry · App bootstrap and top-level route setup. · `lib/main.dart`

### Presentation

Screens and reusable widgets that drive user interaction.

- [Splash](https://github.com/rawat-arjun/rapidverse/blob/main/lib/screens/welcome/splash/splash_screen.dart): startup screen · Initial splash experience before onboarding. · `lib/screens/welcome/splash/splash_screen.dart`
- [Onboarding](https://github.com/rawat-arjun/rapidverse/blob/main/lib/screens/welcome/onboarding/onboarding_screen.dart): intro flow · Welcome and first-run onboarding screens. · `lib/screens/welcome/onboarding/onboarding_screen.dart`
- [Intro data](https://github.com/rawat-arjun/rapidverse/blob/main/lib/screens/welcome/onboarding/onboarding_data_screen.dart): onboarding content · Onboarding content presentation and slide data. · `lib/screens/welcome/onboarding/onboarding_data_screen.dart`
- [Home](https://github.com/rawat-arjun/rapidverse/blob/main/lib/screens/home/home_screen.dart): main shell · Primary landing area after onboarding. · `lib/screens/home/home_screen.dart`
- [Tab bar](https://github.com/rawat-arjun/rapidverse/blob/main/lib/widgets/main_tab_bar.dart): navigation widget · Main tab navigation across app sections. · `lib/widgets/main_tab_bar.dart`
- [Quotes](https://github.com/rawat-arjun/rapidverse/blob/main/lib/screens/categories/quote_screen.dart): category screen · Browse quote content. · `lib/screens/categories/quote_screen.dart`
- [Poetry](https://github.com/rawat-arjun/rapidverse/blob/main/lib/screens/categories/poetry_screen.dart): category screen · Browse poetry content. · `lib/screens/categories/poetry_screen.dart`
- [Jokes](https://github.com/rawat-arjun/rapidverse/blob/main/lib/screens/categories/joke_screen.dart): category screen · Browse joke content. · `lib/screens/categories/joke_screen.dart`
- [Facts](https://github.com/rawat-arjun/rapidverse/blob/main/lib/screens/categories/fact_screen.dart): category screen · Browse fact content. · `lib/screens/categories/fact_screen.dart`
- [Favorites](https://github.com/rawat-arjun/rapidverse/blob/main/lib/screens/favourite/favourite_screen.dart): saved items screen · View and manage saved content. · `lib/screens/favourite/favourite_screen.dart`
- [Category tile](https://github.com/rawat-arjun/rapidverse/blob/main/lib/widgets/category_tile.dart): ui component · Reusable category selection tile. · `lib/widgets/category_tile.dart`
- [Title card](https://github.com/rawat-arjun/rapidverse/blob/main/lib/widgets/title_card_widget.dart): content card · Reusable content display and action card. · `lib/widgets/title_card_widget.dart`
- [Fav button](https://github.com/rawat-arjun/rapidverse/blob/main/lib/widgets/favourite_icon_button.dart): action widget · Favorite toggle control. · `lib/widgets/favourite_icon_button.dart`

### Data & Services

Models, content retrieval, persistence, and sharing.

- [API service](https://github.com/rawat-arjun/rapidverse/blob/main/lib/services/api_service.dart): content client · Retrieves snackable content for the category screens. · `lib/services/api_service.dart`
- [Local storage](https://github.com/rawat-arjun/rapidverse/blob/main/lib/services/favourite_storage.dart): persistence · Persists saved favorites across app restarts. · `lib/services/favourite_storage.dart`
- [Share service](https://github.com/rawat-arjun/rapidverse/blob/main/lib/services/share_service.dart): share pipeline · Builds shareable wallpaper-style output from content. · `lib/services/share_service.dart`
- [API content](https://github.com/rawat-arjun/rapidverse/blob/main/lib/models/api_content_model.dart): content model · Fetched content item model. · `lib/models/api_content_model.dart`
- [Share content](https://github.com/rawat-arjun/rapidverse/blob/main/lib/models/share_content_model.dart): share model · Data model used to generate share assets. · `lib/models/share_content_model.dart`
- [Onboarding model](https://github.com/rawat-arjun/rapidverse/blob/main/lib/models/onboarding_data_model.dart): intro model · Model for onboarding carousel or intro data. · `lib/models/onboarding_data_model.dart`
- [Onboarding data](https://github.com/rawat-arjun/rapidverse/blob/main/lib/constants/onboarding_data.dart): static content · Static onboarding copy and slide definitions. · `lib/constants/onboarding_data.dart`

### Assets

Static media used for category visuals and share composition.

- [Animations](https://github.com/rawat-arjun/rapidverse/tree/main/assets/animation): asset set · Category animation assets used in the UI. · `assets/animation`
- [Wallpapers](https://github.com/rawat-arjun/rapidverse/tree/main/assets/wallpaper): asset set · Background imagery used for share composition. · `assets/wallpaper`

## Connections

- main.dart → Splash: starts · Launches the splash flow on app start.
- Splash → Onboarding: continues · Moves first-run users into onboarding.
- Onboarding → Home: enters · Transitions into the main shell after onboarding.
- Home → Tab bar: hosts · Uses the tab bar for primary navigation.
- Tab bar → Quotes: switches · Opens the quotes category.
- Tab bar → Poetry: switches · Opens the poetry category.
- Tab bar → Jokes: switches · Opens the jokes category.
- Tab bar → Facts: switches · Opens the facts category.
- Tab bar → Favorites: switches · Opens saved favorites.
- Quotes → API service: loads · Fetches quote content.
- Poetry → API service: loads · Fetches poetry content.
- Jokes → API service: loads · Fetches joke content.
- Facts → API service: loads · Fetches fact content.
- API service → API content: returns · Produces content models for screens.
- Quotes → Title card: renders · Displays content through reusable cards.
- Poetry → Title card: renders · Displays content through reusable cards.
- Jokes → Title card: renders · Displays content through reusable cards.
- Facts → Title card: renders · Displays content through reusable cards.
- Title card → Fav button: includes · Exposes favorite actions on content cards.
- Fav button → Local storage: writes · Persists saved items locally.
- Favorites → Local storage: reads · Loads saved favorites for display.
- Title card → Share service: shares · Triggers wallpaper-style sharing.
- Share service → Share content: builds · Transforms content into share-ready data.
- Share service → Wallpapers: composes · Uses wallpaper assets for share output.
- Quotes → Animations: decorates · Uses category-specific animations.
- Poetry → Animations: decorates · Uses category-specific animations.
- Jokes → Animations: decorates · Uses category-specific animations.
- Facts → Animations: decorates · Uses category-specific animations.
- Onboarding → Intro data: shows · Renders onboarding slide content.
- Intro data → Onboarding model: uses · Backed by onboarding data model.
- Intro data → Onboarding data: sources · Uses static onboarding copy and definitions.
- main.dart → Home: routes · Connects app bootstrap to the main shell.
