Angular web application
The Gauzy Angular web application is the browser entry point for the Gauzy user experience. It starts Angular, restores shared client context, composes core product areas with enabled UI plugins, and serves public and signed-in routes through one application shell. See Web client experience for the wider client model, Frontend shared libraries for shared UI capabilities, and Plugin architecture for extension boundaries.
Application bootstrap
The bootstrap flow prepares browser state, application checks, language settings, and plugin configuration before Angular creates the application. This order lets the root module compose the active product surface before the first route renders.
Startup sequence
The browser enters through apps/…/main.ts. The entry point selects runtime behavior, restores shared client state, loads the UI plugin configuration, and then starts AppBootstrapModule.
The startup sequence has four stages:
- Select development or production runtime behavior.
- Restore persisted client state and enable state reset support.
- Load the UI plugin configuration.
- Start Angular with the bootstrap module and run application initializers.
Plugin configuration is therefore a prerequisite for application composition. It is not a later page concern.
This diagram shows how browser state and plugin configuration become the running Angular application.
flowchart LR
A[Browser entry] --> B[Runtime mode and client state]
B --> C[UI plugin configuration]
C --> D[Angular bootstrap module]
D --> E[Shell and routes]
References: apps/…/main.ts• L1-26
Startup readiness
The root shell stays hidden until language setup and the first route settle. It also keeps a short minimum loading period so the first view does not flash between the loading state and the application shell.
Startup loads system languages and selects the user's preferred language or a supported browser language. Optional analytics, URL tracking, support chat, and Google Maps setup do not block the main application when their own services fail.
Navigation readiness covers both successful and terminal failed navigations. A guard refusal or navigation error with no replacement clears the loading state instead of leaving the skeleton over an outlet that will never render.
References: apps/…/app.component.ts• L46-74 apps/…/app.component.ts• L80-156 apps/…/app.component.ts• L201-219 apps/…/navigation-settled.ts• L4-41
Application composition
The application uses a root bootstrap module around a core Angular module. The wrapper connects plugin lifecycle services and shared registries to the core app, while the core module supplies the browser platform, routes, shared UI, state, networking, and feature services.
Application assembly
AppBootstrapModule is the application assembly boundary. It initializes the plugin UI module and connects plugin services to navigation, routes, tabs, widgets, translations, permissions, and feature checks. It then imports AppModule as the core application.
The root injector also registers core dashboard widgets and shares the main store and translation services with plugins. It exposes the plugin-derived Ever app catalog to the header switcher. During shutdown, registered plugins can release their resources.
References: apps/…/bootstrap.module.ts• L27-40 apps/…/bootstrap.module.ts• L42-112 apps/…/app.module.ts• L82-127
Workspace context
The authenticated pages area is the main Gauzy workspace. PagesComponent builds its navigation from the current user, organization, permissions, and feature settings. Child pages then use the same organization, employee, project, team, date, language, and layout context.
Organization changes rebuild organization-specific navigation and integration state. A user without a tenant is sent to onboarding instead of entering the main workspace. Route data also controls which shared selectors appear on each page.
References: apps/…/pages.component.ts• L23-35 apps/…/pages.component.ts• L60-131 apps/…/pages.component.ts• L313-354 apps/…/pages.routes.ts• L27-60 apps/…/pages.routes.ts• L468-501
Product surfaces
The workspace combines lazy route areas with shared list, form, record, table, filter, report, and dashboard surfaces. The active tenant and organization scope determine which records a page shows. Permissions and feature checks determine which actions and product surfaces a user can use.
| Feature area | User-facing purpose |
|---|---|
| People and contacts | Manage employees, teams, organization contacts, members, and related records. |
| Work and delivery | Manage projects, tasks, goals, pipelines, deals, initiatives, tags, and time off. |
| Time and attendance | Review time records, activity, weekly summaries, and report exports. |
| Finance and records | Manage income, expenses, invoices, payments, documents, and related records. |
| Inventory and equipment | Manage equipment and other operational records. |
| Suppliers and procurement | Maintain vendors and connect supplier records with organization spending. |
| Settings and administration | Control organization settings, billing, roles, permissions, import/export, and installation updates. |
| Reports and dashboards | Turn shared workspace context into charts, tables, activity feeds, saved workspaces, accounting views, and configurable dashboard views. |
The main product views keep their list, detail, edit, and action boundaries separate. This lets a user inspect a record without granting the broader rights needed to change it.
Income record views also use the expense chart surfaces with revenue styling. This keeps related financial records within the same comparison model while preserving their distinct business meaning.
References: apps/…/dashboard.module.ts• L117-145 apps/…/contacts.component.ts• L55-70 apps/…/pipelines.module.ts• L33-77 apps/…/settings.routes.ts• L22-45 apps/…/income.module.ts• L28-33 apps/…/income.module.ts• L35-64
Equipment and vendor records
Equipment and vendor areas now give a selected organization both a list workspace and a bookmarkable full-record page. The list supports the normal table or card view and sends the selected record to a dedicated URL, while the full page keeps actions, facts, related history, and chart summaries together.
Equipment pages explain use through approved sharing history. Vendor pages explain supplier activity through organization-scoped expenses and recent expense links. Both pages reject records from another organization and keep late reads from replacing the current record.
This diagram shows how a list selection becomes a scoped record page and how the page connects to related product data.
flowchart LR
A[Organization-scoped list] --> B[Record URL]
B --> C[Full record page]
C --> D[Related history and charts]
C --> E[Back link and favorite link]
References: apps/…/equipment.component.ts• L278-339 apps/…/equipment-record-view.ts• L5-25 apps/…/equipment-view-page.component.ts• L207-277 apps/…/vendors.component.ts• L521-545 apps/…/vendor-record-view.ts• L146-189 apps/…/vendor-view-page.component.ts• L114-175
Inventory record views
Inventory detail views turn one product into a readable record surface with its translated fields, images, gallery, tags, and variants. The view keeps the product data and its variant table together so an engineer or operator can inspect the item without returning to the inventory list.
The selected language controls translated product and option names. The image gallery opens from the record view and preserves the product's image context for inspection.
References: apps/…/view-inventory-item.component.ts• L47-117 apps/…/view-inventory-item.component.ts• L142-203 apps/…/view-inventory-item.component.html• L20-64 apps/…/inventory.module.ts• L75-120
Favorites workspace
The favorites page is the user's cross-product index of saved records. It turns favorite links into searchable, type-filtered, sortable rows or cards and keeps those choices in the URL so the view can be shared or restored.
The page distinguishes a user's own favorite from an organization pin. A user can remove only the user's own entry, while an organization pin remains visible for the wider organization.
References: apps/…/favorites.component.ts• L20-95 apps/…/favorites.component.ts• L151-218 apps/…/favorites.component.ts• L291-371 apps/…/favorites.component.html• L9-114 apps/…/favorites.component.html• L130-249
Report catalogue
The report catalogue gives an organization one place to find reports by name, description, category, or menu visibility. Its filters mirror the URL and its cards provide the path into each report.
Changing a report's menu setting updates the organization view and its option counts without losing the current filtered card. A later organization response cannot replace the reports for the organization now selected.
References: apps/…/all-report.component.ts• L63-109 apps/…/all-report.component.ts• L116-169 apps/…/all-report.component.ts• L183-201 apps/…/all-report.component.ts• L259-327 apps/…/all-report.component.html• L16-127 apps/…/all-report.component.html• L140-191
Employee memberships
Employee profile tabs manage the employee's contact and project memberships. Each tab shows scoped records, supports local search, and offers a confirmation step before removal. Assignment uses a separate selection flow and refreshes the table after the server accepts the change. The contact assignment list reads pages from the server as the user searches or scrolls; the project assignment list shows the organization's projects that are not already assigned.
These views capture the employee and organization when a dialog opens. A later employee switch closes the dialog and drops the old rows, so a late save cannot change a newer employee's memberships. apps/…/edit-employee-contact.component.ts, apps/…/edit-employee-projects.component.ts
References: apps/…/edit-employee-contact.component.ts• L209-320 apps/…/edit-employee-projects.component.ts• L217-367 apps/…/edit-employee-contact.component.assign.spec.ts• L211-300 apps/…/edit-employee-projects.component.remove.spec.ts• L176-229
Accounting dashboard
The accounting dashboard turns an organization's selected date range into income, expense, profit, and optional bonus views. It keeps the headline totals, cash-flow chart, and employee breakdown in one surface. A user can filter or sort the breakdown and select an employee to open the related human-resources view. apps/…/accounting.component.ts, apps/…/accounting.component.ts, apps/…/accounting.component.html
References: apps/…/accounting.component.ts• L200-235 apps/…/accounting.component.ts• L458-538 apps/…/accounting.component.html• L126-245
Dashboard workspaces
The dashboard presents a standard set of product views and user-created dashboards in the same workspace. A custom dashboard replaces the standard tab content with its own tabs and widgets, while the standard tab content stays mounted so it can return without losing its state.
Dashboard sections can request task and project quick looks even when the section does not own a drawer. The dashboard-level host opens the shared record views with the current organization, employee, and date context, then closes them when that workspace context or route changes.
This diagram shows how dashboard sections connect to shared record views without leaving the dashboard workspace.
flowchart LR
A[Dashboard section] --> B[Task or project quick-look request]
B --> C[Dashboard quick-look host]
C --> D[Scoped record drawer]
D --> E[Full record page]
References: apps/…/dashboard.component.html• L1-14 apps/…/dashboard.module.ts• L103-107 apps/…/dashboard.module.ts• L147-180 apps/…/dashboard-quick-look.component.ts• L74-118 apps/…/dashboard-quick-look.component.html• L1-26
Record extensions
Record pages can add related plugin panels without importing the full plugin hub. Projects, tasks, employees, and contacts can expose document links beside their own record data. Shared comments provide notes or discussion for records that support them.
The task surface composes its own overview with subtasks, time views, linked issues, comments, documents, and a board and activity view. Its tabs stay in the URL, while permission and feature checks decide whether the document surface is available. These additions stay inside the task or project record flow instead of becoming separate application surfaces. The same record-view model supports full pages and quick-look drawers, so a user can move from a dashboard row to a related record without losing the current workspace context.
References: apps/…/projects.module.ts• L25-76 apps/…/tasks.module.ts• L46-123 apps/…/task-view-page.component.ts• L94-138 apps/…/task-view-page.component.html• L53-188 apps/…/edit-employee-documents.component.html• L1-11 apps/…/contact-view.module.ts• L23-57
Workspace task views
The task record page gives one task a bookmarkable workspace. It combines task facts with time tracking, recent time entries, linked issues, subtasks, comments, documents, and activity so a user can inspect related work without leaving the task context.
The page keeps its selected tab in the URL. It loads larger panels when first opened and keeps them mounted so a draft or an in-flight operation is not lost when the user changes tabs. Header edits and board changes refresh the task and its related panes. The page also scopes the task to the selected organization and rejects a record from another organization.
This diagram shows how a task URL becomes a scoped record view and how changes return to related task surfaces.
flowchart LR
A[Task URL and selected organization] --> B[Task record]
B --> C[Overview, subtasks, time, and links]
B --> D[Board, activity, comments, and documents]
C --> E[Task or subtask change]
D --> E
E --> F[Task refresh and related-pane refresh]
References: apps/…/task-view-page.component.ts• L94-138 apps/…/task-view-page.component.ts• L284-393 apps/…/task-view-page.component.ts• L434-563 apps/…/task-view-page.component.html• L53-188 apps/…/task-view-page.component.html• L190-376 apps/…/tasks-routing.module.ts• L32-43
Route composition
The route map separates public entry points from authenticated product areas. Large areas load only when their route is used, so the first browser load can focus on the shell and the current task.
Route areas
The main route groups have these roles:
| Route area | Product role | Access boundary |
|---|---|---|
auth and sign-in | Sign-in and authentication flows | Public |
onboarding | First-use setup | Authenticated and application-ready |
pages | Main Gauzy workspace | Authenticated and application-ready |
ai-chat | Detached chat window | Authenticated and application-ready |
share and legal | Public shared and legal views | Public |
server-down | Service availability page | Fallback route |
Within pages, route groups cover contacts, projects, tasks, pipelines, reports, organization settings, roles, billing, and other product areas. Plugin routes are merged from named registry locations, so an extension can add a page without changing the core route list.
The tasks area separates dashboard, team, and personal task views from its full task, trash, and settings routes. The full task view is a URL-backed record surface, while trash and settings apply stronger organization permissions.
The organization equipment and vendor areas follow the same list-to-record pattern. Each area has a list route and a view/:id route for a full-width record page. The full pages are also the stable destinations used by favorites and drawer expansion.
References: apps/…/app.routes.ts• L1-60 apps/…/pages.routes.ts• L8-50 apps/…/settings.routes.ts• L22-45 apps/…/settings.routes.ts• L161-180 apps/…/tasks-routing.module.ts• L10-69 apps/…/equipment-routing.module.ts• L8-31 apps/…/vendors-routing.module.ts• L8-29
Route readiness
Authenticated feature routes require a valid user session and a reachable application server. When the server is unavailable, browser users go to the maintenance route. Page-level permission rules then keep list, detail, and edit boundaries separate.
The task full view requires organization task-view access. Task trash requires organization task-delete access, and task settings requires organization project-edit access. Each route redirects to the task dashboard when its permission boundary is not met.
Some routes also resolve organization data before activation. The resolver reads only the relations the route needs and can omit sensitive relations when the user lacks the matching permission. This allows a page to open with less data instead of failing its whole organization read.
References: apps/…/app.routes.ts• L19-37 apps/…/app.module.guard.ts• L7-29 apps/…/edit-organization-routing.module.ts• L16-87 apps/…/organization.resolver.ts• L25-55 apps/…/organization-route-relations.ts• L5-59 apps/…/tasks-routing.module.ts• L32-68
Bookmarkable record views
Project, task, pipeline, and expense views keep meaningful state in the URL. Tabs, task drawers, board views, and selected records can therefore survive reloads, direct links, and browser Back navigation.
The task page keeps overview, board, activity, comments, and documents as related views of the same task. Its full-width route gives favorites and expanded drawers a stable destination. It opens larger panes when first needed and refreshes the task and related panes after a status, edit, or subtask change. The page reloads its record when the selected organization changes. A record from another organization is treated as unavailable instead of being shown under the new organization. apps/…/task-view-page.component.ts
Equipment and vendor records use the same stable-link rule. Their list actions and favorite entries open their own full pages rather than a generic record view. This gives sharing history for equipment and spending context for vendors a durable place that survives a reload or a copied link.
References: apps/…/project-view-page.component.ts• L46-61 apps/…/project-view-page.component.ts• L161-199 apps/…/task-view-page.component.ts• L284-393 apps/…/task-view-page.component.ts• L434-563 apps/…/tasks-routing.module.ts• L32-43 apps/…/pipeline-deals.component.ts• L24-25 apps/…/pipeline-deals.component.ts• L175-195 apps/…/expenses-routing.module.ts• L37-45 apps/…/equipment.component.html• L57-109 apps/…/vendors.component.html• L163-231 apps/…/drawer-full-view-links.routes.spec.ts• L34-55
Expense record page
The expense area supports a scoped list and a separate full-width record page. The record page lets a user inspect the expense, receipt, related facts, and comparisons before using permission-checked edit, duplicate, copy-link, favorite, or delete actions.
The page reads the selected organization as its scope. It treats an expense from another organization as unavailable and reloads when the route id or organization changes. Its comparison views use the expense's currency and show category spending over time, vendor payments, and the expense's share of its category for the same month.
When the expense page loads, it follows this sequence:
- Read the expense named by the URL in the selected organization scope.
- Show the record facts and receipt state.
- Read comparable category and vendor records.
- Draw the comparison views and keep later responses tied to the current expense.
References: apps/…/expenses-routing.module.ts• L13-45 apps/…/expense-view-page.component.ts• L89-116 apps/…/expense-view-page.component.ts• L176-239 apps/…/expense-view-page.component.ts• L387-421 apps/…/expense-view-page.component.html• L1-75 apps/…/expense-view-page.component.html• L254-399
Board workspaces
Project and task boards turn workflow statuses into columns and records into cards. Users can filter cards by text, assignee, priority, type, and label. Users with edit access can move an allowed card to another status, while a failed save returns it to its former column.
Boards read records in pages and add later records as the user nears the end. A task board includes the parent task with its subtasks, while a project board covers the project's tasks. Filters narrow the cards already read and expose only the facets carried by those cards. A move reports back to the host page so related task, overview, and activity views can refresh without losing the board context.
Pipeline deals use the same visual idea with pipeline stages as columns. A deal move updates the stage and refreshes the list and grid after pending board saves settle.
This diagram shows the shared board relationship between route state, scoped records, and saved status changes.
flowchart LR
A[Project or task route] --> B[Organization-scoped records]
B --> C[Status columns and cards]
C --> D[Filters and record links]
D --> E[Permission-checked move]
E --> F[Server save and related-view refresh]
References: apps/…/project-board.component.ts• L104-121 apps/…/project-board.component.ts• L247-347 apps/…/board-filter-bar.component.ts• L16-65 apps/…/project-view-page.component.html• L99-116 apps/…/task-view-page.component.html• L93-147 apps/…/pipeline-deals-board.component.ts• L28-36 apps/…/pipeline-deals.component.ts• L51-64
Activity views
The project and task pages present a shared activity feed for changes and comments. The feed joins record history with the related task history and comments, then shows the result by day with actor, action, changed fields, status movement, and links to related records.
The project-management dashboard provides a lighter recent-activity view. It filters organization activity to all records, tasks, or projects and loads more rows on demand. Relative times follow the active UI language.
References: apps/…/project-activity.component.ts• L117-124 apps/…/project-activity.component.ts• L216-280 apps/…/recent-activity.component.ts• L29-36 apps/…/recent-activity.component.ts• L125-179 apps/…/recent-activity.utils.ts• L108-150
Contact records
The contacts area manages organization contacts as list, card, mutation, and detail views. Contact actions use separate view, add, edit, invite, and delete permission rules so the visible controls match the access boundary of each action.
The detail view combines contact facts, projects, members, documents, favorites, location, and notes. Notes use the shared record discussion contract: readers can view notes and editors can write them. Member changes preserve the full selected relation when updates arrive out of order.
References: apps/…/contact-action-permissions.ts• L7-25 apps/…/contacts.component.html• L59-137 apps/…/contact-view.component.ts• L45-64 apps/…/contact-view.component.ts• L158-211 apps/…/entity-comments.component.ts• L117-129
Report and record workflows
Time and activity reports share organization, employee, date, grouping, and time-zone context. They present charts and grids and expose CSV export only after the latest matching grid request has data. Weekly reports use the same filters to turn time entries into employee-by-day summaries.
Timesheet review adds a status view over the same time records. Approvers can filter by status, select visible rows, submit or unsubmit records, and approve or deny one or many timesheets. A detail view groups the logs by local day and keeps approved logs read-only, while employee data and log changes follow the viewer's permissions.
Expense records use the same organization and date context in the list, then provide a URL-backed detail surface for a single record. Invoice payment views derive paid and due amounts from the latest server record after a payment change. Import and export views keep their entity catalogue aligned with the server so grouped records such as payroll runs and payroll lines can be included in an archive.
References: apps/…/time-activities.component.ts• L29-49 apps/…/time-activities.component.html• L1-48 apps/…/time-reports.component.ts• L57-71 apps/…/weekly-time-reports.component.ts• L89-129 apps/…/approvals.component.ts• L107-220 apps/…/approvals.component.html• L13-35 apps/…/view.component.ts• L107-215 apps/…/view.component.html• L26-71 apps/…/payments.component.ts• L104-159 apps/…/export.component.ts• L104-114 apps/…/expenses.component.ts• L134-186
Manual time report
The manual time report helps an authorized user review time entries added or changed by hand. Its filters follow the shared organization, employee, project, team, date, and time-zone context, then add action, task, billable, and team-scope choices.
The report groups loaded entries by day, shows totals and partial-page state, loads more entries on demand, exports the rows currently loaded, and opens a detail view. The detail view places the selected entry in the employee's day and separates tracked time, other manual time, and the selected entry. It keeps the report time zone and blocks edits for approved timesheets. apps/…/manual-time.component.ts, apps/…/manual-time.component.ts, apps/…/manual-time-details.component.ts
This diagram shows the report path from shared filters to review and export.
flowchart LR
A[Workspace filters] --> B[Manual time request]
B --> C[Day groups and summary]
C --> D[Entry detail]
C --> E[Loaded-row CSV export]
D --> F[Shared time editor]
References: apps/…/manual-time.component.ts• L195-227 apps/…/manual-time-report.ts• L77-114 apps/…/manual-time-day.ts• L79-166
Settings and administration
Settings pages run inside one settings shell and can include plugin-contributed sections. Roles and Permissions presents grouped platform, commerce, and organization permissions with translated descriptions and search. New permissions fall into an Other section instead of disappearing from the page.
The settings area also lets a signed-in user manage personal API tokens for agents or scripts. The user gives each token a name and expiry, sees only its prefix in the list, receives the plain value once after creation, and can revoke the token later. The route uses an enablement guard rather than a broad organization permission because the token carries only the user's own rights.
The What's New management page controls installation-wide entries for the product's update and feature surfaces. A super-admin route check protects the page, while the API remains the final authority for changes. Billing distinguishes an unavailable billing setup, a failed read, an empty subscription, and an active plan.
References: apps/…/settings.routes.ts• L11-20 apps/…/settings.routes.ts• L120-126 apps/…/permission-sections.ts• L1-18 apps/…/permission-texts.ts• L31-86 apps/…/roles-permissions.component.ts• L40-47 apps/…/api-tokens-routing.module.ts• L6-21 apps/…/api-tokens.component.ts• L1-5 apps/…/api-token-secret-dialog.component.ts• L1-4 apps/…/changelog-manager.guard.ts• L7-29 apps/…/changelog-admin.component.ts• L27-49 apps/…/billing.component.html• L8-26
User administration
User administration presents one user identity with route tabs for profile data and organization membership. The profile page keeps its header and tabs stable while each tab loads the current user and shows a retry state when a read fails. A super-admin record is available only to an authorized super-admin. apps/…/edit-user-profile.component.ts, apps/…/edit-user-data.component.ts
The organization tab lists active memberships and can add a user to organizations that the signed-in operator may manage. It can reactivate an inactive membership instead of creating a duplicate. A tenant administrator can choose across the tenant; other users can choose only the current organization. apps/…/edit-user-organizations.component.ts, apps/…/edit-user-organizations.component.ts
References: apps/…/edit-user-profile.component.ts• L75-125 apps/…/edit-user-data.component.html• L1-18 apps/…/edit-user-organizations.component.html• L1-71 apps/…/users.module.ts• L37-52
Browser configuration
The browser document defines the public web entry point, the application mount point, and the first loading view. It also provides metadata for responsive standalone application use.
Document shell
apps/…/index.html sets the root URL, page metadata, favicon, web manifest link, and <ga-app> mount element. Before Angular renders, the document shows an accessible loading skeleton. An early theme read keeps the first paint close to the user's saved theme.
References: apps/…/index.html• L1-24 apps/…/index.html• L245-264
Browser navigation
The Angular router uses hash-based navigation while the document uses / as its base path. This keeps route state in the browser URL without requiring the web server to resolve every application path. Route data also drives selector visibility, date ranges, and bookmark values.
The application module exposes environment settings to shared services and configures global error and overlay behavior.
References: apps/…/app.module.ts• L82-88 apps/…/app.module.ts• L139-156 apps/…/app.component.ts• L226-319
Installed application metadata
apps/…/manifest.json describes Gauzy as a standalone browser application. Its scope and start URL point to the same root application used by normal web navigation.
References: apps/…/manifest.json• L1-9
Error telemetry
Sentry provides browser error, route timing, and sampled session replay signals. The browser removes sensitive URL values from events and navigation breadcrumbs. It also avoids starting replay for a page that opens with a URL secret and stops an active replay before a same-tab navigation adds one.
References: apps/…/sentry.ts• L11-43 apps/…/sentry.ts• L45-112
Service-worker assets
The build setup defines which browser files can be delivered through Angular's service worker. The application shell is a prefetch group, while selected API requests can use a short-lived freshness cache.
Asset delivery
The service-worker configuration covers the HTML entry point, styles, scripts, browser metadata, manifest, application assets, shared language files, and PDF.js WebAssembly files. Web, desktop UI, and server UI production profiles do not enable worker support in the same way. Desktop builds also copy desktop-only browser resources into their output.
The browser asset set also carries small brand images for the Ever Apps surfaces. These files are part of the application asset bundle and follow the build profile that includes apps/gauzy/src/assets.
The asset bundle also includes the inbox push worker. It turns a push payload into a browser notification and sends a click to the same-origin Gauzy route, focusing an existing app tab when possible or opening a new one. apps/…/inbox-push-sw.js
References: apps/…/project.json• L13-61 apps/…/project.json• L198-235 apps/…/project.json• L292-355 apps/…/project.json• L409-433 apps/…/inbox-push-sw.js• L1-63
Network cache
The service-worker data group uses a freshness-first policy for the configured Gauzy API URL. Cached data can serve a request when the network does not answer within the configured time. Entry count and age keep the cache bounded.
Development and production service-worker files target different local API origins. A deployment must use the configuration that matches the API origin seen by the browser.
References: apps/…/ngsw-config.json• L20-32 apps/…/ngsw-config.prod.json• L21-33
Plugin UI integration
The frontend treats a UI plugin as a registered product extension. A plugin can add navigation, routes, tabs, widgets, translations, permissions, and feature-gated behavior without becoming a special case in the core page model.
Plugin registration
apps/…/plugin-ui.config.ts is the browser composition switch. It defines supported languages, locale rules, week start, and the active UI plugin set. Runtime permissions, environment values, preferred UI settings, and backend checks can still decide whether a configured surface is visible.
The Angular and React time-tracking plugins may register the same route. A preferred UI rule selects which surface renders for the tenant.
References: apps/…/plugin-ui.config.ts• L22-38 apps/…/plugin-ui.config.ts• L40-125 apps/…/package.json• L56-76
Contribution points
At bootstrap, plugin services connect to shared registries. Plugins can contribute to navigation, routes, dashboard sections, page tabs, data tables, widgets, translations, permissions, and feature checks. Their state and language changes stay aligned with the Gauzy session.
Dashboard extension slots can render plugin widgets beside core dashboard content. Settings extensions use the settings registry so they inherit the settings shell rather than rendering as a separate application surface.
References: apps/…/bootstrap.module.ts• L42-77 apps/…/dashboard.module.ts• L27-49 apps/…/settings.routes.ts• L177-180 apps/…/pages.routes.ts• L14-24
Shared record discussion
The shared entity-comments surface gives projects, contacts, and other records one discussion model. It supports top-level comments, one-level replies, permission-checked writing, and image attachments. Contact notes and project comments differ in labels and access rules but share the same record relationship.
Record-side document panels follow the same extension idea. They attach documents to an existing record or hold selected files until a new project receives an id.
References: apps/…/entity-comments.component.ts• L32-52 apps/…/entity-comments.component.ts• L117-129 apps/…/create.component.ts• L25-37 apps/…/create.component.ts• L57-101 apps/…/project-view-page.component.html• L118-152
Change checklist
When these files or sections are changed, remember to consider these:
- Keep bootstrap order aligned when plugin configuration or browser state must exist before Angular starts.
- Keep application initializers aligned with server readiness, feature definitions, session state, tenant scope, and optional service behavior.
- Keep the root loading state aligned with successful navigation, redirects, refusals, and terminal navigation failures.
- Keep route data, query parameters, organization resolvers, permitted relations, selector visibility, and bookmark restoration aligned when changing a page route.
- Keep task dashboard, team, personal, full-record, trash, and settings paths aligned with their redirect targets, selectors, and permission pairs.
- Keep core route locations, page modules, permission guards, lazy-load boundaries, and plugin registry locations aligned when adding a product area.
- Keep standard dashboard tab content mounted when custom dashboard content is selected, and keep widget and quick-look extension slots aligned with their host module.
- Keep dashboard quick looks scoped to the current organization, employee, date range, and route. Close them when that context changes.
- Keep project and task board status sources, filters, pagination, drag permissions, and reload signals aligned.
- Keep the task page's URL tabs, comment deep links, document feature gate, pane mounting, and organization scope aligned.
- Keep task header and subtask status changes aligned with the task refresh, board refresh, activity refresh, and project-status scope.
- Keep activity feeds aligned with activity-log entity scope, comments, status labels, organization context, language, and partial-read states.
- Keep contact action permissions aligned with the API's create, view, edit, invite, and delete checks.
- Keep contact notes and record-side document panels aligned with their entity type, record id, feature flag, and permission boundary.
- Keep goal preset payload scope, key-result employee ownership, creation order, and rollback order aligned.
- Keep employee contact and project membership reads, assignment dialogs, permission gates, context capture, and post-save reloads aligned.
- Keep timesheet status filters, bulk selection, employee visibility, detail locking, and status mutation behavior aligned.
- Keep report export enabled only for the latest filter and grouping result, and keep import/export entity names aligned with server registration and translations.
- Keep manual time report filters, time-zone grouping, page state, loaded-row export, day detail reads, and approved-entry edit rules aligned.
- Keep expense list and full-page routes aligned with organization scope, permission checks, drawer links, and the selected record's employee context.
- Keep expense comparison reads limited to the record currency and discard results that belong to an older record or organization selection.
- Keep equipment and vendor list routes, full-record routes, favorite links, drawer expansion links, and back links aligned.
- Keep equipment sharing status, date ranges, chart meaning, and organization scope aligned when changing equipment record views.
- Keep vendor expense permission checks, currency summaries, chart currency selection, and recent expense links aligned.
- Keep inventory product translations, image gallery state, option labels, and variant rows aligned.
- Keep favorites URL filters, type labels, layout state, own-versus-organization pin rules, and record links aligned.
- Keep report filters, URL query state, organization report data, menu visibility, and option counts aligned.
- Keep invoice totals and invoice status aligned with a fresh payment read after add, edit, or delete actions.
- Keep organization route relations aligned with the permission that protects each sensitive relation.
- Keep permission groups, visible sections, translated labels, and the fallback
Othersection aligned. - Keep user profile route tabs, current-user identity, super-admin access checks, membership scope, inactive-membership reactivation, and dialog context aligned.
- Keep API-token enablement, settings-shell placement, token list masking, one-time secret display, expiry choices, and revoke behavior aligned.
- Keep What's New route access, API operator checks, input validation, preview behavior, and restore state aligned.
- Check every build profile when changing copied assets or service-worker behavior. Web, desktop UI, and server UI profiles do not enable the worker in the same way.
- Keep inbox push worker scope, same-origin URL checks, notification data, and app hash routes aligned.
- Keep service-worker API URL patterns aligned with the API origin used by each deployment.
- Keep Sentry URL redaction and replay shutdown aligned with every route that can carry a one-time URL secret.
- Keep plugin configuration, package dependencies, shared registries, route rules, permissions, feature checks, and preferred UI selection aligned when adding or replacing a UI plugin.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| Plugin configuration is unavailable before Angular bootstrap | The browser cannot assemble the configured UI | Load plugin configuration before the Angular bootstrap call and report the load error |
| A first navigation fails or is refused with no replacement | The loading skeleton stays over an outlet that never renders | Treat terminal errors and refusals as settled after the router has time to start a replacement |
| A protected route omits its session, server, or permission boundary | A page opens without its required context or redirects late | Keep route guards, session resolution, server readiness, and page permissions together |
| A task route uses a permission pair or redirect that does not match its purpose | Users can enter task settings or trash without the intended organization access, or valid users are sent to the wrong task surface | Keep task view, trash, and settings permissions paired with their dashboard redirect |
| A sensitive organization relation is always requested | The API can reject the whole organization read for users who may still open the page | Request the relation only when its permission is held |
| A custom dashboard destroys the standard tab content | Returning to the standard dashboard leaves its tabs blank | Keep the standard tab content mounted and hide it while a custom dashboard is active |
| A dashboard quick look keeps the old organization or route context | A task or project from the prior workspace remains visible | Close quick looks on organization, employee, or primary route changes |
| A board save fails after the card moved locally | The board shows a status that the server rejected | Return the card to its prior column and show the save error |
| A task URL opens a tab that the viewer cannot use | The user sees an empty or unauthorized task pane | Validate the tab against permissions and feature flags, then fall back to a valid task tab |
| A task header or subtask change does not refresh related panes | The task page shows old status, subtask totals, or activity | Refresh the task first, then signal the board and activity views |
| A subtask uses a status from another project | A status update can apply an invalid project workflow | Offer status changes only when the subtask shares the task's project scope |
| A manual time detail reads an approved entry as editable | Final time can change from a report detail dialog | Keep approved timesheets read-only in the detail flow |
| A board or activity response from an old organization arrives late | Records from another selection appear in the current view | Discard stale responses when route or organization context changes |
| An employee membership dialog saves after the employee or organization changes | A contact or project is assigned or removed for the wrong context | Capture the dialog context and verify it is still current before saving |
| A configured plugin is missing from the application package contract | The build or bootstrap cannot load the requested extension | Keep plugin configuration and application dependencies aligned |
| A user administration tab keeps data from a previous user | Profile or membership actions target the wrong user | Clear tab state and discard late reads when the route user changes |
| An expense page reads a record outside the selected organization | A user can see a record from another organization or receive a late stale view | Scope the read by the selected organization and treat a mismatch as not found |
| An expense comparison mixes currencies or uses an older read | Chart totals and the highlighted record are misleading | Compare only the record currency and accept only the latest chart sequence |
| A contact action uses one broad permission for every operation | Users see controls that the API will refuse or cannot reach notes | Map each action to the matching permission list |
| A goal preset fails after creating some records | Orphaned KPIs or an incomplete objective remain | Roll back the current attempt in dependency order and report leftovers |
| A report export uses an older request result | The downloaded file does not match the visible filters | Enable export only from the latest grid result |
| A timesheet read returns after a newer permission or filter read | Rows can show the wrong employee scope or status set | Apply only the latest fetch result and rebuild visible status choices from it |
| An approved timesheet still permits log edits | Locked records can change after approval | Keep the approved state as the detail page's edit and delete boundary |
| A payment status is calculated from the record read before the mutation | The invoice shows the wrong paid state or amount due | Read payments again before writing derived invoice fields |
| An equipment or vendor full-page link points to a missing or generic route | Favorites or drawer expansion opens the wrong surface or a not-found page | Keep list actions, route declarations, and full-view link checks aligned |
| An equipment view counts pending or refused sharing as booked time | Equipment use charts overstate booked days | Count only approved sharing ranges and merge overlapping days |
| A vendor spend chart combines different currencies | Spend totals become misleading | Select one chart currency and call out other currencies |
| A vendor expense read ignores the viewer's expense permission | The record exposes spending data that the viewer cannot use | Skip the expense summary when the permission is absent |
| A late equipment or vendor response wins after an organization switch | The page shows a record or related data from the old organization | Scope reads to the selected organization and discard older load sequences |
| A favorite removal deletes an organization pin | Removing one user's favorite removes the record for other users | Allow removal only for the user's own favorite entry |
| A report filter response belongs to another organization | The catalogue shows the wrong report set or keeps an invalid category | Apply only the latest organization read and clear unavailable categories |
| An export entity is not listed on the frontend | The server-supported table is absent from the archive | Keep the frontend entity catalogue and translation labels aligned with server registration |
| A permission has no section or translation | A role capability disappears or renders as a raw key | Place unlisted permissions in Other and validate labels across languages |
| A user closes a new token's secret dialog without copying it | The plain token cannot be recovered and the user must create another | Reveal the secret once, block accidental dismissal, and require acknowledgement before close |
| A What's New change is allowed by the route but refused by the API | The page offers an action that cannot succeed | Check the role before entry and treat the API as the final operator authority |
| A service-worker API pattern does not match the deployed API origin | API requests do not use the intended worker cache | Match the data-group URL pattern to the browser-visible deployment origin |
| A push payload points to another origin or an unscoped path | A notification click leaves the Gauzy application scope | Accept same-origin targets and fall back to the scoped Inbox route |
| A URL secret reaches Sentry replay or an unredacted event | A one-time credential can be stored in telemetry | Skip replay for secret-bearing loads, stop it before secret navigation, and redact URLs before send |
Key files
| File | Why to read it |
|---|---|
| apps/…/main.ts | Shows the browser entry sequence and the dependency of Angular bootstrap on plugin configuration. |
| apps/…/bootstrap.module.ts | Shows how the root injector joins the core application to plugin lifecycle and contribution points. |
| apps/…/app.module.ts | Shows shared application services, startup checks, request context, and browser providers. |
| apps/…/app.component.ts | Shows root shell readiness, language setup, route context, and browser-wide services. |
| apps/…/app.routes.ts | Shows public, protected, detached-window, and fallback route boundaries. |
| apps/…/pages.routes.ts | Shows lazy product areas and dynamic plugin route locations. |
| apps/…/pages.component.ts | Shows authenticated workspace composition and organization context. |
| apps/…/organization.resolver.ts | Shows organization data loading and route-specific relation scope. |
| apps/…/dashboard.module.ts | Shows standard and custom dashboard composition, widgets, and plugin extension slots. |
| apps/…/dashboard.component.html | Shows the relationship between standard dashboard tabs, custom dashboards, and quick-look hosting. |
| apps/…/dashboard-quick-look.component.ts | Shows scoped task and project quick looks requested by dashboard sections. |
| apps/…/accounting.component.ts | Shows organization-scoped accounting totals, chart loading, employee filtering, and drill-down. |
| apps/…/recent-activity.component.ts | Shows the organization activity view and its refresh and paging behavior. |
| apps/…/contacts.component.ts | Shows contact list scope and the relationship between shared organization state and contact records. |
| apps/…/contact-view.component.ts | Shows contact detail, notes access, members, and related record context. |
| apps/…/project-view-page.component.ts | Shows bookmarkable project tabs, organization reloads, and record-view state. |
| apps/…/project-board.component.ts | Shows project and task board scope, filters, paging, and status changes. |
| apps/…/board-filter-bar.component.ts | Shows the user-facing board filter contract and filter contribution point. |
| apps/…/project-activity.component.ts | Shows the project and task activity feed model. |
| apps/…/edit-employee-contact.component.ts | Shows employee contact membership scope, assignment, removal, and paging. |
| apps/…/edit-employee-projects.component.ts | Shows employee project membership scope, assignment, removal, and quick-look handoff. |
| apps/…/tasks-routing.module.ts | Shows task dashboard variants, full-record navigation, trash, settings, and their permission boundaries. |
| apps/…/task-view-page.component.ts | Shows the bookmarkable task workspace, scoped loading, tabs, status actions, subtasks, and related-pane refresh. |
| apps/…/task-view-page.component.html | Shows the task page's overview, board, activity, comments, document, and task-fact surfaces. |
| apps/…/task-view-page.component.spec.ts | Shows the task page contract for organization scope, permissions, tab behavior, status changes, and stale reads. |
| apps/…/task-view-page.utils.ts | Shows how task links and time summaries become user-facing task-page data. |
| apps/…/income.module.ts | Shows the income surface's shared financial UI and reuse of expense chart views. |
| apps/…/expenses-routing.module.ts | Shows the expense list, category, and bookmarkable full-record route boundaries. |
| apps/…/expenses.component.ts | Shows scoped expense list loading, actions, filters, and the small-record drawer. |
| apps/…/expense-view-page.component.ts | Shows the full expense record flow, organization scope, actions, and comparison reads. |
| apps/…/expense-view-charts.ts | Shows how category, vendor, and monthly share comparisons are defined. |
| apps/…/equipment-routing.module.ts | Shows the equipment list and bookmarkable full-record route boundaries. |
| apps/…/equipment.component.ts | Shows organization-scoped equipment lists, layout changes, actions, and full-page navigation. |
| apps/…/equipment-view-page.component.ts | Shows equipment facts, sharing history, charts, actions, and stale-load protection. |
| apps/…/equipment-view-charts.ts | Shows how approved sharing becomes booked-day and request charts. |
| apps/…/vendors-routing.module.ts | Shows the vendor list and bookmarkable full-record route boundaries. |
| apps/…/vendors.component.ts | Shows organization-scoped vendor lists, selection, drawer data, and mutations. |
| apps/…/vendor-record-view.ts | Shows vendor record sections, expense permission checks, and spending summaries. |
| apps/…/vendor-view-page.component.ts | Shows vendor expense context, charts, recent records, and organization-scoped loading. |
| apps/…/vendor-view-charts.ts | Shows vendor currency selection and monthly spending bars. |
| apps/…/favorites.component.ts | Shows favorite filtering, URL state, layout choice, and safe removal rules. |
| apps/…/view-inventory-item.component.ts | Shows translated inventory detail, image gallery, and variant composition. |
| apps/…/all-report.component.ts | Shows report catalogue filters, menu visibility, organization reads, and URL state. |
| apps/…/drawer-full-view-links.routes.spec.ts | Shows the contract that drawer expansion links resolve to real full pages. |
| apps/…/approvals.component.ts | Shows timesheet status review, filtering, selection, and bulk actions. |
| apps/…/view.component.ts | Shows timesheet detail grouping, employee visibility, locking, and status changes. |
| apps/…/manual-time.component.ts | Shows manual time filtering, paging, summaries, detail entry, and export flow. |
| apps/…/manual-time-details.component.ts | Shows employee-day context, approved-entry rules, and edit handoff for manual time. |
| apps/…/settings.routes.ts | Shows the settings shell, lazy settings areas, API-token route, and plugin settings registry. |
| apps/…/api-tokens.component.ts | Shows personal token creation, one-time secret handoff, listing, and revocation. |
| apps/…/api-token-form-dialog.component.ts | Shows the token name and expiry choices accepted by the creation flow. |
| apps/…/api-token-secret-dialog.component.ts | Shows the one-time secret reveal and copy boundary. |
| apps/…/roles-permissions.component.ts | Shows role selection, permission grouping, search, and updates. |
| apps/…/changelog-admin.component.ts | Shows installation-wide What's New management and refresh behavior. |
| apps/…/edit-user-profile.component.ts | Shows the user identity shell, route tabs, and protected user loading. |
| apps/…/edit-user-organizations.component.ts | Shows user organization membership scope, add, reactivation, and removal. |
| apps/…/plugin-ui.config.ts | Shows the active plugin set and the language and locale contract used at startup. |
| apps/…/index.html | Shows the browser document shell, loading view, manifest link, and first-paint theme handling. |
| apps/…/sentry.ts | Shows browser telemetry, URL redaction, and replay safety for secret-bearing links. |
| apps/…/project.json | Shows copied assets and differences between web, desktop UI, and server UI build profiles. |
| apps/…/ngsw-config.json | Shows the non-production service-worker asset and API cache policy. |
| apps/…/ngsw-config.prod.json | Shows the production service-worker asset and API cache policy. |
| apps/…/inbox-push-sw.js | Shows push notification display and same-origin notification-click routing. |
| apps/…/manifest.json | Shows browser-installed application metadata. |