Skip to content

Commit a05024b

Browse files
committed
feat: update CLAUDE.md with additional development commands and guidelines
1 parent 93a84d5 commit a05024b

1 file changed

Lines changed: 27 additions & 28 deletions

File tree

CLAUDE.md

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ Most code contribution work targets either `exercises/*/README.md` (docs) or `so
1717
npm ci # Install dependencies
1818
npm start # Start CAP server (cds-serve)
1919
npm run watch-interaction_items # Start/watch with Fiori UI open
20+
npm run watch-hybrid # Watch with hybrid profile (remote HANA + local service)
21+
npm run deploy-hana # Deploy DB artifacts to HANA Cloud HDI container
22+
npm run create-xsuaa # Create XSUAA service instance and bind locally
23+
npm run start-router # Start AppRouter locally with bound services
2024
npx eslint . # Lint (uses @sap/cds ESLint config)
2125
npx cds build --production # Production build / MTA pre-build step
2226
```
@@ -40,27 +44,44 @@ Auth flow: XSUAA → AppRouter → CAP service (`cds.requires.auth = xsuaa`).
4044
## Conventions and guardrails
4145

4246
### Layer boundaries
47+
4348
Keep concerns in their correct layer — do not leak DB semantics into service handlers or UI annotations into `srv/`:
4449
- `db/*` — data model and HANA-native artifacts
4550
- `srv/*` — service projections, authorization, handlers
4651
- `app/*` — UI annotations and Fiori metadata
4752

4853
### Auth and deployment config — cross-file consistency
54+
4955
When changing auth, routing, or deployment, verify all four files stay aligned:
5056
- `solution/MyHANAApp/xs-security.json`
5157
- `solution/MyHANAApp/package.json` (`cds.requires.auth`)
5258
- `solution/MyHANAApp/app/router/xs-app.json` (destination `srv-api`)
5359
- `solution/MyHANAApp/mta.yaml` (provides destination `srv-api`)
5460

5561
### ESLint
62+
5663
The ESLint baseline is `solution/MyHANAApp/eslint.config.mjs` using `@sap/cds` recommended config. Do not introduce an alternative config.
5764

5865
### Node.js version
66+
5967
Use even-numbered LTS versions (18, 20, 22, 24). Odd versions lack native module support for some CAP dependencies.
6068

6169
### HANA graphical calculation view editing
70+
6271
The graphical calculation view editor is BAS-only. Do not suggest unsupported local alternatives.
6372

73+
### Development environments
74+
75+
Participants use SAP Business Application Studio, GitHub Codespaces, or the `.devcontainer/` (Node 24-bookworm). See `prerequisites.md` for the full setup matrix — do not duplicate it here.
76+
77+
### CI/CD
78+
79+
`deploy-docs.yml` (GitHub Actions) builds and deploys the VitePress site. The `Jenkinsfile` in the solution app is a SAP CI/CD Service bootstrap — it is not actively used for this repo.
80+
81+
### Sibling AI instruction files
82+
83+
This repo also ships `.clinerules`, `.cursorrules`, `.windsurfrules`, `AGENT_INSTRUCTIONS.md`, and `.github/copilot-instructions.md` — all covering the same conventions for other AI tools. Do not contradict them. If updating conventions, this CLAUDE.md is the source of truth; the others are generated downstream.
84+
6485
## Documentation style (exercise READMEs)
6586

6687
- Conversational, concise, action-oriented workshop tone
@@ -78,35 +99,16 @@ The VitePress site lives in `docs/`. Each exercise has a thin wrapper page at `d
7899
```bash
79100
npm run docs:dev # Start dev server
80101
npm run docs:build # Production build → docs/.vitepress/dist/
81-
npm test # Run Vitest unit tests (20 tests)
102+
npm test # Run Vitest unit tests (23 tests)
82103
```
83104

84105
### External tutorial inline expansion
85106

86-
Exercise READMEs link to SAP tutorials on `developers.sap.com`. The VitePress build automatically expands these links inline — fetching the tutorial markdown from GitHub at build time and replacing the link paragraph with the full tutorial steps plus an attribution banner.
87-
88-
**How it works:**
89-
90-
- Any block in a README that contains `👉` **and** a `developers.sap.com/tutorials/{ID}.html` link where `{ID}` is a key in the config map gets expanded inline.
91-
- Source READMEs are never modified — expansion happens during VitePress rendering only.
92-
- Two `👉` paragraph variants are both handled:
93-
- `👉 Perform all the steps in the tutorial: [Title](URL)` (ex1–ex4, ex8)
94-
- `Perform all the steps in 👉 [tutorial: Title](URL)` (ex5–ex7)
107+
Exercise READMEs link to SAP tutorials on `developers.sap.com`. The VitePress build expands these links inline at build time — fetching tutorial markdown from GitHub, transforming it, and replacing the link paragraph with full tutorial steps plus an attribution banner. Source READMEs are never modified.
95108

96-
**To add a new tutorial expansion:**
109+
**Detection:** any paragraph containing `👉` and a `developers.sap.com/tutorials/{ID}.html` link where `{ID}` is a key in the config map. Two paragraph variants exist across exercises — both are handled.
97110

98-
1. Confirm the tutorial markdown exists in the upstream repo. The URL pattern is:
99-
`https://raw.githubusercontent.com/sap-tutorials/Tutorials/master/tutorials/{ID}/{ID}.md`
100-
Verify with: `curl -s -o /dev/null -w "%{http_code}" <url>`
101-
102-
2. Add one entry to [`docs/.vitepress/external-tutorials.config.ts`](docs/.vitepress/external-tutorials.config.ts):
103-
104-
```ts
105-
'tutorial-id-here':
106-
'https://raw.githubusercontent.com/sap-tutorials/Tutorials/master/tutorials/tutorial-id-here/tutorial-id-here.md',
107-
```
108-
109-
3. Run `npm run docs:build` from `docs/` and verify the page shows exactly 1 attribution banner per tutorial link.
111+
**To add a new tutorial:** add one entry to `docs/.vitepress/external-tutorials.config.ts`, verify the raw GitHub URL returns 200, then run `npm run docs:build` from `docs/`. Most tutorials live in `sap-tutorials/Tutorials` on `master`, but some are in other repos (e.g. `appstudio-onboarding``sap-tutorials/btp-adai` on `main`). If a URL returns 404, check the tutorial's GitHub link on `developers.sap.com`.
110112

111113
**Key files:**
112114

@@ -115,8 +117,5 @@ Exercise READMEs link to SAP tutorials on `developers.sap.com`. The VitePress bu
115117
| `docs/.vitepress/external-tutorials.config.ts` | Config map: tutorial ID → raw GitHub URL |
116118
| `docs/.vitepress/plugins/external-tutorials.ts` | Vite plugin: fetches tutorials at build start |
117119
| `docs/.vitepress/plugins/md-expand-tutorials.ts` | markdown-it plugin: substitutes link blocks with expanded content |
118-
| `docs/.vitepress/plugins/transform-tutorial.ts` | Pure transform pipeline: strips frontmatter/intro, rewrites image paths and cross-links, shifts headings |
119-
| `docs/.vitepress/plugins/transform-tutorial.test.ts` | 13 unit tests for the transform pipeline |
120-
| `docs/.vitepress/plugins/md-expand-tutorials.test.ts` | 7 unit tests for the expansion/detection logic |
121-
122-
**Note:** Most tutorials live in `sap-tutorials/Tutorials` on `master`, but some have moved to other repos (e.g. `appstudio-onboarding` is in `sap-tutorials/btp-adai` on `main`). If a raw URL returns 404, check the tutorial's GitHub link on the `developers.sap.com` page to find the correct repo and branch.
120+
| `docs/.vitepress/plugins/transform-tutorial.ts` | Pure transform: strips frontmatter, rewrites images/links, shifts headings |
121+
| `docs/.vitepress/plugins/*.test.ts` | 23 unit tests (13 transform + 10 expansion/detection) |

0 commit comments

Comments
 (0)