Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agent/skills/sample-banner/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ To add a logo:
- `path`: the sample directory, `<area>/<sample>`. The PNG is named after it, with the
slash replaced: `quickstarts/react` renders to `quickstarts-react.png`.
- `alt`: the image alt text, `ThunderID <Technology> <Quickstart|Sample>`.
- `badge`: `QUICKSTART`, `INTEGRATION`, `PATTERN`, `SELF-CARE SAMPLE`, or `MANAGEMENT SAMPLE`, matching the area.
- `badge`: `QUICKSTART`, `INTEGRATION`, `PATTERN`, `SELF-CARE SAMPLE`, `MANAGEMENT SAMPLE`, or `B2B SAMPLE`, matching the area.
- `logo`: a key in `logos.json`.
- `title`: short, with the emphasized part wrapped in `<accent>`, for example
`React <accent>Quickstart</accent>`. It has to fit on one line at 48px.
Expand Down
9 changes: 9 additions & 0 deletions .agent/skills/sample-banner/banners.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,15 @@
"title": "Admin <accent>App</accent>",
"accent": "#2DD4BF",
"desc": "A React app where an administrator manages users, groups, roles, applications and agents with @thunderid/react."
},
{
"path": "b2b/wayfinder-enterprise",
"alt": "ThunderID Wayfinder Enterprise Sample",
"badge": "B2B SAMPLE",
"logo": "nextjs",
"title": "Wayfinder <accent>Enterprise</accent>",
"accent": "#FFFFFF",
"desc": "A B2B travel app where companies sign up as organizations and plug in their own identity provider, built with @thunderid/nextjs."
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ on:
type: boolean
default: false

sample_b2b_wayfinder_enterprise:
description: 'b2b/wayfinder-enterprise'
required: false
type: boolean
default: false

permissions:
contents: write

Expand Down Expand Up @@ -155,6 +161,7 @@ jobs:
sample_patterns_react_express_bff: ${{ github.event.inputs.sample_patterns_react_express_bff }}
sample_self_care_account: ${{ github.event.inputs.sample_self_care_account }}
sample_management_admin: ${{ github.event.inputs.sample_management_admin }}
sample_b2b_wayfinder_enterprise: ${{ github.event.inputs.sample_b2b_wayfinder_enterprise }}
run: |
samples='[]'
add() {
Expand All @@ -177,6 +184,7 @@ jobs:
add sample_patterns_react_express_bff '{"path":"patterns/react-express-bff","emoji":"🛡️","title":"ThunderID React Express BFF Sample"}'
add sample_self_care_account '{"path":"self-care/account","emoji":"👤","title":"ThunderID Self-Care Account Sample"}'
add sample_management_admin '{"path":"management/admin","emoji":"🏢","title":"ThunderID Management Admin Sample"}'
add sample_b2b_wayfinder_enterprise '{"path":"b2b/wayfinder-enterprise","emoji":"🧭","title":"ThunderID Wayfinder Enterprise Sample"}'
if [ "$samples" = "[]" ]; then
echo "❌ No sample selected. Check at least one sample_* input."
exit 1
Expand Down
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Samples live at `<area>/<sample>`:
| `patterns` | An architecture that spans more than one app, such as a React app with an Express BFF |
| `self-care` | Apps built on ThunderID's self-service features |
| `management` | Apps where an administrator manages an organization's ThunderID resources |
| `b2b` | Apps that serve many business customers, each one an organization, such as a B2B SaaS app |

Each sample is released on its own, as a source zip tagged `sample/<area>/<sample>/v<version>`.
`.github/workflows/release.yml` builds the release and `pr-builder.yml` builds every sample
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ Apps where an administrator manages an organization's ThunderID resources.
|---|---|---|
| [`admin`](management/admin) | [![release](https://img.shields.io/github/v/release/thunder-id/samples?filter=sample/management/admin/*)](https://github.com/thunder-id/samples/releases?q=sample%2Fmanagement%2Fadmin&expanded=true) | React admin app for managing users, groups, roles, applications, agents, flows, projects and organization units |

### B2B

Apps that serve many business customers, each one an organization of its own.

| Sample | Release | Description |
|---|---|---|
| [`wayfinder-enterprise`](b2b/wayfinder-enterprise) | [![release](https://img.shields.io/github/v/release/thunder-id/samples?filter=sample/b2b/wayfinder-enterprise/*)](https://github.com/thunder-id/samples/releases?q=sample%2Fb2b%2Fwayfinder-enterprise&expanded=true) | Next.js travel management app where companies sign up as organizations, manage their team and plug in their own identity provider |

## Contributing

Please refer to the [Contributing Guide](https://thunderid.dev/community/overview) for the different ways to contribute to this project and the relevant guidelines.
Expand Down
33 changes: 33 additions & 0 deletions b2b/wayfinder-enterprise/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## Copy this file to .env.local. Values without NEXT_PUBLIC_ are read only on the server.

# The ThunderID server, and the application the declarative import creates.
NEXT_PUBLIC_THUNDERID_BASE_URL=https://localhost:8090
NEXT_PUBLIC_THUNDERID_CLIENT_ID=WAYFINDER_ENTERPRISE
THUNDERID_CLIENT_SECRET=wayfinder-enterprise-secret
NEXT_PUBLIC_THUNDERID_APPLICATION_ID=019f0a10-0000-7000-8000-000000000031
NEXT_PUBLIC_THUNDERID_AFTER_SIGN_IN_URL=http://localhost:3000
NEXT_PUBLIC_THUNDERID_AFTER_SIGN_OUT_URL=http://localhost:3000
NEXT_PUBLIC_THUNDERID_SCOPES=openid profile email roles ou booking:view booking:create booking:manage policy:view policy:manage user:view user:manage group:view group:manage role:view role:manage sso:view sso:manage

# Encrypts the session cookie. Generate it with `openssl rand -base64 32`.
THUNDERID_SECRET=replace-with-a-long-random-string

# Where the app runs. The admin components reach the backend routes under /api/admin from here.
WAYFINDER_APP_URL=http://localhost:3000

# The resource server whose permissions the app requests.
WAYFINDER_API_RESOURCE=urn:wayfinder-enterprise:api

# Resources the declarative import creates with fixed IDs.
WAYFINDER_SIGN_IN_FLOW_ID=019f0a10-0000-7000-8000-000000000021
WAYFINDER_ADMIN_ROLE_ID=019f0a10-0000-7000-8000-000000000011
WAYFINDER_MEMBER_ROLE_ID=019f0a10-0000-7000-8000-000000000012
WAYFINDER_ADMIN_ROLE_NAME=Wayfinder Admin
WAYFINDER_USER_TYPE=wayfinder-user

# The backend client that calls the root-only management APIs on a company admin's behalf, and the
# resource server that holds the root "system" permission. The app gets the client's token at the
# admin's company's token endpoint (/ou/{ouId}/oauth2/token), so each token names that company.
WAYFINDER_BACKEND_CLIENT_ID=WAYFINDER_ENTERPRISE_BACKEND
WAYFINDER_BACKEND_CLIENT_SECRET=wayfinder-enterprise-backend-secret
THUNDERID_SYSTEM_RESOURCE=https://localhost:8090/mcp
15 changes: 15 additions & 0 deletions b2b/wayfinder-enterprise/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
node_modules

# Next.js
/.next/
/out/
next-env.d.ts
*.tsbuildinfo

# Bookings and travel policies the app stores locally
/data/

# local env files
.env*.local

.DS_Store
Loading
Loading