NB
Back to Selected Projects
AIStatus: ActiveYear: 2025 - Present

Local AI Assistant

A privacy-first desktop AI interface running quantized open-source models completely offline.

01. Overview & Description

An intelligent AI coding assistant that operates reliably during travel or network outages without sending proprietary code snippets over public web networks.

02. System Architecture Diagram

React 18 Dashboard -> FastAPI SSE Proxy -> Ollama GGUF Engine -> Memory Buffer -> Streaming Response

Interactive System Flow Diagram

Click any node below to inspect its operational role in the pipeline.

● Live Animated Flow
1React18 DashboardFrontend Client2FastAPIEngineREST & SSE Middl3Authentication/ RLSSecurity Policy4PostgreSQL/ SQLitePersistence Laye5LocalOllama LLMQuantized Infere6StreamedResponseUI Rendering Out
Selected Node: React 18 Dashboard(Frontend Client)

Handles user prompt input, interval charts, SSE streaming data rendering, and dark-theme state management.

03. Database Schema & API Specifications

Database Schema Design

SQLite local database storing encrypted user conversation histories, parameter configs, and custom system prompts.

API Endpoints
  • POST /api/chat (SSE Streamed tokens)
  • GET /api/models
  • POST /api/embeddings

04. Codebase Folder Structure

local-ai-assistant/
├── backend/
│   ├── app/main.py (FastAPI SSE router)
│   ├── app/ollama.py (Local process IPC client)
│   └── app/database.py (SQLite Session store)
├── frontend/
│   └── src/components/ChatStream.tsx
└── README.md

05. Visual Evidence & Artifacts

Token Streaming Dashboardcode

$ local-ai-assistant --status active

[OK] System pipeline initialized

Real-time streaming text generation from quantized LLaMA model

Local Process Monitorterminal

$ local-ai-assistant --status active

[OK] System pipeline initialized

RAM usage holding steadily at ~4.7GB during continuous inference

06. Engineering Challenges

Handling initial model loading latency into system RAM without freezing the UI thread.

07. Key Lessons Learned

Memory bandwidth is the primary bottleneck for CPU-bound LLM inference, not compute capacity.

Technologies Used

AIOllamaPythonFastAPIReactTypeScriptTailwindCSS