mirror of
https://github.com/temetro/temetro.git
synced 2026-07-26 11:58:14 +00:00
chore: initialize temetro monorepo (shared root files)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
/node_modules
|
||||
.DS_Store
|
||||
*.log
|
||||
.env
|
||||
.env.local
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"mcpServers": {
|
||||
"shadcn": {
|
||||
"command": "npx",
|
||||
"args": [
|
||||
"shadcn@latest",
|
||||
"mcp"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
# CLAUDE.md
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||
|
||||
## Project
|
||||
|
||||
`temetro` — an **open-source** clinical tool that acts as an **AI middleman** between clinicians and
|
||||
patient data. Clinicians use a natural-language AI chat to retrieve and organize patient information,
|
||||
displayed as rich record cards.
|
||||
|
||||
The distinguishing idea is a **patient-owned data model**. Instead of (or alongside) living in a
|
||||
doctor's own database, a patient's record can be stored on the **patient's own device**. When a
|
||||
clinician adds or changes data, they **sign** it (blockchain-style); the change is written to the
|
||||
patient's record and **cannot be modified until the patient approves it** through a companion app.
|
||||
temetro can also **read existing patient databases** and present them in the same organized card UI.
|
||||
|
||||
This directory is the project root; the actual apps live in subdirectories.
|
||||
|
||||
> **Status:** the **backend is now built**. `backend/` is a TypeScript + Express + Postgres API
|
||||
> (Drizzle ORM) with authentication and multi-tenant clinics via **Better Auth**, plus an
|
||||
> **org-scoped patient records API**. The `frontend/` chat is **wired to it**: real auth
|
||||
> (login/signup/reset/onboarding), route protection, clinic switching, and patient data fetched
|
||||
> over the API — the old in-memory fixture is gone (`lib/patients.ts` now calls the backend).
|
||||
>
|
||||
> **Still vision, not built:** the patient companion app and the blockchain-style **signing /
|
||||
> patient-owned storage / approval** flow. The AI chat itself is still **mock replies** (no LLM
|
||||
> call yet — a `/chat` endpoint is the next planned step). Email verification is wired but
|
||||
> currently **not enforced** at sign-in (see `backend/CLAUDE.md`).
|
||||
|
||||
## Layout
|
||||
|
||||
- **`frontend/`** — the Next.js product app (the AI chat UI). This is where almost all current work
|
||||
happens. **It has its own `CLAUDE.md`** — read `frontend/CLAUDE.md` for the stack, commands,
|
||||
architecture, and gotchas. It is also its own git repository.
|
||||
- **`landing-page/`** — the marketing landing page. A standalone copy of `frontend/` (same
|
||||
customized Next.js stack) with the landing sections in `components/landing/`.
|
||||
- **`backend/`** — the TypeScript + Express + Postgres API (Drizzle ORM + Better Auth). Built and
|
||||
Dockerised. **Has its own `CLAUDE.md`** (and `README.md`) — read it for the auth/schema workflow
|
||||
and gotchas. Its own git repository.
|
||||
- **`database/`, `docs/`** — still empty placeholders.
|
||||
- **`landing-page/`** — see above; unchanged, still UI-only marketing.
|
||||
|
||||
`frontend/`, `landing-page/`, and `backend/` are **independent** apps, each with its own
|
||||
`package.json`/`node_modules`. Run `npm` commands from inside the relevant app directory, not from
|
||||
this root.
|
||||
|
||||
## Running the stack
|
||||
|
||||
From `backend/`: `cp .env.example .env` (set `BETTER_AUTH_SECRET`; set `POSTGRES_PORT` if 5432 is
|
||||
already in use), then `docker compose up` → frontend :3000, backend :4000, Postgres. See
|
||||
`backend/README.md`. For local dev without Docker, run `npm run dev` in `backend/` and `frontend/`
|
||||
separately (the frontend reads `NEXT_PUBLIC_API_URL`, default `http://localhost:4000`).
|
||||
|
||||
## Version control (per-folder git)
|
||||
|
||||
Each top-level folder is its **own git repository** (`frontend/`, `landing-page/`, `backend/`,
|
||||
`database/`, `docs/`); there is intentionally **no git repo at this root**.
|
||||
|
||||
**Commit after every change.** Whenever you modify files in a folder that contains a `.git`, finish
|
||||
the task by committing those changes *in that folder*
|
||||
(`git -C <folder> add -A && git -C <folder> commit`), so each folder's history tracks its own
|
||||
changes. Keep each commit scoped to one folder — a change spanning two folders is two commits. End
|
||||
commit messages with the `Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>` trailer.
|
||||
|
||||
## Customized Next.js (applies to both apps)
|
||||
|
||||
Both apps run a **customized Next.js 16** whose APIs/conventions differ from public docs. Before
|
||||
writing Next.js code, read the relevant guide under `<app>/node_modules/next/dist/docs/01-app/`.
|
||||
|
||||
## Root tooling
|
||||
|
||||
- `.mcp.json` registers the **shadcn MCP server**, and the root `package.json` pins the `shadcn`
|
||||
CLI — used to browse/add registry components into the apps. There is nothing to build or run at
|
||||
this root level.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 699 KiB |
Generated
+4692
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"shadcn": "^4.8.3"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"version": 1,
|
||||
"skills": {
|
||||
"ai-elements": {
|
||||
"source": "vercel/ai-elements",
|
||||
"sourceType": "github",
|
||||
"skillPath": "skills/ai-elements/SKILL.md",
|
||||
"computedHash": "7e81acdd3028bb68aa4387b2bd083c5812a50e2be1bea08c76994dcfb8f6a3d3"
|
||||
},
|
||||
"better-auth-best-practices": {
|
||||
"source": "better-auth/skills",
|
||||
"sourceType": "github",
|
||||
"skillPath": "better-auth/best-practices/SKILL.md",
|
||||
"computedHash": "a4c830509e85557b59339d8d93a4e243e9e59c686e7678854d39230e12c2a6dc"
|
||||
},
|
||||
"better-auth-security-best-practices": {
|
||||
"source": "better-auth/skills",
|
||||
"sourceType": "github",
|
||||
"skillPath": "security/SKILL.md",
|
||||
"computedHash": "5717187bba9c22030c7174c74012f01c359f21e2ce87e0eb80e24244d8b8c915"
|
||||
},
|
||||
"coss": {
|
||||
"source": "cosscom/coss",
|
||||
"sourceType": "github",
|
||||
"skillPath": "apps/ui/skills/coss/SKILL.md",
|
||||
"computedHash": "d38dc6e0df3191b9a5b9f2c4b6984793d689922b49f8af78d4e1876645bac836"
|
||||
},
|
||||
"coss-particles": {
|
||||
"source": "cosscom/coss",
|
||||
"sourceType": "github",
|
||||
"skillPath": "apps/ui/skills/coss-particles/SKILL.md",
|
||||
"computedHash": "44c9d1c501a8f76c5332740795a2fa0f07dc814cd1a2c4a6103a971eb982db79"
|
||||
},
|
||||
"create-auth-skill": {
|
||||
"source": "better-auth/skills",
|
||||
"sourceType": "github",
|
||||
"skillPath": "better-auth/create-auth/SKILL.md",
|
||||
"computedHash": "31c027d02dbf1faa37f58191f574b9443143042fb2b684fe32df53ab0270487c"
|
||||
},
|
||||
"email-and-password-best-practices": {
|
||||
"source": "better-auth/skills",
|
||||
"sourceType": "github",
|
||||
"skillPath": "better-auth/emailAndPassword/SKILL.md",
|
||||
"computedHash": "747d7f73bd9e2ec5317b8ef88dc70f97df716d00e3d02de4051feebaa48b062d"
|
||||
},
|
||||
"organization-best-practices": {
|
||||
"source": "better-auth/skills",
|
||||
"sourceType": "github",
|
||||
"skillPath": "better-auth/organization/SKILL.md",
|
||||
"computedHash": "79a5a85b43d10e9fe37582b3506b051a33a991817b938f349099baa5ddba21aa"
|
||||
},
|
||||
"shadcn": {
|
||||
"source": "shadcn/ui",
|
||||
"sourceType": "github",
|
||||
"skillPath": "skills/shadcn/SKILL.md",
|
||||
"computedHash": "80a6226e78f6d1fe464214ae0ef449d49d8ffaa3e7704f011e9b418c678ad4d1"
|
||||
},
|
||||
"two-factor-authentication-best-practices": {
|
||||
"source": "better-auth/skills",
|
||||
"sourceType": "github",
|
||||
"skillPath": "better-auth/twoFactor/SKILL.md",
|
||||
"computedHash": "7e297aaf887e11fdc03e52bdbf44974e161e8f7c393170ced7dc66cace4f6d46"
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 58 KiB |
Reference in New Issue
Block a user