Reflecto is your AI‑powered second brain. Capture voice notes, images, and text—Reflecto automatically performs OCR and speech‑to‑text, organizes content into connected Spaces, and makes everything instantly searchable.
Originally bootstrapped with Better-T-Stack.
- Ingestion — Upload images and voice notes. OCR and speech‑to‑text run automatically.
- AI Processing — Extracts text and metadata into a structured store for fast retrieval.
- Spaces Graph — Discover AI‑suggested relationships and navigate ideas visually.
- Full‑text Search — Find anything across your entire knowledge base with low latency.
- Secure & Private — Your data is yours—authentication and storage are handled securely.
- Voice‑first — Capture thoughts hands‑free and let Reflecto do the rest.
- Beautiful UI — React + Tailwind + shadcn/ui.
- Portable — PWA support and a Tauri desktop target.
- Monorepo Tooling — Turborepo orchestration, Husky pre‑commit hooks.
First, install the dependencies:
pnpm installThe homepage embeds a looping YouTube preview. You can point it to your own video by setting an env variable in apps/web/.env:
VITE_YOUTUBE_DEMO_ID=<your_video_id>This project uses PostgreSQL with Drizzle ORM.
-
Make sure you have a PostgreSQL database set up.
-
Update your
apps/server/.envfile with your PostgreSQL connection details. -
Apply the schema to your database:
pnpm db:pushThen, run the development server:
pnpm devOpen http://localhost:3001 in your browser to see the web application. The API is running at http://localhost:3000.
Reflecto/
├── apps/
│ ├── web/ # Frontend (React + TanStack Router + Tailwind + shadcn/ui)
│ ├── server/ # Backend API (Hono, tRPC, Drizzle, PostgreSQL)
│ └── tldraw/ # tldraw integration (if enabled)
├── docs/ # Project docs and guides
├── turbo.json # Turborepo pipeline config
├── pnpm-workspace.yaml
└── package.json # Root scripts for dev/build
pnpm dev— Run all relevant dev processes via Turborepo.pnpm build— Build all packages/apps.pnpm check-types— Typecheck across the monorepo.pnpm dev:native— Run the native (Tauri) app in dev, if present.pnpm dev:web— Run only the web app in dev.pnpm dev:server— Run only the server in dev.pnpm db:push— Apply Drizzle schema to the database.pnpm db:studio— Open Drizzle Studio.pnpm db:generate— Generate SQL migrations from schema.pnpm db:migrate— Run pending migrations.pnpm db:start|db:stop|db:watch|db:down— Local DB helpers (if configured).
The project now uses Appwrite Authentication instead of Better-Auth.
Environment variables:
-
Server (
apps/server/.env)APPWRITE_ENDPOINT— e.g. https://.cloud.appwrite.io/v1APPWRITE_PROJECT_ID— your Appwrite Project ID
-
Web (
apps/web/.env)VITE_APPWRITE_ENDPOINT— same endpoint as aboveVITE_APPWRITE_PROJECT_ID— same project idVITE_SERVER_URL— TRPC server URL (e.g. http://localhost:3000)VITE_YOUTUBE_DEMO_ID— optional, overrides the homepage demo video
How it works:
- Web uses Appwrite's Account SDK to sign up/in and get the current user.
- For server calls, web obtains a short-lived JWT via
account.createJWT()and sends it asAuthorization: Bearer <jwt>. - Server initializes an Appwrite Server SDK per request, reads the JWT (or falls back to
a_session_<PROJECT_ID>cookie), and resolves the user withaccount.get()in TRPC context. - Protected routes remain enforced via
protectedProcedure.
Notes:
- If relying on session cookies from the browser, use a custom domain for Appwrite so cookies are first-party (or enable 3rd-party cookies in local dev).
- Web: React, TanStack Router, TanStack Query, TailwindCSS, shadcn/ui
- Server: Hono, tRPC, Drizzle ORM, PostgreSQL
- Infra/Tooling: Turborepo, pnpm, Biome, Husky, lint-staged
- Auth: Appwrite
- Desktop: Tauri (optional)
Contributions are welcome! Feel free to open issues and pull requests. Before committing, run:
pnpm checkMIT