How themoment-team/datagsm-client-v2 works
DataGSM Client is a monorepo of separately deployed web apps for users, administrators, OAuth, projects, and service status. Its clearest runtime workflow is client/admin OAuth login: a login handler redirects to authorization, the callback exchanges the code for tokens and stores them in cookies, and authenticated server API clients attach an access token. The README also names a documentation app, but its files are absent from the supplied tree, so it is not mapped. Some app wiring and status-page calls were not excerpted; uncertain links are omitted or dashed.
Main entry points: ui/HomePage.tsx User web app · server.ts Authenticated API clients · ui/HomePage.tsx Admin web app · authRoutes.ts Auth route handlers
Components 27
Web applications
- User web app
apps/client/src/_pages/home/ui/HomePage.tsx - Admin web app
apps/admin/src/_pages/home/ui/HomePage.tsx - OAuth screen
apps/oauth/src/_pages/home/ui/HomePage.tsx - Projects page
apps/projects/src/_pages/home/ui/HomePage.tsx
Authentication
- Auth route handlers
packages/core/src/shared/auth/authRoutes.ts - App auth routes
apps/client/app/api/login/route.ts - Admin auth routes
apps/admin/app/api/login/route.ts - OAuth protocol
packages/core/src/shared/auth/oauth.ts - Token cookies
packages/core/src/shared/auth/cookies.ts - Token proxy
packages/core/src/shared/auth/authProxy.ts - Logout feature
packages/core/src/features/logout/api/endIdpSession.ts
Shared runtime
- API client
packages/core/src/shared/api/createApiInstance.ts - API interceptors
packages/core/src/shared/api/interceptors.ts - Authenticated API clients
apps/client/src/shared/api/server.ts - Browser API clients
apps/client/src/shared/api/client.ts - App configuration
packages/core/src/shared/config/appEnv.ts - App URLs
packages/core/src/shared/config/appUrls.ts - OAuth configuration
packages/core/src/shared/config/oauthEnv.ts - App shell
packages/core/src/widgets/app-shell/ui/AppShell.tsx - App sidebar
packages/core/src/widgets/app-shell/ui/AppSidebar.tsx
Service status
- Status page
apps/status/src/_pages/home/ui/HomePage.tsx - Status checks
apps/status/src/_pages/home/api/checkServerStatus.ts - Status list
apps/status/src/_pages/home/ui/ServerStatusList.tsx - Monitored servers
apps/status/src/_pages/home/config/monitoredServers.ts
Other components
- Browser user
- DataGSM API
- Authorization server
Connections 30
- Browser user → User web app: uses
README.md - Browser user → Admin web app: uses
README.md - Browser user → OAuth screen: uses
README.md - Browser user → Projects page: uses
README.md - Browser user → Status page: views
README.md - User web app → App auth routes: starts login
- Admin web app → Admin auth routes: starts login
- App auth routes → Auth route handlers: delegates
- Admin auth routes → Auth route handlers: delegates
- Auth route handlers → OAuth protocol: builds and exchanges
packages/core/src/shared/auth/authRoutes.ts - Auth route handlers → Token cookies: sets and clears
packages/core/src/shared/auth/authRoutes.ts - OAuth protocol → Authorization server: requests authorization and tokens
packages/core/src/shared/auth/oauth.ts - OAuth screen → Authorization server: provides login screen
README.md - User web app → Authenticated API clients: uses
- Admin web app → Authenticated API clients: uses
- Authenticated API clients → API client: creates client
apps/client/src/shared/api/server.ts - Authenticated API clients → Token proxy: attaches access token
apps/client/src/shared/api/server.ts - Browser API clients → API client: creates client
apps/client/src/shared/api/client.ts - Browser API clients → API interceptors: registers unauthorized handler
apps/client/src/shared/api/client.ts - User web app → Browser API clients: uses
- Authenticated API clients → DataGSM API: sends API requests
- User web app → App shell: renders
- Admin web app → App shell: renders
- App shell → App sidebar: renders
- App configuration → OAuth configuration: validates base settings
packages/core/src/shared/config/oauthEnv.ts - App configuration → App URLs: exports URL settings
packages/core/src/shared/config/index.ts - Status page → Status list: renders
- Status list → Status checks: checks status
- Status checks → Monitored servers: checks configured servers
- Logout feature → Authorization server: ends IdP session