Skip to content

Commit a6d0d63

Browse files
authored
ui (#2314)
* ui * add env example * adjust favicon * rename backend env variabel and document env example * address comments
1 parent 82283f1 commit a6d0d63

File tree

123 files changed

+9808
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+9808
-0
lines changed

ui/.env.example

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Set these values if you wish to authenticate with workOS
2+
WORKOS_REDIRECT_URI=http://localhost:3000/api/auth/callback
3+
WORKOS_API_KEY='<YOUR_API_KEY>'
4+
WORKOS_CLIENT_ID='<YOUR_CLIENT_ID>'
5+
WORKOS_COOKIE_PASSWORD='<YOUR_COOKIE_PASSWORD>'
6+
7+
# VCS Orchestrator settings (previously digger service)
8+
ORCHESTRATOR_BACKEND_URL="http://localhost:3000"
9+
ORCHESTRATOR_BACKEND_SECRET=abc123

ui/.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.netlify/
2+
dist/
3+
node_modules/
4+
package-lock.json
5+
yarn.lock
6+
7+
.DS_Store
8+
.cache
9+
.env
10+
.env.local
11+
!.env.example
12+
.vercel
13+
.output
14+
15+
/build/
16+
/api/
17+
/server/build
18+
/public/build

ui/.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
**/build
2+
**/public
3+
pnpm-lock.yaml
4+
src/routeTree.gen.ts

ui/README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# TanStack Start + WorkOS
2+
3+
This site is built with TanStack Router! An example application demonstrating how to authenticate users with AuthKit and the WorkOS Node SDK.
4+
5+
- [TanStack Router Docs](https://tanstack.com/router)
6+
7+
## Prerequisites
8+
9+
You will need a [WorkOS account](https://dashboard.workos.com/signup).
10+
11+
## Running the example
12+
13+
1. In the [WorkOS dashboard](https://dashboard.workos.com), click on the User Management tile and set up the [sign-in callback redirect](https://workos.com/docs/user-management/1-configure-your-project/configure-a-redirect-uri) as `http://localhost:3000/api/auth/callback`. Once completed, set the app homepage URL to `http://localhost:3000`.
14+
15+
> [!NOTE]
16+
> If you already have set up an application in your WorkOS dashboard, then you can simply head to the _Redirects_ tab and add a new redirect URI.
17+
18+
2. After creating the redirect URI, navigate to the API keys tab and copy the _Client ID_ and the _Secret Key_. Rename the `.env.example` file to `.env` and supply your Client ID and API key as environment variables.
19+
20+
3. Additionally, create a cookie password as the private key used to encrypt the session cookie. Copy the output into the environment variable `WORKOS_COOKIE_PASSWORD`.
21+
22+
It has to be at least 32 characters long. You can use https://1password.com/password-generator/ to generate strong passwords.
23+
24+
4. Verify your `.env.local` file has the following variables filled.
25+
26+
```bash
27+
WORKOS_CLIENT_ID=<YOUR_CLIENT_ID>
28+
WORKOS_API_KEY=<YOUR_API_SECRET_KEY>
29+
WORKOS_COOKIE_PASSWORD=<YOUR_COOKIE_PASSWORD>
30+
WORKOS_REDIRECT_URI=http://localhost:3000/callback
31+
```
32+
33+
`WORKOS_COOKIE_PASSWORD` is the private key used to encrypt the session cookie. It has to be at least 32 characters long. You can use the [1Password generator](https://1password.com/password-generator/) or the `openssl` library to generate a strong password via the command line:
34+
35+
```bash
36+
openssl rand -base64 24
37+
```
38+
39+
To use the `signOut` method, you'll need to set a default Logout URI in your WorkOS dashboard settings under "Redirects".
40+
41+
5. Run the following command and navigate to [http://localhost:3000](http://localhost:3000).
42+
43+
```bash
44+
pnpm dev
45+
```

ui/components.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "default",
4+
"rsc": true,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "tailwind.config.ts",
8+
"css": "app/globals.css",
9+
"baseColor": "neutral",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"aliases": {
14+
"components": "@/components",
15+
"utils": "@/lib/utils",
16+
"ui": "@/components/ui",
17+
"lib": "@/lib",
18+
"hooks": "@/hooks"
19+
},
20+
"iconLibrary": "lucide"
21+
}

ui/netlify.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build]
2+
command = "vite build"
3+
publish = "dist/client"

ui/package.json

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
{
2+
"name": "opentaco",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"type": "module",
7+
"scripts": {
8+
"dev": "vite dev",
9+
"build": "vite build && tsc --noEmit",
10+
"preview": "vite preview"
11+
},
12+
"keywords": [],
13+
"author": "",
14+
"license": "MIT",
15+
"dependencies": {
16+
"@radix-ui/react-accordion": "^1.2.12",
17+
"@radix-ui/react-alert-dialog": "^1.1.15",
18+
"@radix-ui/react-aspect-ratio": "^1.1.7",
19+
"@radix-ui/react-avatar": "^1.1.10",
20+
"@radix-ui/react-checkbox": "^1.3.3",
21+
"@radix-ui/react-collapsible": "^1.1.12",
22+
"@radix-ui/react-context-menu": "^2.2.16",
23+
"@radix-ui/react-dialog": "^1.1.15",
24+
"@radix-ui/react-dropdown-menu": "^2.1.16",
25+
"@radix-ui/react-hover-card": "^1.1.15",
26+
"@radix-ui/react-label": "^2.1.7",
27+
"@radix-ui/react-menubar": "^1.1.16",
28+
"@radix-ui/react-navigation-menu": "^1.2.14",
29+
"@radix-ui/react-popover": "^1.1.15",
30+
"@radix-ui/react-progress": "^1.1.7",
31+
"@radix-ui/react-radio-group": "^1.3.8",
32+
"@radix-ui/react-scroll-area": "^1.2.10",
33+
"@radix-ui/react-select": "^2.2.6",
34+
"@radix-ui/react-separator": "^1.1.7",
35+
"@radix-ui/react-slider": "^1.3.6",
36+
"@radix-ui/react-slot": "^1.2.3",
37+
"@radix-ui/react-switch": "^1.2.6",
38+
"@radix-ui/react-tabs": "^1.1.13",
39+
"@radix-ui/react-toast": "^1.2.15",
40+
"@radix-ui/react-toggle": "^1.1.10",
41+
"@radix-ui/react-toggle-group": "^1.1.11",
42+
"@radix-ui/react-tooltip": "^1.2.8",
43+
"@radix-ui/themes": "^3.2.1",
44+
"@stripe/stripe-js": "^8.0.0",
45+
"@tanstack/react-router": "^1.132.47",
46+
"@tanstack/react-router-devtools": "^1.132.51",
47+
"@tanstack/react-start": "^1.132.51",
48+
"@workos-inc/node": "^7.45.0",
49+
"class-variance-authority": "^0.7.1",
50+
"clsx": "^2.1.1",
51+
"cmdk": "^1.1.1",
52+
"embla-carousel-react": "^8.6.0",
53+
"input-otp": "^1.4.2",
54+
"iron-session": "^8.0.4",
55+
"jose": "^6.0.10",
56+
"lucide-react": "^0.545.0",
57+
"next-themes": "^0.4.6",
58+
"posthog-js": "^1.273.1",
59+
"posthog-node": "^5.9.5",
60+
"react": "^19.0.0",
61+
"react-day-picker": "^9.11.0",
62+
"react-dom": "^19.0.0",
63+
"recharts": "^3.2.1",
64+
"sonner": "^2.0.7",
65+
"tailwind-merge": "^3.3.1",
66+
"tailwindcss-animate": "^1.0.7"
67+
},
68+
"devDependencies": {
69+
"@netlify/vite-plugin-tanstack-start": "^1.0.2",
70+
"@types/react": "^19.0.8",
71+
"@types/react-dom": "^19.0.3",
72+
"@vitejs/plugin-react": "^4.3.4",
73+
"autoprefixer": "^10.4.20",
74+
"postcss": "^8.5.1",
75+
"tailwindcss": "^3.4.17",
76+
"typescript": "^5.7.2",
77+
"vite": "^7.1.7",
78+
"vite-tsconfig-paths": "^5.1.4",
79+
"wrangler": "^4.40.2"
80+
}
81+
}

ui/postcss.config.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/** @type {import('postcss-load-config').Config} */
2+
const config = {
3+
plugins: {
4+
tailwindcss: {},
5+
},
6+
};
7+
8+
export default config;

ui/prettier.config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* @see https://prettier.io/docs/configuration
3+
* @type {import('prettier').Config}
4+
*/
5+
const config = {
6+
trailingComma: 'all',
7+
tabWidth: 2,
8+
semi: true,
9+
singleQuote: true,
10+
printWidth: 120,
11+
};
12+
13+
export default config;

ui/public/favicon.png

76.2 KB
Loading

0 commit comments

Comments
 (0)