How louisslnn/ai-note-tracker works
Project Type and Purpose
• This is a full-stack Python web application built with Streamlit, called “AI Note Tracker.”
• Purpose: let users add, search, retrieve, and (eventually) summarize notes via text input, voice input, or file upload. Notes are stored in a vector database (Chroma) and searched via embeddings/AI.
File Structure
• Top-level files
• Home.py – Streamlit entrypoint (defines main UI tabs/sections)
• requirements.txt, README.md, LICENSE
• utils.py – shared helper functions
• “pages/” folder
• Chatbot.py – UI for conversational retrieval or Q&A over notes
• Summarizer.py – UI to trigger summarization
• “backend/” folder (business logic / services)
• database_handler.py – low-level Chroma vector store operations
• save_prompt.py – processes and saves new notes (text, file)
• get_last_note.py – retrieves most recent note
• summarizer.py – calls OpenAI (or local) summarization APIs
• voice_input.py – captures & transcribes audio (in development)
• “vector_store/” folder
• chroma.sqlite3 + binary files for vector shards – persistent note storage
README for Insights
• Main tech stack: Python ≥3.7, Streamlit, Chroma vector DB, OpenAI embeddings/chat, (future) speech-to-text
• Features: add notes, retrieve notes by keyword or “last note,” AI summarization, voice input, file upload
a. Components
• User & Browser – end-user interacts via web browser
• Streamlit Frontend – Home.py + pages/
• Backend Service Layer – utils.py + backend/*.py
• Vector Database – Chroma (vector_store/)
• External AI Services – OpenAI Embeddings & Chat API; Speech-to-Text API (future)
b. Relationships & Data Flows
1. User → Streamlit UI (clicks “Add Note,” “Search,” “Summarize”)
2. UI → Backend Service (calls save_prompt, get_last_note, summarizer, voice_input)
3. save_prompt → database_handler → Vector DB (upsert embeddings + metadata)
4. get_last_note/search → database_handler → Vector DB → returns note text/embeddings
5. summarizer → External AI Service → returns summary → UI
6. voice_input → Speech-to-Text API → text → save_prompt
c. Architectural Patterns & Principles
• Layered (Presentation / Service / Data)
• Clear separation of concerns: UI vs. business logic vs. data storage
• Dependency injection via utils.py for shared config (e.g., API keys, DB paths)
d. Key Technologies
• Python, Streamlit
• Chroma Vector Store (chroma.sqlite3 + binary shards)
• OpenAI Python SDK for embeddings & chat
• SpeechRecognition or similar (future)
Detail Without Overthinking
• Seven backend modules as separate service functions or group logically (note ingestion vs. retrieval vs. summarization vs. voice).
• Vector_store folder’s contents as one persistent data store.
• Don’t omit the utils.py; either include it as a shared “Helper/Config” module or note its role in wiring the system.