RepoPilot

appflowy-io / appflowy

Search appflowy-io/appflowy

GitHub

Code

Understand appflowy-io/appflowy's source layout and find a starting point for your task using the saved repository evidence.

Detailed import-graph metrics were not captured for this report.

How the code fits together

AI
  • Frontend (Flutter)Cross-platform UI layer built with Flutter Dart framework
  • Android Platform LayerAndroid-specific native bindings and build configuration
  • Assets & ResourcesUI resources including fonts, images, and configuration data
  • Build & CI/CDAutomation for compilation, testing, and release workflows
  • Configuration & DocumentationProject metadata, licenses, and developer guidelines

Files at 5cf3a365dec0 · descriptions are AI-written.

Where to start reading

  1. Suggested starting pointAI
  2. Suggested starting pointAI
  3. Suggested starting pointAI

Find files for a task

AI

Add a new AI feature or prompt template

Suggested by the saved analysis. Some step paths were not captured or refer to generated or vendor files; only observed source files are linked.

  • Register new prompt in the asset data file
  • Update analysis_options.yaml if new linter rules are needed

Add support for a new platform or device configuration

Suggested by the saved analysis. Verify the proposed change against these source files.

  • Add platform-specific manifest or metadata
  • Configure native bindings if platform APIs are needed
  • Update Gradle build configuration for new dependencies
  • Add CI/CD targets for the new platform

Update UI assets or theming

Suggested by the saved analysis. Some step paths were not captured or refer to generated or vendor files; only observed source files are linked.

  • Register new resources in icon or image manifest
  • Update Dart linting rules if visual code style changed

Add or update tests

Use a nearby test as a pattern. Read the root manifest or contribution guide for the correct test command. These suggestions use file names, not verified execution paths.

  • File-name match for this task.
  • File-name match for this task.
  • File-name match for this task.

Change build or automation

Inspect the relevant configuration and the commands it runs before changing the workflow. These suggestions use file names, not verified execution paths.

  • File-name match for this task.
  • File-name match for this task.
  • File-name match for this task.

File paths come from a snapshot of up to 500 captured paths; an omitted file may still exist.

  • No public or runtime entry point can be identified from the captured paths.

Architecture and request flow

Start here — files every contributor must understand

AI · unverified
1
frontend/appflowy_flutter/Makefile

Build orchestration for the Flutter frontend; defines compilation, testing, and deployment targets.

2
frontend/appflowy_flutter/android/app/build.gradle

Android build configuration; specifies dependencies, SDK versions, and native compilation settings.

3
frontend/appflowy_flutter/analysis_options.yaml

Dart/Flutter static analysis rules; enforces code quality and style consistency across the codebase.

4
frontend/Makefile.toml

Top-level Rust/Cargo build automation for the backend; orchestrates frontend and backend compilation.

5
codemagic.yaml

CI/CD pipeline configuration; defines automated build, test, and release workflows across platforms.

6
commitlint.config.js

Commit message linting rules; enforces conventional commit format for changelog and release automation.

7
README.md

Project overview and setup instructions; essential reference for understanding AppFlowy's purpose and contribution guidelines.

Request flow

Technology choices

Flutter + Dart

Single codebase for iOS, Android, Windows, macOS, and Web; fast hot reload for iteration.

Rust Backend (inferred from Makefile.toml)

High-performance, memory-safe server for collaborative features and AI integration.

Android Gradle + CMake

Native Android build system with C/C++ support for platform-specific optimizations.

AGPL-3.0 Licensing

Ensures open-source transparency and community-driven development as Notion alternative.

Build time and runtime

Build-time

  • ▸
    Dart Linting (analysis_options.yaml) — Static code analysis enforcing style and correctness during compilation.
  • ▸
    Gradle Compilation — Java/Kotlin and native code compilation for Android APK/AAB generation.
  • ▸
    CMake Native Build — C/C++ compilation for platform-specific native libraries and JNI bindings.
  • ▸
    Cargo Build (Rust Backend) — Rust backend compilation via Makefile.toml orchestration.

Runtime

  • ▸
    Flutter Engine — Renders UI and manages Dart VM for cross-platform widgets.
  • ▸
    Native Platform Bridge — JNI/platform channels relay Flutter calls to native and backend services.
  • ▸
    Backend Service — Rust-based server handling collaborative features, data persistence, and AI orchestration.
  • ▸
    AI Engine — Processes built-in and custom prompts to deliver workspace intelligence.

Design trade-offs

Flutter for cross-platform UI instead of native per-platform

Faster time-to-market and consistent user experience across platforms.

Platform-specific features (e.g., native OS integration) require JNI bridging and platform channels.

Bundled AI prompts (built_in_prompts.json) instead of dynamic server fetching

Offline-first support and reduced latency for common use cases.

Prompt updates require app version upgrades rather than server-side changes.

Monorepo structure (frontend + backend in single repo)

Simplified dependency management and coordinated releases.

Larger clone size and potential build conflicts between subsystems.

Non-goals

  • ✗Cloud-only deployment; AppFlowy emphasizes data control and local-first operation.
  • ✗Real-time database synchronization is not primary; focus is collaborative workspace tooling.
  • ✗Mobile-only; AppFlowy targets desktop and web platforms equally.

Code quality and hotspots

Quality Score: 90/100

Low Risk

This repo is in good health with CI, tests, and active maintenance.

Multiple anti-patterns -10

Maintainability grade

Static analysis

How maintainable the code looks — from complexity, code issues, test presence, file size, and hotspot load. It grades the shape of the code, not defect risk, and doesn't replace review.

A
90/100
A ≥ 85, B ≥ 70, C ≥ 55, D ≥ 40, F < 40
Cyclomatic complexityavg 2
35/35
Code issues0 errors, 13 warnings
14/20
Testspresent · ~49% of files
19/20
Largest file954 lines
12/15
Hotspot load0 high-risk files
10/10

Configuration status

CI/CD Pipeline — configured

Provider: GitHub Actions

11 GitHub Actions workflows

Test Suite — detected

330 test files detected

Where: frontend/appflowy_flutter/test/bloc_test/board_test · frontend/appflowy_flutter/assets/test/images · frontend/appflowy_flutter/assets/test/workspaces

Test Coverage — ~49%heuristic

330 test files / 675 source files. This is a file-count ratio, not real line coverage — set up Codecov for authoritative numbers.

Dependency Scanning — no config detected

No Dependabot / Renovate / Snyk / Trivy / CodeQL config found. Enable Dependabot or Renovate.

Top hotspots

Files edited often AND hard to reason about. Churn = recent commit frequency, Complexity = branches and nesting, Risk = both combined. These are the highest-leverage targets for refactoring or testing.

sql_test/chat_message_test.rs
Churn: 0 (0 commits/180d)Complexity: 12Risk: 0
local_test/event_test.rs
Churn: 0 (0 commits/180d)Complexity: 3Risk: 0

All hotspots

Files that change often and are complex tend to accumulate more bugs

AI-suggested anti-patterns

AI · unverified

Pattern-matches from the file structure and dependencies — useful as hypotheses, but not grounded in actual source. For real findings see Code Scanning above.

Hardcoded AI prompts in assets

Medium

Embedding prompts as static JSON requires app updates to modify; inflexible for experimentation and A/B testing.

frontend/appflowy_flutter/assets/built_in_prompts.json

Monorepo without clear dependency boundaries

Medium

Lack of clear module separation increases coupling risk; frontend and backend changes can conflict during builds.

frontend/appflowy_flutter and (inferred) backend root

Native binding via raw JNI

Low

Direct JNI usage is error-prone and difficult to maintain; no abstraction layer for platform-specific logic.

frontend/appflowy_flutter/android/app/src/main/Classes/binding.h

AI-suggested bottlenecks

AI · unverified

Speculation from file structure, not profiling data. Validate against real metrics before acting on these.

Build Infrastructure Bottleneck

Single CI/CD orchestration point; failure here blocks all platform releases (Android, iOS, Web).

codemagic.yaml (CI/CD pipeline)

Service Architecture Bottleneck

All collaborative edits and AI requests funnel through backend; high contention point under load.

Rust Backend (inferred from Makefile.toml)

Startup Performance Bottleneck

Prompts loaded at app startup; large prompt library could delay initial UI render.

built_in_prompts.json asset loading

IPC Overhead Bottleneck

Serialization/deserialization overhead on every backend request; potential latency bottleneck for real-time collaboration.

Flutter Frontend (platform channel communication)

Code metrics

Static analysis on sampled source files (up to 15 files).

Avg Cyclomatic Complexity2

Counts if/for/while/switch/catch/ternary branches

Errors / Warnings0 / 13

Secrets, empty catches, console.log, var usage, long lines