Skip to content

atish23/ai_note_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

14 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

AI Notes & Task Manager

A powerful AI-enhanced note-taking and task management application with local storage, cloud backup, and intelligent features.

โœจ Features

  • ๐Ÿ“ Smart Note Taking: Create, edit, and organize notes with AI enhancement
  • ๐ŸŽฏ Task Management: Track tasks with priorities and due dates
  • ๐Ÿ” AI-Powered Search: Find notes using semantic search
  • โ˜๏ธ Google Drive Backup: Automatic cloud synchronization
  • ๐Ÿ–ฅ๏ธ Multiple Interfaces: Web app and native macOS app
  • ๐Ÿ”’ Local Storage: All data stored locally with SQLite
  • ๐Ÿค– AI Integration: Support for multiple AI providers (Ollama, Google Gemini)

๐ŸŽฌ Demo

AI Notes Demo

Creating notes, managing tasks, and using AI features

๐Ÿš€ Quick Start

Option 1: Web Application (Recommended)

  1. Setup and Run:

    cd AI_Note_App
    ./run.sh setup       # First time only
    ./run.sh streamlit   # Start web app
  2. Access: Open http://localhost:8501 in your browser

Option 2: Native macOS App

  1. Setup and Run:

    cd AI_Note_App
    ./run.sh setup          # First time only (same as web)
    ./run_macos.sh macos    # Start macOS app
  2. Desktop Launcher (Optional):

    • Double-click launch_ai_notes.command from Desktop
    • Or use the AppleScript launcher: AI_Notes_Launcher.applescript

๐Ÿ“‹ Prerequisites

  • macOS (tested on macOS 14+)
  • Python 3.8+ (automatically managed via virtual environment)
  • Internet connection (for AI features and cloud backup)

๐Ÿ”ง Installation & Setup

Configure AI Provider (Optional)

Edit llm_config.json to change the active provider:

{
  "llm_provider": "ollama",  // Change to "gemini" for Google Gemini
  "providers": {
    "gemini": {
      "model_text": "gemini-1.5-flash",
      "model_embedding": "embedding-001",
      "api_key_required": true
    },
    "ollama": {
      "model_text": "llama3.1:8b", 
      "model_embedding": "nomic-embed-text",
      "base_url": "http://localhost:11434",
      "api_key_required": false
    }
  }
}

Google Drive Backup (Optional)

# Follow the setup guide
python setup_google_drive.py

For detailed Google Drive setup instructions, see GOOGLE_DRIVE_SETUP.md.

๐ŸŽฎ Usage Commands

Main Commands

# Web Application
./run.sh streamlit         # Start web interface

# macOS Native App
./run_macos.sh macos       # Start native app

# Setup & Maintenance
./run.sh setup             # Initial setup
./run.sh setup-ollama      # Setup Ollama models

๐Ÿ–ฅ๏ธ Interface Options

Web Interface (Streamlit)

  • URL: http://localhost:8501
  • Features: Full-featured web interface
  • Best for: Daily use, cross-platform access

macOS Native App (PyQt6)

  • Type: Native macOS application
  • Features: System integration, dock icon, notifications
  • Best for: Native macOS experience

MCP Server (Model Context Protocol)

  • Type: Server interface for AI integration
  • Features: Allows external tools to interact with your notes
  • Best for: Integration with other AI tools and workflows
  • Usage: Run python mcp_server.py to start the MCP server

โš™๏ธ Configuration

AI Provider Setup

Ollama (Local AI)

# Install Ollama
brew install ollama

# Pull a model
ollama pull llama3.1:8b

# Update config - set llm_provider to "ollama"
{
  "llm_provider": "ollama"
}

Google Gemini (Cloud AI)

{
  "llm_provider": "gemini"
}

Get Gemini API Key:

  1. Visit Google AI Studio
  2. Create a new API key
  3. Set up environment variable: export GEMINI_API_KEY="your-key-here"

Google Drive Backup

  1. Run: python setup_google_drive.py
  2. Follow the authentication flow
  3. Automatic backups will be enabled

For detailed setup instructions, see GOOGLE_DRIVE_SETUP.md.

๐Ÿ“ Project Structure

AI_Note_App/
โ”œโ”€โ”€ ai_note_app.py              # Main Streamlit app
โ”œโ”€โ”€ macos_app.py                # Native macOS app
โ”œโ”€โ”€ mcp_server.py               # Model Context Protocol server
โ”œโ”€โ”€ run.sh                      # Web app launcher script  
โ”œโ”€โ”€ run_macos.sh                # macOS app launcher script
โ”œโ”€โ”€ build_app.sh                # App building script
โ”œโ”€โ”€ launch_ai_notes.command     # Desktop launcher
โ”œโ”€โ”€ AI_Notes_Launcher.applescript # AppleScript launcher
โ”œโ”€โ”€ backup_ai_notes.command     # Manual backup script
โ”œโ”€โ”€ requirements.txt            # Python dependencies
โ”œโ”€โ”€ llm_config.json            # AI configuration
โ”œโ”€โ”€ GOOGLE_DRIVE_SETUP.md      # Detailed Google Drive setup guide
โ”œโ”€โ”€ core/                       # Core services
โ”‚   โ”œโ”€โ”€ agent_service.py        # AI agent logic
โ”‚   โ”œโ”€โ”€ ai_service.py           # AI provider interface
โ”‚   โ”œโ”€โ”€ database_service.py     # SQLite operations
โ”‚   โ”œโ”€โ”€ backup_service.py       # Google Drive backup
โ”‚   โ”œโ”€โ”€ search_service.py       # FAISS vector search
โ”‚   โ””โ”€โ”€ models.py               # Data models
โ”œโ”€โ”€ backup_manager.py           # Backup utilities
โ”œโ”€โ”€ setup_google_drive.py       # Google Drive setup
โ”œโ”€โ”€ demo/                       # Demo files
โ”œโ”€โ”€ backups/                    # Backup storage
โ”œโ”€โ”€ notes.db                    # SQLite database
โ”œโ”€โ”€ faiss.index                 # Search index
โ””โ”€โ”€ google_drive_credentials_template.json # Template for credentials

๐Ÿ” Troubleshooting

Common Issues

Virtual environment not found:

./run.sh setup

Port already in use:

# Stop any running Streamlit processes and restart
./run.sh streamlit

AI not working:

# Check Ollama
ollama list

# Or verify Gemini API key environment variable
echo $GEMINI_API_KEY

Google Drive issues:

python setup_google_drive.py

Logs & Debugging

  • Check terminal output for detailed error messages
  • Backup logs are in the backups/ directory
  • Database issues: Delete notes.db to reset (loses data)

๐Ÿ†˜ Getting Help

  1. Check logs: Terminal output shows detailed error messages
  2. Reset database: Delete notes.db if corrupted
  3. Reinstall: Delete venv_mcp/ and run ./run.sh setup
  4. Backup first: Always backup data before troubleshooting

๏ฟฝ License

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


Quick Start Summary:

  1. cd AI_Note_App
  2. ./run.sh setup (first time)
  3. ./run.sh streamlit (web) or ./run_macos.sh macos (macOS)
  4. Open http://localhost:8501 (web) or use the native app window

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •