| Dimension | Shared | Only in A | Only in B | Overlap |
|---|---|---|---|---|
| Sections | 1 | 5 | 9 | 7% |
| Commands | 0 | 0 | 4 | 0% |
| Section tags | 2 | 0 | 5 | 29% |
What each file covers
Sections
1 shared · 5 only in A · 9 only in B- − App
- − Code Style Guidelines
- − Ruby
- − Templates
- − Translations
- + Frontend
- + Configuration Files
- + Version Requirements
- + Setup
- + Code Style
- + JavaScript/TypeScript
- + Linting
- + Testing
- + Frontend (Jasmine/Karma)
- Directory Structure
Commands
0 shared · 0 only in A · 4 only in B- + npm ci && cd ..
- + npx eslint src/ && cd ..
- + npm test && cd ..
- + eslint.config.mjs
Section tags
2 shared · 0 only in A · 5 only in B- + setup
- + test
- + lint-format
- + types
- + deployment
- code-style
- architecture
Line diff
opf/openproject · app/AGENTS.md
@@ −1 @@
1# App
2
3## Directory Structure
4
5- `app/components/` - ViewComponent-based UI components (Ruby + ERB)
6- `app/contracts/` - Validation and authorization contracts
7- `app/controllers/` - Rails controllers
8- `app/models/` - ActiveRecord models
9- `app/services/` - Service objects (business logic)
10- `app/workers/` - Background job workers
11
12## Code Style Guidelines
13
14### Ruby
15- Follow [Ruby community style guide](https://github.com/bbatsov/ruby-style-guide)
16- Use service objects for complex business logic (return `ServiceResult`)
17- Use contracts for validation and authorization
18- Keep controllers thin, models focused
19- Document with [YARD](https://yardoc.org/)
20- Write RSpec tests for all new features
21- **Work package identifiers**: `WorkPackage.find("PROJ-42")` resolves semantic identifiers transparently. Use `find_by_display_id` only when input could legitimately be numeric OR semantic (controllers, URL-driven components, macro resolvers). Low-level code (queries, filters, services) should stick to `find_by(id:)` with primary keys. See `app/models/work_package/semantic_identifier/finder_methods.rb`.
22
23### Templates
24- Use ERB for server-rendered views
25- Use ViewComponents for reusable UI (with Lookbook previews)
26- Lint with erb_lint before committing
27
28## Translations
29
30- UI strings must use translation keys (never hard-coded)
31
opf/openproject · frontend/AGENTS.md
@@ +1 @@
1# Frontend
2
3## Directory Structure
4
5- `./src/` - Frontend code
6 - `./src/app/` - Legacy Angular modules/components
7 - `./src/common/` - Framework-agnostic modules (the `core-common` alias), importable from both Angular and Stimulus. Code belongs here when it depends on neither framework and both sides need it; a helper only Stimulus controllers use belongs in `./src/stimulus/helpers/` instead.
8 - `./src/stimulus/` - Stimulus controllers
9 - `./src/turbo/` - Turbo integration
10
11## Configuration Files
12
13- `eslint.config.mjs` - JavaScript/TypeScript linting
14- `../package.json` / `./frontend/package.json` - Node.js dependencies
15
16## Version Requirements
17
18- Node: `^24.15.0` (see `package.json` engines)
19
20## Setup
21
22```bash
23npm ci && cd .. # Install Node packages
24```
25
26## Code Style
27
28### JavaScript/TypeScript
29- **New development**: Use Hotwire (Turbo + Stimulus) with server-rendered HTML
30- **Legacy code**: Follow ESLint rules
31- Prefer TypeScript over JavaScript
32- Use [Primer Design System](https://primer.style/product/) via ViewComponent
33
34## Linting
35
36```bash
37# JavaScript/TypeScript
38npx eslint src/ && cd ..
39```
40
41## Testing
42
43```bash
44# Frontend (Jasmine/Karma)
45npm test && cd ..
46```
47
@@ −1 +1 @@
1−# App
1+# Frontend
22
33 ## Directory Structure
44
5−- `app/components/` - ViewComponent-based UI components (Ruby + ERB)
6−- `app/contracts/` - Validation and authorization contracts
7−- `app/controllers/` - Rails controllers
8−- `app/models/` - ActiveRecord models
9−- `app/services/` - Service objects (business logic)
10−- `app/workers/` - Background job workers
5+- `./src/` - Frontend code
6+ - `./src/app/` - Legacy Angular modules/components
7+ - `./src/common/` - Framework-agnostic modules (the `core-common` alias), importable from both Angular and Stimulus. Code belongs here when it depends on neither framework and both sides need it; a helper only Stimulus controllers use belongs in `./src/stimulus/helpers/` instead.
8+ - `./src/stimulus/` - Stimulus controllers
9+ - `./src/turbo/` - Turbo integration
1110
12−## Code Style Guidelines
11+## Configuration Files
1312
14−### Ruby
15−- Follow [Ruby community style guide](https://github.com/bbatsov/ruby-style-guide)
16−- Use service objects for complex business logic (return `ServiceResult`)
17−- Use contracts for validation and authorization
18−- Keep controllers thin, models focused
19−- Document with [YARD](https://yardoc.org/)
20−- Write RSpec tests for all new features
21−- **Work package identifiers**: `WorkPackage.find("PROJ-42")` resolves semantic identifiers transparently. Use `find_by_display_id` only when input could legitimately be numeric OR semantic (controllers, URL-driven components, macro resolvers). Low-level code (queries, filters, services) should stick to `find_by(id:)` with primary keys. See `app/models/work_package/semantic_identifier/finder_methods.rb`.
13+- `eslint.config.mjs` - JavaScript/TypeScript linting
14+- `../package.json` / `./frontend/package.json` - Node.js dependencies
2215
23−### Templates
24−- Use ERB for server-rendered views
25−- Use ViewComponents for reusable UI (with Lookbook previews)
26−- Lint with erb_lint before committing
16+## Version Requirements
2717
28−## Translations
18+- Node: `^24.15.0` (see `package.json` engines)
2919
30−- UI strings must use translation keys (never hard-coded)
20+## Setup
21+
22+```bash
23+npm ci && cd .. # Install Node packages
24+```
25+
26+## Code Style
27+
28+### JavaScript/TypeScript
29+- **New development**: Use Hotwire (Turbo + Stimulus) with server-rendered HTML
30+- **Legacy code**: Follow ESLint rules
31+- Prefer TypeScript over JavaScript
32+- Use [Primer Design System](https://primer.style/product/) via ViewComponent
33+
34+## Linting
35+
36+```bash
37+# JavaScript/TypeScript
38+npx eslint src/ && cd ..
39+```
40+
41+## Testing
42+
43+```bash
44+# Frontend (Jasmine/Karma)
45+npm test && cd ..
46+```
3147
