GhaylStackDocumentationv1.0.2
العربيةWebsite
Web and mobile

Web and mobile

Admin and Dashboard

Run the two React clients, choose the right interface and trace a screen to its route and API.

Choose the interface for the task

GhaylStack has two independently built React applications. Admin manages the platform: tenants, platform users, plans and operational administration. Dashboard is the workspace used by a signed-in tenant's team: tickets, approvals, organizational units, catalog, reports, files and conversations. They share the API contracts but keep their own routes, bundles and browser storage.

Application Source Default development port Main purpose
Admin clients/admin 5173 Platform administration
Dashboard clients/dashboard 5174 Work within a tenant

A link visible in a sidebar is not permission to execute an operation. The API still checks the authenticated identity, the requested action and any applicable organizational scope. Read authorization before adding a privileged action.

Start both clients

The quick start runs the clients through AppHost. Install each client's locked dependencies first:

sh
npm ci --prefix clients/admin
npm ci --prefix clients/dashboard
dotnet run --project src/Host/GhaylStack.AppHost --launch-profile https

For focused frontend development, run npm run dev inside the relevant client while its API and dependencies are already running. VITE_API_BASE_URL selects the API origin for the development configuration; the checked-in default is https://localhost:7030. Use the endpoint actually reported by your environment. Changing the default port is not a remedy for an API that has not finished database initialization.

Understand runtime configuration

Each client loads public/config.json. Its apiBase is empty by default for same-origin deployment. Dashboard also defines demoMode, defaultTenant, idle-session thresholds and defaultLanguage. Admin has a dashboardUrl used to open the other interface. Set that URL to the deployed Dashboard origin when publishing.

Vite's development plugin returns a configuration with a direct API base to avoid long-lived realtime connections occupying the development server's connection slots. Treat runtime configuration as public: it is downloaded by the browser. Application secrets belong in the server configuration.

Find the implementation behind a screen

Start with src/routes.tsx, then follow the named lazy import into src/pages. Each route declares the translation namespaces it needs. API calls live in src/api; shared request behavior is in src/lib/api-client.ts. The Dashboard sidebar is in src/components/layout/sidebar.tsx; Admin also uses sidebar-content.tsx.

Use these boundaries when investigating a problem: a missing route is a routing issue, an untranslated key is a catalog/loading issue, and a 403 needs permission and tenant checks. The browser's local permission cache does not replace the server's decision.

Verify a change

Build the client you changed, visit the route directly and refresh it. Test Arabic and English, light and dark appearance, and a narrow viewport. Check loading, empty, failure and populated states. A screenshot of a populated state alone does not verify denied access or error handling.

sh
npm run build --prefix clients/dashboard
npm run lint --prefix clients/dashboard

For page-specific browser tests, use the fixtures described in testing. For the steps to wire a new screen, continue to add a page.

Implementation references

View MarkdownBack to top

Search documentation

Use ↑ ↓ to move, Enter to open and Esc to close.