Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Add commit message guidelines and other instructions

Manav Rathi365a4a2d311c
diff --git a/web/CLAUDE.md b/web/CLAUDE.md
new file mode 100644
index 0000000000..0e9c199f9f
--- /dev/null
+++ b/web/CLAUDE.md
@@ -0,0 +1,83 @@
+# CLAUDE.md
+
+## Commit Message Guidelines
+
+When making commits, follow these rules:
+
+- Keep messages CONCISE (no walls of text)
+- Subject line under 72 chars (no body text - only Co-Authored-By line)
+- NO emojis
+- NO promotional text or links (except Co-Authored-By line)
+- Use ONLY "Co-Authored-By: Claude <[email protected]>" for attribution
+- Run pre-commit checks (format, lint, typecheck, build) before committing
+
+## Commands
+
+### Development
+
+```bash
+# Install dependencies (uses Yarn classic 1.22.22)
+yarn install
+
+# Run development servers
+yarn dev # Photos app (port 3000)
+yarn dev:auth # Auth app (port 3003)
+yarn dev:embed # Embed app (port 3006)
+yarn dev:accounts # Accounts app (port 3001)
+yarn dev:cast # Cast app (port 3004)
+yarn dev:locker # Locker app (port 3005)
+
+# Production builds
+yarn build # Photos app
+yarn build:auth # Auth app
+yarn build:embed # Embed app
+yarn build:accounts # Accounts app
+yarn build:cast # Cast app
+
+# Code quality - ALWAYS run before committing
+yarn lint # Check formatting, linting, and TypeScript types
+yarn lint-fix # Auto-fix linting and formatting issues
+```
+
+## Architecture
+
+This is a **monorepo** containing multiple Ente web applications using **Yarn workspaces**.
+
+### Technology Stack
+
+- **Next.js** for static site generation (all apps except payments)
+- **React** with TypeScript
+- **Material-UI (MUI)** with Emotion for styling
+
+### Repository Structure
+
+```
+web/
+β”œβ”€β”€ apps/ # Individual applications
+β”‚ β”œβ”€β”€ photos/ # Main photo management app + shared albums
+β”‚ β”œβ”€β”€ auth/ # 2FA authentication app
+β”‚ β”œβ”€β”€ embed/ # Embeddable photo viewer (iframe-friendly)
+β”‚ β”œβ”€β”€ accounts/ # Passkey support
+β”‚ β”œβ”€β”€ cast/ # Chromecast/browser casting
+β”‚ β”œβ”€β”€ locker/ # Document storage
+β”‚ └── payments/ # Subscription management
+β”‚
+β”œβ”€β”€ packages/ # Shared code between apps
+β”‚ β”œβ”€β”€ base/ # Core UI components, crypto, i18n
+β”‚ β”œβ”€β”€ gallery/ # Photo gallery components
+β”‚ β”œβ”€β”€ accounts/ # Account management
+β”‚ β”œβ”€β”€ media/ # Media processing (FFmpeg, image conversion)
+β”‚ β”œβ”€β”€ utils/ # General utilities
+β”‚ β”œβ”€β”€ new/ # A temporary place for code shared by photos and albums
+β”‚ └── build-config/ # Shared build configuration
+β”‚
+└── docs/ # Development documentation
+```
+
+## Important Notes
+
+- Always run `yarn lint` before committing changes
+- Use Yarn (not npm) for package management
+- Respect the monorepo structure - shared code goes in packages/
+- Follow existing Material-UI theming patterns
+- Maintain TypeScript strict mode compliance