RAG-Powered Note Taking App β Chat with your notes using AI
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.
- β 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
| 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) |
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
- 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
- Flutter SDK 3.38.4 or higher
- Dart SDK 3.10.3 or higher
- Android Studio / VS Code with Flutter extensions
- Git
-
Clone the repository
git clone https://github.com/Muhammad-Bilal-03/second_brain.git cd second_brain -
Install dependencies
flutter pub get
-
Run the app
flutter run
flutter testFor Riverpod code generation:
dart run build_runner build --delete-conflicting-outputs- 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)
- Text embedding generation
- Vector similarity search
- Semantic search UI
- LangChain.dart integration
- Google Gemini API setup
- RAG pipeline implementation
- Chat UI with conversation history
- Supabase backend setup
- pgvector for cloud embeddings
- Sync engine implementation
- Conflict resolution
- Speech-to-text integration
- Voice recording UI
- Real-time transcription
- Performance optimization
- Comprehensive testing
- User documentation
- App store deployment
This project is licensed under the MIT License - see the LICENSE file for details.
Muhammad Bilal
- GitHub: @Muhammad-Bilal-03
- LinkedIn: muhammad-bilal-bsse
Built with β€οΈ using Flutter