f41656ce5f
Review and planning iterations commit frequently; asking for permission on each commit added friction without safety benefit. Destructive git operations still require explicit approval.
69 lines
2.7 KiB
Markdown
69 lines
2.7 KiB
Markdown
# Aeroflot.Flights.Web
|
|
|
|
## Current State
|
|
|
|
ASP.NET host (`Aeroflot.Flights.Web.csproj`, `Startup.cs`, `Program.cs`) serving an Angular 12 SPA located in `ClientApp/` (Angular CLI + custom webpack config, Karma, Cypress, Storybook/Compodoc).
|
|
|
|
## Target: React Remote Component Rewrite
|
|
|
|
The Angular app is being rewritten as a **remote frontend component** embeddable in the customer's channel apps (Web, PWA). Requirements below are contractual — treat them as hard constraints when designing or implementing the new codebase.
|
|
|
|
### 1. Tech Stack
|
|
|
|
- **ModernJS (SSR)** for the frontend framework.
|
|
- **Module Federation 2.0**. Any bundler with MF 2.0 support is acceptable: Webpack 5, Rsbuild, Rspack, or Vite.
|
|
- Must emit `mf-manifest.json` at `https://<domain>/mf-manifest.json` exposing components and logic. Reference: https://module-federation.io/guide/basic/webpack.html.
|
|
- **React 18+**, Concurrent Mode compatible.
|
|
- `<Suspense>` support required when async loading is used.
|
|
- Component bodies must be side-effect free — **no `fetch` outside `useEffect`**.
|
|
- Dynamic imports must use `React.lazy()`.
|
|
|
|
### 2. Data & Integrations
|
|
|
|
- Consumes customer REST APIs, JSON payloads only.
|
|
- Rendered data must stay consistent with API responses (no stale state leaking into the UI).
|
|
|
|
### 3. Performance
|
|
|
|
- Must sustain **100 RPS**.
|
|
|
|
### 4. Availability & Fault Tolerance
|
|
|
|
- VMs hosting the component must be geographically distributed.
|
|
- 24/7/365 availability; recovery time ≤ 6 hours after infra is restored.
|
|
|
|
### 5. Security
|
|
|
|
- Component must be isolated — no attack surface exposed to other components of the host site.
|
|
|
|
### 6. SEO & Accessibility
|
|
|
|
- SEO optimization required.
|
|
- Render microdata: **JSON-LD** and **OpenGraph**.
|
|
- Web analytics integrations: **Yandex.Metrica, CTM, Variocube, Key-Astrom (Dynatrace)**.
|
|
|
|
### 7. Cross-Platform
|
|
|
|
- Embeddable in multiple channel apps (Web, PWA).
|
|
- Fully responsive ("fluid") layout across all screen sizes.
|
|
|
|
### 8. Logging & Monitoring
|
|
|
|
- Frontend log collection in a customer-specified format, shipped to the customer's log aggregation system.
|
|
- System event monitoring with export to a metrics aggregator.
|
|
|
|
### 9. Module Structure
|
|
|
|
- Must conform to the customer's standard remote frontend module structure for uniform deployment.
|
|
|
|
### 10. Design
|
|
|
|
- Implement against customer-provided mockups using the customer's design system.
|
|
- Must embed other customer remote components when available.
|
|
|
|
## Commit Rules
|
|
|
|
- Never add `Co-Authored-By` lines to commit messages.
|
|
- Commit messages in English, concise, focused on "why" not "what".
|
|
- Commit autonomously when changes are complete and stable — no need to ask for permission. Group related edits into logical commits. Still ask before pushing, force-pushing, or any destructive git operation.
|