You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This setup uses a mock authentication provider, allowing you to bypass login and develop features directly. Storage is handled by a local MinIO container that simulates an S3-compatible service.
45
+
46
+
## Extending from an external repository
47
+
48
+
External repositories can copy the `webapp` directory and layer in new UI routes, cards, and API endpoints by updating configuration files instead of rewriting core code.
49
+
50
+
- **Web UI routes:** Add or override entries in`packages/webui/src/config/routes/overrides.js`. Each route can specify an `element`, whether it should render inside the shared `Layout`, whether it requires authentication, and any wrapper providers.
51
+
- **Cards:** Register new cards via `packages/webui/src/extensions/index.js` (imported automatically on startup) and give them an ordering entry in`packages/webui/src/extensions/cards/config/defaultCardsConfig.js`.
52
+
- **API endpoints:** Provide additional FastAPI registrars and list them with the `GOFANNON_API_ROUTE_REGISTRARS` environment variable or by editing `packages/api/user-service/config/routes_config.py`.
53
+
54
+
### Example: adding an "Echo" experience
55
+
56
+
Below is a full example of what an external repository would add after copying `webapp/` to introduce a new Echo card, page, and API endpoint. File paths are relative to the copied `webapp` directory.
57
+
58
+
1. **Add a new page at `packages/webui/src/pages/EchoPage.jsx`:**
59
+
```jsx
60
+
import React, { useState } from 'react';
61
+
import { Box, Button, Stack, TextField, Typography } from '@mui/material';
With those files in place, running the normal build commands will surface the Echo card on the home screen, route users to the new `/echo` page, and round-trip their text through the `/echo` API endpoint.
0 commit comments