Capture your thoughts, find your notes, and ask a local AI assistant about what you have written.
Try the browser demo → · Local setup · Demo walkthrough
Next.js · TypeScript · Clerk · MongoDB · Prisma · Ollama
The public website is a browser-only notebook. The connected AI edition runs locally and requires your own service configuration.
| Public browser demo | Local connected app | |
|---|---|---|
| Access | Open GitHub Pages | Run locally, then open http://localhost:3000/notes |
| Storage | This browser's localStorage | Your MongoDB Atlas database |
| Sign-in | No account needed | Clerk authentication |
| AI assistant | Not included | Local Ollama model |
| Note tools | Edit, search, notebooks, tags, pin, archive, deletion with undo | Create, edit, delete, search |
| Backups | JSON export and import | JSON export |
| Internet | Needed to load the hosted site | Needed for Clerk and MongoDB; model inference is local |
These editions do not synchronize notes. GitHub Pages does not run the connected backend or access the model on your computer. Browser-demo notes are tied to the browser and website address; export a backup before clearing browser data.
A responsive sage-green workspace brings note management and an assistant into one interface:
- Account-based notes: Clerk identifies the signed-in user; server operations scope notes to that user.
- Persistent storage: MongoDB Atlas stores notes, with Prisma handling database access.
- Ask your notes: Ollama generates answers using selected excerpts, with numbered note references.
- Local inference: The default model is
qwen3:4b; no OpenAI credits or Pinecone account are required. - Everyday tools: Search notes, edit them, and export a JSON backup.
flowchart LR
U[Signed-in user] --> N[Next.js server]
N --> D[MongoDB via Prisma]
D --> R[Select relevant note excerpts]
R --> O[Ollama on the same computer]
O --> A[Answer with note references]
The server considers the user's 200 most recently edited notes, ranks them using keyword matching, and supplies up to five bounded excerpts to the model. This is keyword-based retrieval, not semantic vector search or model training. Answers arrive after generation completes rather than streaming token by token. References help readers check answers; model responses can still be wrong.
Clone with Git:
git clone https://github.com/ritikaradhakrishnan/SmartNotes.git
cd SmartNotesOr select Code → Download ZIP on GitHub, extract the archive, and open a terminal in the extracted folder. Use the npm lockfile and the commands below for the connected edition.
Requires Python 3; no accounts, keys, or npm installation are needed.
python3 -m http.server 4317 --bind 127.0.0.1 --directory standaloneOpen http://127.0.0.1:4317. Example notes appear on first use. Press N for a new note or / for search when you are not typing in a field. Select Save note to save edits.
You need Node.js 22 with npm, an installed Ollama application, a Clerk application, and a MongoDB Atlas database. Use your own accounts and credentials.
-
Install dependencies and create your private configuration file:
npm ci cp .env.example .env.local
Only copy the template on first setup; preserve an existing
.env.local. -
Fill in
.env.localwith your Clerk keys and MongoDB connection URI. Follow the account, database, and network instructions in LOCAL_SETUP.md. The template contains no working credentials. -
Open Ollama and download the default model once:
ollama pull qwen3:4b
-
Start the app:
npm run demo
-
Open
http://localhost:3000/notes, sign in, create a note, and ask about it.
Keep Ollama and the app terminal running. The startup check verifies configuration presence and model availability; it does not validate Clerk credentials or database connectivity. The first model response may take longer while the model loads.
.env.exampleis the public template..env.localholds your own private settings and is ignored by Git.- Never commit database passwords, Clerk secret keys, personal note exports, or real account data.
- Only Clerk's publishable key uses a
NEXT_PUBLIC_prefix. Server secrets must not use that prefix. - The development server binds to loopback, and the Ollama connection accepts only a local HTTP endpoint.
- Local AI does not mean offline storage: notes are stored in MongoDB Atlas and authentication uses Clerk.
| Path | Purpose |
|---|---|
standalone/ |
Browser-only website published to GitHub Pages |
src/app/ |
Connected Next.js pages and authenticated API routes |
src/components/ |
Workspace, note editor, and chat interface |
src/lib/ |
Retrieval, validation, database, and Ollama helpers |
prisma/schema.prisma |
Note data model |
tests/ |
Browser model and connected logic tests |
.github/workflows/pages.yml |
Browser-edition checks and GitHub Pages deployment |
node --test tests/browser-notes.test.mjs
npm run test:connected
npm run lint
npm run buildStop the development server before a production build because both use .next. These checks do not replace testing with real Clerk and MongoDB configuration. See the demo walkthrough for a save, reload, search, and AI-answer rehearsal.
The browser edition is publicly hosted. The connected edition is a local development/demo application, not a publicly deployed multi-user service. Publishing it requires a server-capable host, a suitable model service, and further production validation. Remaining dependency advisories and multi-user checks are documented in LOCAL_SETUP.md.
Earlier project code used OpenAI and Pinecone. The current connected implementation uses Next.js 15 and Ollama; OpenAI, Pinecone vector embeddings, and Vercel AI SDK streaming are not current features.