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

 
 
 

Contributors