# @idp.global/web Web Components and UI elements for the idp.global Identity Provider platform. Built with `@design.estate/dees-element` and the dees-catalog component library. ## Overview This package provides the complete web interface for idp.global, including authentication flows, account management, and organization administration. All components are built as Web Components using the Lit-based `dees-element` framework. ## Installation ```bash npm install @idp.global/web # or pnpm add @idp.global/web ``` ## Architecture ``` ts_web/ ├── index.ts # Application entry point ├── plugins.ts # Plugin imports ├── views/ │ ├── viewcontainer.ts # Main view router │ └── index.ts ├── elements/ # Web Components │ ├── idp-loginprompt.ts # Login form │ ├── idp-registerprompt.ts # Registration form │ ├── idp-registration-stepper.ts # Multi-step registration │ ├── idp-centercontainer.ts # Centered layout container │ ├── idp-transfermanager.ts # SSO transfer handling │ ├── idp-welcome.ts # Welcome/landing page │ └── account/ # Account dashboard components │ ├── content.ts # Main account layout │ ├── navigation.ts # Sidebar navigation │ ├── org-select-modal.ts # Organization switcher │ ├── create-org-modal.ts # Create organization dialog │ ├── bulk-invite-modal.ts # Bulk member invite dialog │ └── views/ # Account sub-views │ ├── baseview.ts # Base view class │ ├── usersview.ts # User profile view │ ├── orgview.ts # Organization details │ ├── orgsetup.ts # Organization setup │ ├── appsview.ts # Connected apps │ ├── adminview.ts # Global admin panel │ ├── subscriptions.ts # Billing subscriptions │ └── paddlesetup.ts # Payment setup └── states/ ├── idp.state.ts # Main application state └── accountstate.ts # Account dashboard state ``` ## Components ### Authentication Components #### `` Login form supporting password and magic link authentication. ```html ``` Features: - Email/username + password login - Magic link (passwordless) authentication - Automatic button text based on password presence - Form validation and error handling - Redirect to registration #### `` Initial registration form for new users. ```html ``` #### `` Multi-step registration wizard for completing user profile. ```html ``` Steps include: - Profile information - Email verification - Mobile verification (optional) - Password setup ### Layout Components #### `` Main view container that handles routing between views. ```html ``` Supported views: - `welcome` - Landing page - `login` - Login form - `register` - Registration form - `finishregistration` - Registration stepper - `account` - Account dashboard #### `` Centered container with animation support for forms. ```html

Your Content

...
``` Methods: - `show()` - Animate container into view - `hide()` - Animate container out of view ### Account Dashboard Components #### `` Main account dashboard layout with navigation. ```html ``` #### Navigation Views | Component | Route | Description | |-----------|-------|-------------| | `` | `/account/users` | User profile management | | `` | `/account/org` | Organization details | | `` | `/account/orgsetup` | Organization configuration | | `` | `/account/apps` | Connected applications | | `` | `/account/admin` | Global admin panel | | `` | `/account/subscriptions` | Billing management | | `` | `/account/paddle` | Payment method setup | ### Modal Components #### `` Organization switcher modal for users with multiple organizations. #### `` Dialog for creating new organizations with slug validation. #### `` Bulk invitation dialog for inviting multiple members at once. ## State Management ### IdpState Central application state using `@push.rocks/smartstate`. ```typescript import { IdpState } from '@idp.global/web'; const idpState = await IdpState.getSingletonInstance(); // Access IdP client const isLoggedIn = await idpState.idpClient.determineLoginStatus(); // Access router idpState.domtools.router.pushUrl('/login'); // Subscribe to view changes idpState.mainStatePart.select(s => s.view).subscribe(view => { console.log('Current view:', view); }); ``` ### AccountState State for the account dashboard section. ```typescript import { AccountState } from '@idp.global/web'; const accountState = await AccountState.getSingletonInstance(); // Access current organization const currentOrg = accountState.currentOrganization; // Access user roles const roles = accountState.userRoles; ``` ## Styling Components use CSS custom properties for theming: ```css :host { --foreground: hsl(0 0% 98%); --muted-foreground: hsl(240 5% 64.9%); --background-accent: #303f9f; } ``` All components include: - Dark mode by default - Geist Sans font family - Smooth animations - Responsive layouts ## Dependencies - `@design.estate/dees-element` - Web Component base class - `@design.estate/dees-catalog` - UI component library - `@design.estate/dees-domtools` - DOM utilities and routing - `@idp.global/idpclient` - IdP client library - `@idp.global/interfaces` - TypeScript interfaces - `@push.rocks/smartstate` - State management - `@uptime.link/webwidget` - Status widget ## Views and Routes | Route | View | Component | |-------|------|-----------| | `/` | `welcome` | `IdpWelcome` | | `/login` | `login` | `IdpLoginPrompt` | | `/register` | `register` | `IdpRegistrationPrompt` | | `/finishregistration` | `finishregistration` | `IdpRegistrationStepper` | | `/account` | `account` | `IdpAccountContent` | | `/logout` | - | Logout handler | ## Building The web module is bundled using `@git.zone/tsbundle`: ```bash # Development with hot reload pnpm watch # Production build pnpm build ``` The bundled output is served from `dist_ts_web/` by the TypedServer. ## License and Legal Information This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the [LICENSE](../LICENSE) file. **Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file. ### Trademarks This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH or third parties, and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines or the guidelines of the respective third-party owners, and any usage must be approved in writing. Third-party trademarks used herein are the property of their respective owners and used only in a descriptive manner, e.g. for an implementation of an API or similar. ### Company Information Task Venture Capital GmbH Registered at District Court Bremen HRB 35230 HB, Germany For any legal inquiries or further information, please contact us via email at hello@task.vc. By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.