Skip to content

malharmorey/Jottr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

331 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jottr

AI-powered notes — capture anything, and summarize it on demand.

jottr.app »

React Vite Tailwind CSS Node Tests

Netlify Status


Overview

Jottr is an open-source, cross-platform note app that helps you capture thoughts, reminders, loose ideas etc and get AI-written summary on demand.

Jottr on desktop and mobile

Tech stack

Frontend — Vite · React · React Router · TanStack Query · Zustand · Tailwind CSS · Radix UI

Backend — Node · Express · Mongoose (MongoDB) · JSON Web Tokens · bcrypt · Helmet · express-rate-limit · express-validator

AI — Google Gemini 2.5 Flash

Testing — Vitest · React Testing Library · jsdom (36 tests, ~89% line coverage)

Hosting — Netlify (client) · Google Cloud Run (API) · MongoDB Atlas (data)

Architecture

client/                          server/
  React SPA (Vite)                 Express REST API
  ├─ TanStack Query  ──HTTP──►     ├─ routes/       (auth, notes)
  │   optimistic cache             ├─ middleware/   (JWT verify)
  ├─ Zustand  (alerts, modals)     ├─ models/       (Mongoose schemas)
  └─ Radix + Tailwind UI           └─ lib/          (Gemini, quota, validation)
                                        │
                                   MongoDB

Typical workflow

  1. Sign up / log in — a JWT is issued and stored client-side.
  2. Write a note — added optimistically, persisted to MongoDB Atlas.
  3. SummarizePOST /api/notes/summarize/:id runs rate-limit → JWT auth → ownership check → daily quota → Gemini, and returns the summary.
  4. Edit or delete — both optimistic; delete holds a 10-second undo before it commits.

Getting started

Prerequisites

  • Node 22+
  • A MongoDB connection (Atlas or local)
  • A Google Gemini API key

Environment variables

server/.env

MONGO_USERNAME=...
MONGO_PASSWORD=...
MONGO_CLUSTER=...
MONGO_DBNAME=...
JWT_SECRET_KEY=...
CLIENT_ORIGIN=http://localhost:5173
GEMINI_API_KEY=...

client/.env

VITE_HOST=http://localhost:8080

Install and run

# install dependencies
cd client && npm install
cd ../server && npm install

# run both from the repo root (client on :5173, API on :8080)
npm run dev

Scripts (client)

npm run dev          # start the dev server
npm run build        # production build → dist/
npm run lint         # ESLint
npm run test:run     # run the test suite once
npm run coverage     # tests with a coverage report

Deployment

  • Client → Netlify. Build npm run build, publish dist/, Node 22. SPA routing via client/public/_redirects.
  • API → Google Cloud Run, with the runtime environment variables above set on the service.
  • Data → MongoDB Atlas.

License

MIT License