rahul7star commited on
Commit
bfd14ab
Β·
verified Β·
1 Parent(s): 7b4058b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +145 -0
README.md CHANGED
@@ -64,3 +64,148 @@ Mycelium fixes the loop.
64
  - **Frontend**: React + TypeScript + Tailwind CSS
65
 
66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  - **Frontend**: React + TypeScript + Tailwind CSS
65
 
66
 
67
+
68
+ ##
69
+ # Mycelium
70
+
71
+ **A local-first personal knowledge agent that captures, connects, and surfaces what matters β€” when it matters.**
72
+
73
+ ![Mycelium UI](assets/image.png)
74
+
75
+ πŸš€ **[Live demo](https://huggingface.co/spaces/build-small-hackathon/mycelium)** Β· πŸ“Ή **[Demo video](https://www.youtube.com/watch?v=Kr7LxRm0JBs)** Β· πŸ““ **[Field Notes](https://huggingface.co/blog/build-small-hackathon/mycelium)**
76
+
77
+ ---
78
+
79
+ ## The Problem
80
+
81
+ Everyone saves things. Nobody revisits them. Screenshots, bookmarks, notes-to-self β€” all gone dark in a week. The capture habit exists. The recall loop doesn't.
82
+
83
+ Mycelium fixes the recall loop.
84
+
85
+ ---
86
+
87
+ ## What It Does
88
+
89
+ - **Capture** β€” notes, links, images. Each processed by a local LLM into a structured summary with intent classification (`learn` / `act` / `reference` / `ephemeral`) and semantic tags.
90
+ - **ASK** β€” semantic search across your knowledge base with LLM synthesis, gap analysis, Feynman self-testing, and learning arc.
91
+ - **BRIEF** β€” daily digest with synthesis across captures and a weekly thread.
92
+ - **REVIEW** β€” spaced repetition (SM-2) targeting specific claims from your own notes.
93
+ - **GRAPH** β€” visual map of how your ideas connect via embedding similarity.
94
+
95
+ ---
96
+
97
+ ## Quick Start
98
+
99
+ ### Prerequisites
100
+
101
+ - Python 3.11+
102
+ - Node 18+
103
+ - [LM Studio](https://lmstudio.ai) β€” for local LLM inference
104
+
105
+ ### 1. Clone and install
106
+
107
+ ```bash
108
+ git clone https://github.com/ajit3259/Mycelium
109
+ cd Mycelium
110
+ python -m venv .venv
111
+ source .venv/bin/activate # Windows: .venv\Scripts\activate
112
+ pip install -r requirements.txt
113
+ ```
114
+
115
+ ### 2. Set up LM Studio
116
+
117
+ 1. Download [LM Studio](https://lmstudio.ai)
118
+ 2. Load a **chat model** β€” recommended: `google/gemma-3-4b-it` or any instruction-tuned model under 8B
119
+ 3. Load an **embedding model** β€” recommended: `BAAI/bge-base-en-v1.5` (search it in LM Studio's Discover tab, download the GGUF version)
120
+ 4. Start the Local Server (default: `http://localhost:1234`)
121
+
122
+ ### 3. Initialize the database
123
+
124
+ ```bash
125
+ python -c "from db import init_db; init_db()"
126
+ ```
127
+
128
+ Optionally seed with 22 example captures to explore the UI:
129
+ ```bash
130
+ python seed.py
131
+ ```
132
+
133
+ ### 4. Start the backend
134
+
135
+ ```bash
136
+ uvicorn main:app --port 8000
137
+ ```
138
+
139
+ ### 5. Build the frontend
140
+
141
+ ```bash
142
+ cd frontend
143
+ npm install
144
+ npm run build # outputs to ../static/, served by FastAPI
145
+ ```
146
+
147
+ Open [http://localhost:8000](http://localhost:8000).
148
+
149
+ > **Dev mode (hot reload):** `npm run dev` in the frontend folder β€” runs on port 5173 with proxy to backend.
150
+
151
+ ---
152
+
153
+ ## Configuration
154
+
155
+ All config is in `config.py` and can be overridden with environment variables:
156
+
157
+ | Variable | Default | Description |
158
+ |---|---|---|
159
+ | `LM_STUDIO_URL` | `http://localhost:1234/v1` | LM Studio server URL |
160
+ | `LM_MODEL` | auto-detected | Chat model name (leave blank to use whatever is loaded) |
161
+ | `EMBED_MODEL` | `BAAI/bge-base-en-v1.5` | Sentence-transformer embedding model |
162
+ | `DB_PATH` | `./mind.db` | SQLite database path |
163
+ | `UPLOADS_DIR` | `./uploads` | Directory for uploaded images |
164
+
165
+ ---
166
+
167
+ ## How It Works
168
+
169
+ ```
170
+ Capture β†’ LLM enrichment β†’ Embed β†’ Connect β†’ Surface β†’ Review
171
+ ```
172
+
173
+ 1. You capture a note, URL, or image
174
+ 2. LM Studio extracts summary, tags, intent, claims, and a recall question
175
+ 3. `BAAI/bge-base-en-v1.5` embeds the summary into a 768-dim vector
176
+ 4. Related captures link automatically via cosine similarity (rank-based, top 2)
177
+ 5. Surface engine resurfaces captures by intent + recency scoring
178
+ 6. SM-2 spaced repetition schedules review of what you should remember
179
+
180
+ ---
181
+
182
+ ## Project Structure
183
+
184
+ ```
185
+ .
186
+ β”œβ”€β”€ main.py # FastAPI app β€” all API endpoints
187
+ β”œβ”€β”€ lm.py # Unified LLM interface (LM Studio + HF Transformers)
188
+ β”œβ”€β”€ db.py # SQLite schema + all queries
189
+ β”œβ”€β”€ surface.py # Intent-weighted surfacing + scoring
190
+ β”œβ”€β”€ config.py # Config β€” auto-detects HF Spaces vs local
191
+ β”œβ”€β”€ seed.py # Optional: seed 22 example captures
192
+ β”œβ”€β”€ requirements.txt
193
+ β”œβ”€β”€ FIELD_NOTES.md # Build post-mortem
194
+ β”œβ”€β”€ frontend/ # React + TypeScript + Vite + Tailwind CSS
195
+ β”‚ └── src/
196
+ β”‚ β”œβ”€β”€ App.tsx
197
+ β”‚ β”œβ”€β”€ api.ts
198
+ β”‚ β”œβ”€β”€ types.ts
199
+ β”‚ └── components/
200
+ β”‚ β”œβ”€β”€ CaptureBar.tsx # Note / Link / Image capture
201
+ β”‚ β”œβ”€β”€ Feed.tsx # Recent captures
202
+ β”‚ β”œβ”€β”€ AskScreen.tsx # Semantic search + synthesis
203
+ β”‚ β”œβ”€β”€ BriefScreen.tsx # Daily digest
204
+ β”‚ β”œβ”€β”€ ReviewScreen.tsx # Spaced repetition
205
+ β”‚ β”œβ”€β”€ GraphView.tsx # Knowledge graph
206
+ β”‚ └── Card.tsx # Shared capture card
207
+ └── static/ # Built frontend (served by FastAPI)
208
+ ```
209
+
210
+ ---
211
+