Skip to content

🧠 RAG-Powered Note Taking App β€” Chat with your notes using AI

License

Notifications You must be signed in to change notification settings

Muhammad-Bilal-03/second_brain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Second Brain

RAG-Powered Note Taking App β€” Chat with your notes using AI

Flutter Dart License: MIT CI

πŸ“– Overview

Second Brain is a local-first, AI-powered note-taking application that lets you "chat" with your notes using Retrieval Augmented Generation (RAG). Built with Flutter for cross-platform support, it combines the power of local storage with optional cloud sync for a seamless note-taking experience.

✨ Features

  • βœ… Notes CRUD β€” Create, read, update, and delete notes with search functionality
  • πŸ” Semantic Search β€” Find notes using natural language queries powered by embeddings
  • πŸ’¬ RAG Chat β€” Have conversations with your notes using AI (Google Gemini)
  • 🎀 Voice-to-Note β€” Convert speech to text for quick note capture
  • ☁️ Cloud Sync β€” Optional synchronization with Supabase (pgvector for embeddings)
  • πŸŒ“ Dark Mode β€” Beautiful Material 3 theme with light and dark modes

πŸ› οΈ Tech Stack

Category Technology
Framework Flutter 3.38.4
Language Dart 3.10.3
State Management Riverpod 2.6+
Local Database SharedPreferences (Local-first)
AI Framework LangChain.dart
LLM Google Gemini API
Cloud Backend Supabase (pgvector)

πŸ—οΈ Architecture

Second Brain follows Clean Architecture principles combined with MVVM pattern in a feature-based folder structure:

lib/
β”œβ”€β”€ app.dart                    # App root widget
β”œβ”€β”€ main.dart                   # Entry point
β”œβ”€β”€ core/                       # Core utilities
β”‚   β”œβ”€β”€ constants/             # App constants
β”‚   β”œβ”€β”€ errors/                # Error handling
β”‚   β”œβ”€β”€ theme/                 # App theme
β”‚   └── utils/                 # Extensions & helpers
β”œβ”€β”€ features/                   # Feature modules
β”‚   β”œβ”€β”€ notes/                 # Notes feature
β”‚   β”‚   β”œβ”€β”€ data/             # Data sources & models
β”‚   β”‚   β”œβ”€β”€ domain/           # Entities & use cases
β”‚   β”‚   └── presentation/     # UI & state
β”‚   β”œβ”€β”€ chat/                  # AI chat feature
β”‚   β”œβ”€β”€ search/                # Semantic search
β”‚   └── voice/                 # Voice input
└── shared/                     # Shared widgets & providers

Key Architecture Decisions

  • Local-First: All data stored locally using SharedPreferences for instant access
  • Optional Cloud Sync: Supabase integration for cross-device synchronization
  • Clean Separation: Domain logic isolated from UI and data layers
  • Testable: Architecture enables comprehensive unit and integration testing

πŸš€ Getting Started

Prerequisites

  • Flutter SDK 3.38.4 or higher
  • Dart SDK 3.10.3 or higher
  • Android Studio / VS Code with Flutter extensions
  • Git

Installation

  1. Clone the repository

    git clone https://github.com/Muhammad-Bilal-03/second_brain.git
    cd second_brain
  2. Install dependencies

    flutter pub get
  3. Run the app

    flutter run

Running Tests

flutter test

Code Generation

For Riverpod code generation:

dart run build_runner build --delete-conflicting-outputs

πŸ—ΊοΈ Roadmap

Phase 1: Foundation (Notes CRUD) βœ… Complete

  • Project setup with clean architecture
  • Core dependencies and folder structure
  • CI/CD with GitHub Actions
  • Notes CRUD with SharedPreferences
  • Material 3 UI with search & empty states
  • Riverpod state management (AsyncNotifier pattern)

Phase 2: Intelligence Layer (Embeddings + Vector Search) ⬅️ Next

  • Text embedding generation
  • Vector similarity search
  • Semantic search UI

Phase 3: RAG Chat (LangChain.dart + Gemini)

  • LangChain.dart integration
  • Google Gemini API setup
  • RAG pipeline implementation
  • Chat UI with conversation history

Phase 4: Cloud Sync (Supabase + pgvector)

  • Supabase backend setup
  • pgvector for cloud embeddings
  • Sync engine implementation
  • Conflict resolution

Phase 5: Voice-to-Note

  • Speech-to-text integration
  • Voice recording UI
  • Real-time transcription

Phase 6: Polish & Ship

  • Performance optimization
  • Comprehensive testing
  • User documentation
  • App store deployment

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘¨β€πŸ’» Author

Muhammad Bilal


Built with ❀️ using Flutter

About

🧠 RAG-Powered Note Taking App β€” Chat with your notes using AI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •