|
| 1 | +# Repository Guidelines |
| 2 | + |
| 3 | +## Project Structure & Module Organization |
| 4 | +- `Propel.Api/` hosts the .NET 10 Minimal API backend (entry point in `Program.cs`, data in `Data/`, entities in `Models/`). |
| 5 | +- `propel-ui/` hosts the Angular 21 SSR frontend (app code in `src/app/`, global styles in `src/styles.scss`). |
| 6 | +- Solution file: `propel-rental-core.sln` at the repo root. |
| 7 | + |
| 8 | +## Build, Test, and Development Commands |
| 9 | +Backend (from `Propel.Api/`): |
| 10 | +- `dotnet run` — run the API. |
| 11 | +- `dotnet watch` — run with hot reload. |
| 12 | +- `dotnet build` — compile the API. |
| 13 | +- `dotnet test` — run backend tests (if/when added). |
| 14 | + |
| 15 | +Frontend (from `propel-ui/`): |
| 16 | +- `npm start` — Angular dev server at `http://localhost:4200`. |
| 17 | +- `npm run build` — production build with SSR output in `dist/`. |
| 18 | +- `npm run serve:ssr:propel-ui` — serve the SSR build. |
| 19 | +- `npm test` — run Vitest via Angular CLI. |
| 20 | + |
| 21 | +## Coding Style & Naming Conventions |
| 22 | +- C#: prefer Minimal APIs (no controllers), records for DTOs, and primary constructors. Use `app.MapGet/MapPost/...` patterns. |
| 23 | +- Angular: standalone components only, `inject()` for DI, and `httpResource` + signals for data/state. |
| 24 | +- Indentation: 4 spaces for C#, 2 spaces for TypeScript/HTML/SCSS. |
| 25 | +- Formatting: Prettier config lives in `propel-ui/package.json` (single quotes, 100-char width). |
| 26 | + |
| 27 | +## Testing Guidelines |
| 28 | +- Frontend: `ng test` runs Vitest; keep specs alongside features (e.g., `src/app/app.spec.ts`). |
| 29 | +- Backend: no test project yet; when adding tests, wire them to `dotnet test` and keep them under a `Propel.Api.Tests/` or similar directory. |
| 30 | + |
| 31 | +## Commit & Pull Request Guidelines |
| 32 | +- Current history uses Conventional Commit-style prefixes like `feat:` and `initial:`; follow the same pattern (e.g., `feat:`, `fix:`, `chore:`). |
| 33 | +- PRs should include a concise description, key decisions, and any UI screenshots when visual changes are involved. |
| 34 | + |
| 35 | +## Security & Configuration Tips |
| 36 | +- App settings live in `Propel.Api/appsettings*.json`; avoid committing secrets. |
| 37 | +- Update API base URLs in the frontend service layer (`src/app/services/`) when environments differ. |
| 38 | + |
| 39 | +## Agent-Specific Instructions |
| 40 | +- See `CLAUDE.md` for architecture notes and do/don’t guidelines (Minimal APIs, zoneless Angular, no NgModules). |
0 commit comments