Hey is a decentralized and permissionless social media app built with Lens Protocol 🌿
Repository Guidelines#
Project Structure & Modules#
apps/web: Vite + React 19 frontend (sources undersrc/, static assets inpublic/).apps/api: Hono-based API server (entrysrc/index.ts, routes insrc/routes/).packages/*: Shared code (helpers,data,types,indexer,config).script/*: Maintenance utilities (e.g., sortingpackage.json, cleaning branches).- Tooling: PNPM workspaces (
pnpm-workspace.yaml), Biome config (biome.json), Husky hooks (.husky/).
Build, Test, and Development#
- Root dev:
pnpm dev— run all workspaces in watch mode. - Root build:
pnpm build— build all workspaces in parallel. - Web app:
pnpm -F @hey/web dev(preview:pnpm -F @hey/web start, build:pnpm -F @hey/web build). - API:
pnpm -F @hey/api dev(typecheck:pnpm -F @hey/api typecheck). - Lint/format:
pnpm biome:check(auto-fix:pnpm biome:fix). - Types:
pnpm typecheck— TypeScript across the monorepo. - Node & PM: Node 20 (
.nvmrc), PNPM 10 (seepackage.json#packageManager).
Coding Style & Naming#
- Language: TypeScript (strict, shared configs in
packages/config). - Formatting: Biome controls style; no trailing commas; spaces for indentation.
- Imports: Use workspace packages (
@hey/*) and web alias@/*toapps/web/src. - Files: React components
PascalCase.tsx; helpers/storescamelCase.ts. - Keep modules small, colocate domain helpers with their feature when practical.
Testing Guidelines#
- Current status: no formal unit tests present. Enforce quality via
biomeandtsc. - If adding tests, prefer Vitest for web and lightweight integration tests for API.
- Naming:
*.test.tsor*.test.tsx, colocated with the code or under__tests__/. - Run with a future
pnpm testscript at root or per package.
Commit & Pull Requests#
- Commits: imperative mood, concise subject; optional scope like
web:,api:,helpers:. - Include rationale and references (e.g.,
Closes #123). - PRs: clear description, screenshots for UI changes, reproduction steps for fixes, and env notes.
- CI hooks: pre-commit runs
biomeand type checks; ensure both pass locally before pushing.
Security & Configuration#
- Copy
.env.exampleto.envinapps/webandapps/api. Never commit secrets. - Validate envs at startup; keep keys minimal and documented near usage.