|
1 | | -# Getting Started with Create React App |
| 1 | +# 🏛️ CALM Hub UI |
2 | 2 |
|
3 | | -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). |
4 | 3 |
|
5 | | -## Available Scripts |
| 4 | +https://github.com/user-attachments/assets/931cca52-6dff-4895-8de4-88a291acd41a |
6 | 5 |
|
7 | | -In the project directory, you can run: |
8 | 6 |
|
9 | | -### `npm start` |
| 7 | +Explore, visualize, and manage CALM architecture models through an interactive web interface. Features graph-based visualization, pattern decision exploration. |
10 | 8 |
|
11 | | -Runs the app in the development mode.\ |
12 | | -Open [http://localhost:3000](http://localhost:3000) to view it in your browser. |
| 9 | +## ✨ Features |
13 | 10 |
|
14 | | -The page will reload when you make changes.\ |
15 | | -You may also see any lint errors in the console. |
| 11 | +### 🎯 Interactive Architecture Visualization |
| 12 | +- **Graph-Based Rendering**: ReactFlow-powered diagrams with automatic layout via Dagre |
| 13 | +- **Smart Node Rendering**: Type-specific icons for Actors, Systems, Services, Databases, Networks, and more |
| 14 | +- **Group Nodes**: Automatic container grouping for `deployed-in` and `composed-of` relationships |
| 15 | +- **Floating Edges**: Bezier-curved edges with labels and badges that avoid node overlap |
| 16 | +- **Pan, Zoom & Minimap**: Full interactive controls with fit-to-view |
16 | 17 |
|
17 | | -### `npm test` |
| 18 | +### 🧩 Pattern Visualization with Decision Support |
| 19 | +- **JSON Schema Patterns**: Render architecture patterns with automatic layout |
| 20 | +- **Decision Points**: Extract and display `oneOf`/`anyOf` constraints as interactive decision selectors |
| 21 | +- **Dynamic Filtering**: Select decision paths to see how the architecture changes |
| 22 | +- **Decision Group Nodes**: Visual grouping highlights pattern variants |
18 | 23 |
|
19 | | -Launches the test runner in the interactive watch mode.\ |
20 | | -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. |
| 24 | +### 🌳 Hub Navigation |
| 25 | +- **Tree-Based Browsing**: Collapsible sidebar to explore Namespaces, Architectures, Patterns, Flows, and ADRs |
| 26 | +- **Diagram & JSON Views**: Toggle between interactive visualization and raw JSON with syntax highlighting |
| 27 | +- **Version Selection**: Browse and switch between architecture revisions |
| 28 | +- **Quick Visualize**: Jump from any document into the full Visualizer workspace |
21 | 29 |
|
22 | | -### `npm run start-cypress` |
| 30 | +### 🔍 Search & Filtering |
| 31 | +- **Node Search**: Find nodes by name, unique-id, or node-type |
| 32 | +- **Type-Based Filtering**: Filter by node type via dropdown |
| 33 | +- **Opacity Dimming**: Matching nodes at full opacity, non-matching dimmed to 15% |
| 34 | +- **Edge Filtering**: Edges follow connected node visibility |
23 | 35 |
|
24 | | -End to End tests are written with cypress. Cypress can be run in headless and headed modes. |
25 | | -The above command runs in headed mode and allows the developer to locally run through the spec |
26 | | -files and observe the test runs. [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/) queries and paradigm for testing feature |
27 | | -heavily in these tests as these help maintainability by organising tests around how the UI is used |
28 | | -and not how its implemented. [Cypress and its best practices](https://docs.cypress.io/app/core-concepts/best-practices) are also used in writing and updating |
29 | | -these tests. |
| 36 | +### 📋 Metadata Panel |
| 37 | +- **Flows Panel**: View business and data flows with step-by-step transitions |
| 38 | +- **Controls Panel**: Hierarchical security and compliance controls |
| 39 | +- **Flow Highlighting**: Click a transition to highlight the corresponding relationship in the graph |
| 40 | +- **Control Deep-Linking**: Jump from a control to the affected node |
30 | 41 |
|
31 | | -You need to set an environment variable VITE_BASE_URL which should be the address where the vite server is being run |
32 | | -A default in .env.example has been added. This can also be set in CI to whatever the intended vite port should be |
| 42 | +### 🛡️ Risk & Control Integration |
| 43 | +- **Risk-Aware Borders**: Node border color indicates risk level (red, yellow, green) |
| 44 | +- **Hover Details**: Tooltips show associated risks and mitigations |
| 45 | +- **Control Badges**: Quick visibility into control coverage per node |
33 | 46 |
|
34 | | -#### Test Stubbing |
35 | | -The tests are all stubbed to return desired responses. These will need to be maintained in tandem with |
36 | | -calm-hub API. This section can be updated when a different and more reliable integration strategy is devised |
| 47 | +### 📝 ADR Rendering |
| 48 | +- **Rich Display**: Context, decision drivers, considered options, outcome, and links |
| 49 | +- **Markdown Support**: Full markdown rendering within ADR sections |
| 50 | +- **Revision Browsing**: Switch between ADR versions |
| 51 | +- **Status Badges**: Visual indicators for approved, deprecated, and other statuses |
37 | 52 |
|
| 53 | +### 🔎 Inspector Sidebar |
| 54 | +- **Selection Details**: Click any node or edge to inspect its raw JSON |
| 55 | +- **Drag & Drop Upload**: Load CALM JSON files directly into the visualizer |
38 | 56 |
|
39 | | -### `npm run build` |
| 57 | +## 🚀 Getting Started |
40 | 58 |
|
41 | | -Builds the app for production to the `build` folder.\ |
42 | | -It correctly bundles React in production mode and optimizes the build for the best performance. |
| 59 | +### Prerequisites |
| 60 | +- Node.js (see `.nvmrc` for the recommended version) |
| 61 | +- A running instance of CALM Hub (the backend API) |
43 | 62 |
|
44 | | -The build is minified and the filenames include the hashes.\ |
45 | | -Your app is ready to be deployed! |
| 63 | +### Development |
46 | 64 |
|
47 | | -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. |
| 65 | +```bash |
| 66 | +npm install |
| 67 | +npm start |
| 68 | +``` |
48 | 69 |
|
49 | | -### `npm run eject` |
| 70 | +Open [http://localhost:3000](http://localhost:3000) to view the app in your browser. The page will reload when you make changes. |
50 | 71 |
|
51 | | -**Note: this is a one-way operation. Once you `eject`, you can't go back!** |
| 72 | +### 🧪 Running Tests |
52 | 73 |
|
53 | | -If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. |
| 74 | +```bash |
| 75 | +# Unit tests |
| 76 | +npm test |
54 | 77 |
|
55 | | -Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. |
| 78 | +# End-to-end tests (headed mode) |
| 79 | +npm run start-cypress |
| 80 | +``` |
56 | 81 |
|
57 | | -You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. |
| 82 | +E2E tests use [Cypress](https://docs.cypress.io/) with [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/) queries. All tests are stubbed against the CALM Hub API. |
58 | 83 |
|
59 | | -## Learn More |
| 84 | +You need to set the environment variable `VITE_BASE_URL` to the address where the Vite dev server is running (see `.env.example` for defaults). |
60 | 85 |
|
61 | | -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). |
| 86 | +### 📦 Production Build |
62 | 87 |
|
63 | | -To learn React, check out the [React documentation](https://reactjs.org/). |
| 88 | +```bash |
| 89 | +npm run build |
| 90 | +``` |
64 | 91 |
|
65 | | -### Code Splitting |
| 92 | +Outputs an optimized production bundle to the `build` folder. |
66 | 93 |
|
67 | | -This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) |
| 94 | +## 🛠️ Tech Stack |
68 | 95 |
|
69 | | -### Analyzing the Bundle Size |
| 96 | +| Category | Libraries | |
| 97 | +|---|---| |
| 98 | +| UI Framework | React 19, React Router, TypeScript | |
| 99 | +| Visualization | ReactFlow, Dagre, D3 | |
| 100 | +| Styling | TailwindCSS, DaisyUI | |
| 101 | +| Code Display | Monaco Editor, react-json-view-lite | |
| 102 | +| Auth | OpenID Connect (oidc-client) | |
| 103 | +| Testing | Vitest, Cypress | |
| 104 | +| Build | Vite | |
70 | 105 |
|
71 | | -This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) |
| 106 | +## 🤝 Getting Involved |
72 | 107 |
|
73 | | -### Making a Progressive Web App |
| 108 | +Architecture as Code was developed as part of the [DevOps Automation Special Interest Group](https://devops.finos.org/) before graduating as a top level project in its own right. Our community Zoom meetups take place on the fourth Tuesday of every month, see [here](https://github.com/finos/architecture-as-code/issues?q=label%3Ameeting) for upcoming and previous meetings. For active contributors we have Office Hours every Thursday, see the [FINOS Event Calendar](http://calendar.finos.org) for meeting details. |
74 | 109 |
|
75 | | -This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) |
| 110 | +Have an idea or feedback? [Raise an issue](https://github.com/finos/architecture-as-code/issues/new/choose) in this repository. |
76 | 111 |
|
77 | | -### Advanced Configuration |
| 112 | +--- |
78 | 113 |
|
79 | | -This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) |
80 | | - |
81 | | -### Deployment |
82 | | - |
83 | | -This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) |
84 | | - |
85 | | -### `npm run build` fails to minify |
86 | | - |
87 | | -This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) |
| 114 | +**Contributing**: Issues and PRs welcome! 🎉 |
0 commit comments