Skip to content

AbhinavTheDev/potion

Repository files navigation

🔮 Potion

Note

Potion is an AI-powered note-taking platform that transforms your thoughts into intelligent, searchable knowledge. Leveraging MindsDB's advanced AI capabilities, Potion enables semantic search, AI-generated summaries, and intelligent chat assistance to make your notes truly smart.

🎬 Project Showcase

Demo Video Blog Post
Video Blog Post

🌟 Features

Potion transforms your note-taking experience with:

  • 🔍 AI-Powered Search – Find notes using natural language queries with semantic understanding and relevance ranking
  • 📝 Smart Summaries – Instantly generate concise AI summaries of any note to extract key insights
  • 💬 Intelligent Chat – Converse with your AI assistant about your notes and receive contextual answers
  • 🏷️ Organized Categories – Effortlessly sort notes into categories (Class, Meeting, Personal, Research, Ideas)
  • Real-time Sync – Work seamlessly with localStorage persistence and MindsDB cloud synchronization
  • 🎨 Beautiful UI – Enjoy a modern sticky note design with smooth animations and responsive layout

💻 Installation

Prerequisites

  • Node.js (v18+)
  • npm or yarn
  • Docker Desktop (for MindsDB)

Quick Setup

  1. Clone Repository
git clone https://github.com/abhinavthedev/potion.git
cd potion
  1. Launch MindsDB
# Start MindsDB container
docker-compose up -d

# MindsDB Console: http://127.0.0.1:47334
  1. Configure API Keys

    • Create .env file from .env.sample with the following:
# Azure OpenAI Configuration
api_key=your_azure_openai_api_key
api_base_url=https://your-resource-name.openai.azure.com
embed_api_key=your_azure_embedding_api_key
embed_api_base_url=https://your-embedding-resource.openai.azure.com

# Google Cloud API
GOOGLE_API_KEY=your_google_api_key

# MindsDB Configuration
MindsDB_URL=http://127.0.0.1:47334

Tip

Get API keys from Azure OpenAI (deploy GPT-4 and text-embedding-3-small models) and Google AI Studio

  1. Install & Run
npm install
npm run dev

# Access at: http://localhost:3000
  1. Initialize AI Features
    • Create your first notes
    • Click "Initiate AI Magic" button
    • Start searching and chatting with your notes

🛠️ Tech Stack

Category Technologies
Frontend Vanilla JavaScript, CSS3, HTML5
Backend Node.js, Express.js
AI & ML MindsDB, Azure OpenAI (GPT-4 & Embeddings), Google Gemini, ChromaDB
Infrastructure Docker

🚀 Usage

Creating Notes

  1. Click Add Note button
  2. Enter title, select category, write content
  3. Save to create your note

AI-Powered Search

  1. Activate AI capabilities
  2. Use the bottom search bar with natural language
  3. View results ranked by relevance

AI Summaries & Chat

  • Click on any note and select Generate AI Summary
  • Use the chat icon (bottom right) to ask questions about your notes

📁 Project Structure

potion/
├── public/              # Frontend assets
│   ├── index.html       # Main HTML interface
│   ├── style.css        # Styling and animations
│   └── script.js        # Frontend logic
├── utils/               # Helper functions
├── app.js               # Express server
├── mindsdb.js           # MindsDB integration
├── setup.js             # Initial configuration
├── docker-compose.yml   # Docker setup
└── .env.sample          # Sample of Environment variables

🔧 API Endpoints

Method Endpoint Description
POST /api/setup Initialize MindsDB project
POST /api/mindsdb/initialize Set up knowledge base and models
POST /api/notes/search Semantic search through notes
POST /api/notes/summarize Generate note summaries
POST /api/chat Chat with AI about notes
POST /api/upload Upload notes to MindsDB

🐛 Troubleshooting

Issue Solution
MindsDB not accessible • Ensure Docker is running
• Check container: docker ps
• Restart: docker-compose restart mindsdb
• Verify port 47334 is available
AI features not working • Check MindsDB status
• Verify API keys
• Ensure notes exist before AI activation
Search not returning results • Confirm AI activation
• Try broader search terms
• Check MindsDB connection

Note

For detailed installation help, see MindsDB Installation Docs

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

📄 License

Potion is licensed under the Unlicense. See the LICENSE file for details.

👤 Author

Abhinav
Abhinav

🌟 If you find Potion helpful, please give it a star on GitHub! 🌟

About

Intelligent Note-Taking Assistant

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published