Smart Note Project is a full-stack note intelligence app that turns raw notes into structured knowledge. You can paste unstructured text, generate a concise summary with topic tags, persist the note, and later retrieve related notes through semantic search.
The project is intentionally simple at the UI layer and more interesting in the data flow: local LLM summarization with Ollama, structured note storage in Supabase, vector indexing in Pinecone, and a FastAPI service that coordinates the whole pipeline.
The user pastes free-form note text into the React app. The backend sends that text to Ollama, asks for a structured JSON response, and returns:
- a generated summary
- a list of extracted tags
After summarization, the backend stores the original note content, generated summary, and tags in Supabase.
The backend generates an embedding for the original note text with Ollama and upserts it into Pinecone using the Supabase note ID as the vector ID.
When a user searches, the backend embeds the query, retrieves similar vectors from Pinecone, then hydrates full note records from Supabase and returns ranked matches to the frontend.
flowchart LR
U[User] --> F[React + Vite Frontend]
F -->|POST /api/summarize| B[FastAPI Backend]
F -->|POST /api/search| B
B --> O[Ollama]
B --> S[Supabase]
B --> P[Pinecone]
O -->|summary + tags| B
O -->|embeddings| B
B -->|store note record| S
B -->|upsert/query vectors| P
S -->|note rows| B
P -->|similar ids + scores| B
B --> F
sequenceDiagram
participant UI as Frontend
participant API as FastAPI
participant LLM as Ollama
participant DB as Supabase
participant VS as Pinecone
UI->>API: POST /api/summarize { content }
API->>LLM: summarize prompt
LLM-->>API: { summary, tags }
API->>DB: insert note record
DB-->>API: inserted note id
API->>LLM: embed original note
LLM-->>API: embedding vector
API->>VS: upsert vector by note id
API-->>UI: { summary, tags }
sequenceDiagram
participant UI as Frontend
participant API as FastAPI
participant LLM as Ollama
participant VS as Pinecone
participant DB as Supabase
UI->>API: POST /api/search { query, top_k }
API->>LLM: embed query
LLM-->>API: query embedding
API->>VS: similarity search
VS-->>API: note ids + scores
API->>DB: fetch matching note rows
DB-->>API: full note records
API-->>UI: ranked results
smart-note-project/
├── README.md
├── backend/
│ ├── main.py
│ ├── pyproject.toml
│ ├── README.md
│ ├── models/
│ │ ├── search.py
│ │ └── summarize.py
│ ├── routes/
│ │ ├── search.py
│ │ ├── search_test.py
│ │ └── summarize.py
│ └── services/
│ ├── ollama_client.py
│ ├── supabase_client.py
│ └── vector_store.py
└── frontend/
├── package.json
├── vite.config.ts
├── README.md
└── src/
├── App.tsx
├── main.tsx
├── components/
│ └── Navbar.tsx
├── lib/
│ └── api.ts
└── pages/
├── search.tsx
└── summarizer.tsx
- React 19
- TypeScript
- Vite
- React Router
- Axios
- Tailwind CSS v4
- Python 3.12+
- FastAPI
- Uvicorn
- Pydantic
- Ollama for local LLM inference and embeddings
- Supabase for note persistence
- Pinecone for vector storage and similarity search
- Provide a summarization screen
- Provide a semantic search screen
- Call the backend through a single API client
- Render summaries, tags, and search results
- Expose REST endpoints
- Build prompts for Ollama
- Parse structured summary output
- Store note records in Supabase
- Create embeddings
- Upsert and query vectors in Pinecone
- Supabase stores canonical note data
- Pinecone stores retrieval vectors keyed by note ID
- Ollama provides both summarization and embeddings
- creates the FastAPI app
- configures CORS for the local Vite dev server
- mounts the summarize and search routers
- accepts note content
- calls Ollama for summary and tags
- inserts the note into Supabase
- generates an embedding and stores it in Pinecone
- embeds the search query
- queries Pinecone for similar note IDs
- fetches full note records from Supabase
- returns ranked results
- builds the summarization prompt
- calls the
llama3chat model - parses JSON-like output
- generates embeddings with
all-minilm
- loads environment variables
- initializes the shared Supabase client
- loads Pinecone configuration
- creates the index if it does not already exist
- exposes the shared index handle and upsert helper
- collects raw note input
- sends note text to the backend
- renders the returned summary and tags
- captures a search query
- requests semantically similar notes
- renders note content and tags for each hit
- centralizes HTTP calls to the backend
- uses
VITE_API_URLwhen provided - falls back to
http://localhost:8000/api
- Node.js 20+
- npm
- Python 3.12+
uvfor Python dependency management- Ollama installed locally
- Supabase project with a
notestable - Pinecone account and API key
git clone <your-repo-url>
cd smart-note-projectcd frontend
npm install
cd ..cd backend
pip install uv
uv sync
cd ..ollama pull llama3
ollama pull all-minilmCreate backend/.env:
SUPABASE_URL=your_supabase_project_url
SUPABASE_KEY=your_supabase_service_or_api_key
PINECONE_API_KEY=your_pinecone_api_key
PINECONE_INDEX=smart-notes
PINECONE_ENVIRONMENT=us-east-1Create frontend/.env if you want to override the API base URL:
VITE_API_URL=http://localhost:8000/apiThe backend expects a notes table compatible with this schema:
create table notes (
id uuid primary key default gen_random_uuid(),
content text not null,
summary text not null,
tags text[] not null default '{}',
created_at timestamptz not null default now()
);cd backend
uv run python main.pyThe API will be available at:
http://localhost:8000http://localhost:8000/docs
cd frontend
npm run devThe frontend dev server will be available at http://localhost:5173.
Basic health check.
Response:
{
"message": "Hello!"
}Summarizes note content, extracts tags, saves the note, and indexes it for search.
Request:
{
"content": "FastAPI is a modern Python framework for building APIs."
}Response:
{
"summary": "FastAPI is a modern Python API framework focused on speed and developer productivity.",
"tags": ["python", "fastapi", "api"]
}Embeds a query, retrieves similar note vectors, and returns hydrated note records.
Request:
{
"query": "python api framework",
"top_k": 3
}Response:
{
"results": [
{
"id": "note-id",
"content": "FastAPI is a modern Python framework for building APIs.",
"tags": ["python", "fastapi", "api"],
"score": 0.82
}
]
}This repo already demonstrates a strong architecture direction, but a production deployment should tighten a few areas:
- Move secrets into a real secret manager instead of local
.envfiles - Replace permissive local-only CORS config with environment-specific settings
- Add authentication and user-scoped note ownership
- Add request validation limits for note size and query size
- Add structured logging, tracing, and metrics
- Add retry and timeout policies around external services
- Make summarization and indexing asynchronous jobs for better latency and resilience
- Add database migrations instead of relying on manual schema creation
- Add test coverage for route behavior and service failure modes
- Add CI for linting, type-checking, tests, and build verification
These are worth knowing up front if you plan to extend the project:
- The frontend is functional but intentionally minimal
- The backend uses print-based logging rather than structured observability
- The summarize path does not fail the request if Pinecone indexing fails
- Ollama response parsing is tolerant but not schema-enforced
- There is no auth, rate limiting, or multi-tenant isolation yet
- There are no automated tests wired into the repo today
backend/routes/search_test.pyis a standalone experiment script, not an app route- The backend starts external clients at import time, so invalid env config can fail startup early
If you want to turn this into a stronger portfolio or product repo, these are the highest-leverage next steps:
- Add authentication and per-user note collections.
- Introduce background jobs for summarization and indexing.
- Add note history, editing, and re-indexing workflows.
- Return summaries in search results to improve scanability.
- Add filtering by tags and created date.
- Add tests for the API and a mocked integration layer for Ollama, Supabase, and Pinecone.
- Containerize the app with Docker Compose for one-command local setup.
- Add deployment manifests for the frontend and backend.
If you are reviewing the repo, this is the fastest way to validate it:
- Start Ollama and pull
llama3andall-minilm. - Configure Supabase and Pinecone.
- Run the backend on port
8000. - Run the frontend on port
5173. - Create a note through the Summarize page.
- Search for related concepts from the Search page.
Contributions are easiest when they preserve the current separation of concerns:
- UI and routing changes in
frontend/src - API contracts in
backend/models - HTTP behavior in
backend/routes - external service logic in
backend/services
For larger changes, prefer adding documentation for:
- new environment variables
- schema changes
- external dependency assumptions
- failure and retry behavior
No license file is currently included in this repository. If you plan to publish or accept external contributions, add a license explicitly.