Skip to content

Commit e016242

Browse files
author
Thomas Potaire
committed
Merge branch 'main' into code-provider-api
2 parents a7e1d22 + f51aa24 commit e016242

File tree

179 files changed

+7146
-2586
lines changed

Some content is hidden

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

179 files changed

+7146
-2586
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Contributing
22

33
To keep all docs in one place, we've moved the contributing guide here:
4-
https://docs.onlook.com/contributing/developers
4+
https://docs.onlook.com/developers
55

66
### Running locally
77

88
To get set up and run Onlook locally, see here:
9-
https://docs.onlook.com/contributing/developers/running-locally
9+
https://docs.onlook.com/developers/running-locally

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ builders.
101101
## Getting Started
102102

103103
Available soon with a [hosted app](https://onlook.com) or
104-
[run locally](https://docs.onlook.com/contributing/developers/running-locally).
104+
[run locally](https://docs.onlook.com/developers/running-locally).
105105

106106
### Usage
107107

@@ -139,8 +139,7 @@ objects, and experiment with layouts.
139139
For full documentation, visit [docs.onlook.com](https://docs.onlook.com)
140140

141141
To see how to Contribute, visit
142-
[Contributing to Onlook](https://docs.onlook.com/contributing/developers) in our
143-
docs.
142+
[Contributing to Onlook](https://docs.onlook.com/developers) in our docs.
144143

145144
## How it works
146145

@@ -159,7 +158,7 @@ displays DOM elements declaratively (e.g. jsx/tsx/html). We are focused on
159158
making it work well with Next.js and TailwindCSS for now.
160159

161160
For a full walkthrough, check out our
162-
[Architecture Docs](https://docs.onlook.com/contributing/developers/architecture).
161+
[Architecture Docs](https://docs.onlook.com/developers/architecture).
163162

164163
### Our Tech Stack
165164

apps/coderouter/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ JWT_SECRET_KEY="Replace this with your own secret"
66

77
# Insert your custom API key here and store in your other backend as well.
88
# It'll be used for server-to-server authentication.
9-
SUPAROUTA_API_KEY=""
9+
CODEROUTER_API_KEY=""
1010

1111
E2B_API_KEY="Get your API key at https://e2b.dev"

apps/coderouter/src/util/auth.ts

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
import { env } from "bun";
2-
import jwt from "jsonwebtoken";
3-
import { z } from "@hono/zod-openapi";
1+
import { env } from 'bun';
2+
import jwt from 'jsonwebtoken';
3+
import { z } from '@hono/zod-openapi';
44

55
export const JwtAuthResponses = {
6-
401: {
7-
content: {
8-
"application/json": {
9-
schema: z.object({ error: z.string() }),
10-
},
6+
401: {
7+
content: {
8+
'application/json': {
9+
schema: z.object({ error: z.string() }),
10+
},
11+
},
12+
description: 'The JWT token is missing or is invalid.',
1113
},
12-
description: "The JWT token is missing or is invalid.",
13-
},
1414
};
1515

1616
export interface AuthJwtPayload {
17-
sandboxId?: string;
18-
userId?: string;
17+
sandboxId?: string;
18+
userId?: string;
1919
}
2020

2121
export function encodeJwtToken(jwtPayload: AuthJwtPayload) {
22-
return jwt.sign(jwtPayload, env.JWT_SECRET_KEY!, {
23-
expiresIn: "1d",
24-
});
22+
return jwt.sign(jwtPayload, env.JWT_SECRET_KEY!, {
23+
expiresIn: '1d',
24+
});
2525
}
2626

2727
export function decodeJwtToken(token: string) {
28-
return jwt.verify(token, env.JWT_SECRET_KEY!);
28+
return jwt.verify(token, env.JWT_SECRET_KEY!);
2929
}
3030

3131
export function verifyApiKeyFromHeader(header?: string) {
32-
const apiKey = header?.toLowerCase().split("bearer ")[1];
33-
if (!apiKey) {
34-
return false;
35-
}
36-
return verifyApiKey(apiKey);
32+
const apiKey = header?.toLowerCase().split('bearer ')[1];
33+
if (!apiKey) {
34+
return false;
35+
}
36+
return verifyApiKey(apiKey);
3737
}
3838

3939
export function verifyApiKey(apiKey: string) {
40-
return apiKey === env.SUPAROUTA_API_KEY;
40+
return apiKey === env.CODEROUTER_API_KEY;
4141
}

apps/web/client/.env.example

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ FIRECRAWL_API_KEY="<Your API Key from https://www.firecrawl.dev/app>"
4242
# Exa - Web Search Tool
4343
EXA_API_KEY="<Your API Key from https://dashboard.exa.ai/api-keys>"
4444

45+
# n8n - Automation webhooks
46+
N8N_WEBHOOK_URL="<Your webhook url>"
47+
N8N_API_KEY="<Your n8n api key>"
48+
49+
# Langfuse - LLM telemetry
50+
LANGFUSE_SECRET_KEY=
51+
LANGFUSE_PUBLIC_KEY=
52+
LANGFUSE_BASEURL=
53+
4554
# ------------- Optional: Alternative LLM providers -------------
4655

4756
# Google AI Studio
@@ -71,5 +80,5 @@ N8N_API_KEY="<Your n8n api key>"
7180

7281
# E2B – Used to host user apps.
7382
E2B_DEFAULT_TEMPLATE_ID="<The template ID used to create sandboxes>"
74-
SUPAROUTA_HOST_URL="<Specify the URL to the hosted coderouter>"
75-
SUPAROUTA_API_KEY="<Copy key when setting up coderouter>"
83+
CODEROUTER_HOST_URL="<Specify the URL to the hosted coderouter>"
84+
CODEROUTER_API_KEY="<Copy key when setting up coderouter>"

apps/web/client/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ yarn-error.log*
4949
.mastra/
5050

5151
# Ignore preload script changes unless the script should be updated. Uncomment to update.
52-
/public/onlook-preload-script.js
52+
/public/onlook-preload-script.*

apps/web/client/messages/en.d.json.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ declare const messages: {
9494
"google": "Login with Google",
9595
"lastUsed": "You used this last time",
9696
"loginToEdit": "Login to Edit",
97-
"shareProjects": "Share projects, collaborate, and design more in code."
97+
"shareProjects": "No credit card required • Get a site in seconds"
9898
},
9999
"terms": {
100100
"agreement": "By signing up, you agree to our",
@@ -246,6 +246,9 @@ declare const messages: {
246246
},
247247
"miniChat": {
248248
"button": "Chat with AI"
249+
},
250+
"openInCode": {
251+
"button": "Open in Code"
249252
}
250253
},
251254
"styles": {

apps/web/client/messages/en.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
"google": "Login with Google",
9292
"lastUsed": "You used this last time",
9393
"loginToEdit": "Login to Edit",
94-
"shareProjects": "Share projects, collaborate, and design more in code."
94+
"shareProjects": "No credit card required • Get a site in seconds"
9595
},
9696
"terms": {
9797
"agreement": "By signing up, you agree to our",
@@ -243,6 +243,9 @@
243243
},
244244
"miniChat": {
245245
"button": "Chat with AI"
246+
},
247+
"openInCode": {
248+
"button": "Open in Code"
246249
}
247250
},
248251
"styles": {

apps/web/client/messages/es.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
"google": "Iniciar sesión con Google",
9292
"lastUsed": "Usó esto la última vez",
9393
"loginToEdit": "Iniciar sesión para Editar",
94-
"shareProjects": "Comparta proyectos, colabore y diseñe más en código."
94+
"shareProjects": "Sin tarjeta de crédito • Crea un sitio en segundos"
9595
},
9696
"terms": {
9797
"agreement": "Al registrarse, acepta nuestra",
@@ -243,6 +243,9 @@
243243
},
244244
"miniChat": {
245245
"button": "Chatear con IA"
246+
},
247+
"openInCode": {
248+
"button": "Abrir en Code"
246249
}
247250
},
248251
"styles": {

apps/web/client/messages/ja.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@
141141
},
142142
"miniChat": {
143143
"button": "AIとチャット"
144+
},
145+
"openInCode": {
146+
"button": "コードで開く"
144147
}
145148
},
146149
"styles": {
@@ -314,7 +317,7 @@
314317
"google": "Googleでログイン",
315318
"lastUsed": "最後に使用したアカウント",
316319
"loginToEdit": "編集するにはログインしてください",
317-
"shareProjects": "プロジェクトを共有し、コラボレーションし、コードでより多くのデザインを。"
320+
"shareProjects": "クレジットカード不要 • サイトを秒で作成"
318321
},
319322
"terms": {
320323
"agreement": "サインアップすることで、以下に同意したとみなされます",

0 commit comments

Comments
 (0)