Features β’ Demo β’ Quick Start β’ Architecture β’ Documentation
CrossNotes is a next-generation note-taking application that transforms passive notes into an active, queryable knowledge base. Built with cutting-edge browser-based AI technology, it enables users to interact with their notes through natural language queries while maintaining complete privacy and zero cloud AI costs.
Traditional note-taking apps treat your content as static documents. CrossNotes leverages Retrieval-Augmented Generation (RAG) to make your notes intelligent and interactive:
- π§ Ask questions about your notes in natural language
- π― Get precise answers grounded in your actual content
- π Clickable source citations with automatic excerpt highlighting
- π Privacy-first: AI processing runs entirely in your browser (optional)
- π° Zero API costs for embeddings and optional local inference
- Rich Markdown Editor with live preview
- Organized Folders for structured note management
- Real-time Sync across all your devices via Firebase
- Mobile-First Design with responsive layouts
- Dark/Light Theme support
- AI-Powered Formatting for instant note beautification
CrossNotes implements a production-grade RAG pipeline entirely in the browser:
- π Semantic Search: Find notes by meaning, not just keywords
- π¬ Conversational AI: Ask questions like "What did I write about machine learning?"
- π Source Attribution: Every answer includes clickable sources
- β¨ Excerpt Highlighting: Navigate directly to relevant content in source notes
- π Auto-Indexing: Notes are automatically indexed for instant retrieval
- π± Mobile-Optimized: Adaptive parameters for smooth mobile performance
- Local Embeddings: Text embeddings generated entirely in-browser using Transformers.js
- Local Vector Store: IndexedDB keeps all vector data on your device
- Optional Local LLM: Run AI models via WebGPU for complete offline operation
- Cloud Fallback: Optionally use DeepSeek API ($0.14 per 1M tokens) when needed
- Multi-Format Upload: Import TXT, Markdown, and PDF documents
- Batch Processing: Upload multiple files simultaneously
- Smart Extraction: Automatic text extraction with content preservation
- Export Options: Download notes in various formats
Try It Live: Experience the power of AI-driven note retrieval in action
- Create & Organize notes in folders
- Index Your Knowledge with one click
- Ask Questions like:
- "Summarize my notes about project planning"
- "Which note mentions authentication?"
- "What were my thoughts on React optimization?"
- Get Instant Answers with source citations
- Navigate Seamlessly from answers to highlighted excerpts
- Node.js 18+ (or Bun)
- npm / pnpm / yarn / bun
- Firebase Project (for authentication and sync)
- OpenRouter API Key (optional, for remote AI inference)
# Clone the repository
git clone https://github.com/nareshAiNexus/crossnotes.git
cd crossnotes
# Install dependencies
npm install
# Configure environment
cp .env.example .env
# Edit .env with your Firebase credentialsCreate a .env file with the following variables:
# Firebase Configuration (Required)
VITE_FIREBASE_API_KEY=your_firebase_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
VITE_FIREBASE_DATABASE_URL=https://your_project.firebaseio.com
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_id
# OpenRouter API (Optional - for remote AI inference)
VITE_OPENROUTER_DEEPSEEK_API_KEY=your_openrouter_key
# Fallback supported: VITE_DEEPSEEK_API_KEYnpm run devVisit http://localhost:5173 and start taking intelligent notes!
npm run build
npm run preview- React 18 with TypeScript for type safety
- Vite for lightning-fast development and optimized builds
- React Router for seamless navigation
- TanStack Query for efficient data fetching and caching
- Shadcn/ui components (Radix UI primitives)
- Tailwind CSS for utility-first styling
- Lucide Icons for consistent iconography
- MDX Editor for rich markdown editing
- Responsive Design with mobile-first approach
- Firebase Authentication (Email/Password, Google OAuth)
- Firebase Realtime Database for note synchronization
- Firebase Storage for file uploads
- Security Rules for data protection
- Transformers.js (
@xenova/transformers)- Model:
all-MiniLM-L6-v2(384-dimensional embeddings) - Runs entirely in-browser using ONNX Runtime
- ~23MB model size, cached after first load
- Model:
- MLC WebLLM (Optional)
- Local LLM inference via WebGPU
- Models: Llama-3.2-1B, Phi-3.5-mini, etc.
- Complete privacy, zero API costs
- OpenRouter / DeepSeek (Fallback)
- Cloud inference when local LLM unavailable
- Extremely cost-effective ($0.14 per 1M tokens)
- IndexedDB (via
idblibrary)- Client-side vector storage
- Efficient cosine similarity search
- Supports large-scale note collections (1000+ notes)
graph LR
A[User Creates Note] --> B[Chunk Text]
B --> C[Generate Embeddings]
C --> D[Store in IndexedDB]
E[User Asks Question] --> F[Embed Question]
F --> G[Similarity Search]
G --> H[Retrieve Top Chunks]
H --> I[Build Context]
I --> J{LLM Choice}
J -->|Local| K[WebGPU Inference]
J -->|Remote| L[DeepSeek API]
K --> M[Generate Answer]
L --> M
M --> N[Display with Sources]
N --> O[Highlight Excerpts]
- β Privacy: Your notes never leave your device for AI processing
- β Cost: Zero embedding costs (typically $0.0001 per 1K tokens with cloud APIs)
- β Speed: No network latency for embeddings
- β Offline: Works without internet connection
- β Rapid Development: Authentication, database, and storage in one SDK
- β Real-Time Sync: Instant updates across devices
- β Scalability: Google's infrastructure handles traffic automatically
- β Security: Built-in security rules, no SQL injection risks
- β Cost-Effective: Generous free tier (50K reads/day)
- β Privacy Options: Users choose their comfort level
- β Device Support: WebGPU only available on ~40% of devices
- β Performance: Local inference on desktop, remote on mobile
- β Reliability: Fallback ensures service continuity
- Sign up using email or Google authentication
- Create folders to organize notes by topic
- Write notes using the markdown editor
- Preview your formatted notes in real-time
- Auto-save ensures you never lose work
- Open the Knowledge Base floating button
- Click "Index Notes" to create your knowledge base
- Wait for indexing to complete (progress bar shows status)
- Ask natural language questions about your notes
- Click on Sources to view the original notes
- Highlighted excerpts show exactly where the answer came from
- Click the Upload button in the sidebar
- Select TXT, MD, or PDF files
- Files are automatically processed and indexed
- Access imported content immediately
- Toggle between light/dark themes
- Choose local or remote AI inference
- Configure API keys for optional features
- Manage folders and note organization
CrossNotes automatically adapts to mobile devices:
- Smaller chunk sizes (2200 vs 3000 chars) for faster processing
- Throttled progress updates to prevent UI freezing
- Reduced retrieval parameters (8 vs 12 top chunks)
- Disabled local LLM for battery efficiency
- Responsive layouts for touch interfaces
- Embedding Generation: ~50ms per chunk on modern CPUs
- Query Latency: <500ms for retrieval
- Indexing Speed: ~100 notes per minute
- Vector Search: O(n) with optimized similarity calculation
- UI Responsiveness: 60fps maintained during operations
- Firebase Security Rules: Users can only access their own data
- Token-Based Authentication: Secure session management
- Local Data Encryption (planned): End-to-end encryption
- API Key Protection: Environment variables, not exposed in bundle
- Content Security Policy: Protection against XSS attacks
crossnotes/
βββ src/
β βββ components/ # React components
β β βββ Editor.tsx # Markdown editor
β β βββ Sidebar.tsx # Navigation & note list
β β βββ KnowledgeBaseChat.tsx # RAG interface
β β βββ ui/ # Shadcn components
β βββ pages/ # Route pages
β β βββ Index.tsx # Main dashboard
β β βββ AuthPage.tsx # Authentication
β βββ hooks/ # Custom React hooks
β β βββ useAuth.tsx # Authentication logic
β β βββ useNotes.tsx # Note management
β β βββ useKnowledgeBase.tsx # RAG operations
β βββ lib/ # Core logic & services
β β βββ firebase.ts # Firebase integration
β β βββ embeddings.ts # Transformers.js wrapper
β β βββ vectordb.ts # IndexedDB vector store
β β βββ rag.ts # RAG pipeline
β β βββ chunking.ts # Text chunking
β β βββ deepseek.ts # API integration
β βββ App.tsx # Root component
βββ public/ # Static assets
βββ package.json
npm run dev # Start development server
npm run build # Production build
npm run build:dev # Development mode build
npm run preview # Preview production build
npm run lint # ESLint code quality check
npm run test # Run Vitest tests
npm run test:watch # Watch mode for tests# Run all tests
npm test
# Watch mode (for TDD)
npm run test:watch
# Coverage report
npm test -- --coverage- ESLint for code linting
- TypeScript for type safety (strict mode)
- Prettier for consistent formatting (recommended)
- Vitest for unit and integration testing
Contributions are welcome! CrossNotes is open source and community-driven.
- Fork the repository
- Create a branch:
git checkout -b feature/your-feature - Make changes and test thoroughly
- Run quality checks:
npm run lint && npm test && npm run build - Commit:
git commit -m "Add: your feature description" - Push:
git push origin feature/your-feature - Open a Pull Request with a clear description
- π Bug fixes and performance improvements
- π± Mobile UX enhancements
- π Internationalization (i18n)
- π Documentation improvements
- π¨ UI/UX refinements
- π§ͺ Test coverage expansion
- π New features (discuss in issues first)
- Follow existing code style and patterns
- Write tests for new features
- Update documentation for API changes
- Keep commits atomic and well-described
- Ensure all tests pass before submitting PR
- Collaborative Notes: Share notes with other users
- Export Options: Markdown/JSON/PDF export
- Advanced Search: Boolean operators, date filters
- Offline Mode: Full functionality without internet
- Browser Extensions: Chrome/Firefox extensions
- Graph View: Visualize note connections
- Smart Suggestions: AI-powered related notes
- Voice Input: Transcribe voice notes with Whisper.js
- Multi-modal RAG: Index images with CLIP embeddings
- Team Workspaces: Shared knowledge bases
- Self-Hosting: Docker container for on-premise deployment
- Plugin System: Community-developed extensions
- E2E Encryption: Zero-knowledge architecture
- Desktop Apps: Electron-based native applications
- Advanced Analytics: Usage patterns and insights
| Feature | CrossNotes | Notion AI | Obsidian | Evernote |
|---|---|---|---|---|
| Local-First AI | β | β | β | |
| Browser Embeddings | β | β | β | β |
| Source Citations | β Highlighted | β | ||
| Mobile Optimized | β | β | β | |
| Privacy (Local LLM) | β Optional | β | β | |
| Open Source | β | β | β | β |
| Cost | Free | $10/mo | Free | $8/mo |
- Verify
.envcredentials are correct - Check Firebase project settings
- Ensure database rules allow authenticated access
- WebGPU requires Chrome/Edge 113+ or compatible GPU
- Enable hardware acceleration in browser settings
- Fallback to DeepSeek API automatically
- Large PDFs can take time to process
- Consider batch uploads for better progress tracking
- Clear IndexedDB cache if stale data exists
- Ensure notes are indexed (check Knowledge Base status)
- Try rephrasing questions with different keywords
- Verify score threshold settings
# Enable verbose logging
VITE_DEBUG_MODE=true npm run devThis project is licensed under the MIT License - see the LICENSE file for details.
- Transformers.js: Apache 2.0
- React: MIT
- Firebase: Google Terms of Service
- Shadcn/ui: MIT
Built with amazing open-source technologies:
- React - UI library
- Vite - Build tool
- Transformers.js - Browser ML
- MLC WebLLM - WebGPU inference
- Firebase - Backend services
- Shadcn/ui - Component library
- Tailwind CSS - Styling framework
Special thanks to the open-source community for making privacy-preserving AI accessible to everyone.
- Repository: github.com/nareshAiNexus/crossnotes
- Author: nareshAiNexus
- Issues: GitHub Issues
- Discussions: GitHub Discussions
β Star this project if you find it useful!
Made with β€οΈ by nareshAiNexus