src/app/: Next.js App Router entry points (layout.tsx,page.tsx,globals.css).src/components/: UI and editor surface, includingeditor/(Lexical-based editor),sidebar/, and sharedui/atoms.src/lib/: Nostr helpers, stores, and shared utilities (lib/nostr,lib/stores,lib/utils).src/hooks/: Reusable React hooks.public/: Static assets and metadata (manifest.json, icons).
npm run dev: Start the Next.js dev server athttp://localhost:3000.npm run build: Production build.npm run start: Run the built app.npm run lint: Run ESLint (Next.js core-web-vitals + TypeScript rules).
- Language: TypeScript with React 19 and Next.js 16.
- Components use PascalCase filenames (e.g.,
NostrEditor.tsx); hooks useuseXnaming (e.g.,useProfiles.ts). - Follow existing formatting in the touched file; no Prettier config is present.
- Linting is enforced via
eslint.config.mjs; fix lint issues before committing. - Tailwind CSS 4 is used for styling; prefer utilities over ad-hoc CSS unless a global style is needed in
src/app/globals.css.
- No automated test runner is configured in this repo.
- For changes to the editor or Nostr logic, add focused tests if you introduce a test setup; otherwise document manual verification steps in the PR (e.g., “create draft, insert image, publish”).
- Recent commits are short, imperative summaries without prefixes (e.g., “fix up images”). Match that style.
- PRs should include: a concise description, the commands run (
npm run lint,npm run buildif relevant), and screenshots or screen recordings for UI changes. - Link related issues if applicable.
- The editor is Lexical-based; core logic lives under
src/components/editor/and Nostr helpers undersrc/lib/nostr/. - When extending nodes or plugins, keep changes localized and document any serialization changes in the PR description.