Skip to content

Commit caf080d

Browse files
committed
merge main
2 parents d5099c4 + 46ce8ce commit caf080d

File tree

556 files changed

+23409
-6756
lines changed

Some content is hidden

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

556 files changed

+23409
-6756
lines changed

CLAUDE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- This is a Bun workspace, only use bun, not npm
2+
- Unit tests can be ran with bun test
3+
- Run type checking with `cd apps/web/client && bun run typecheck`

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
@@ -100,7 +100,7 @@ builders.
100100
## Getting Started
101101

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

105105
### Usage
106106

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

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

144143
## How it works
145144

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

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

163162
### Our Tech Stack
164163

apps/backend/supabase/migrations/0000_same_human_robot.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ END $$;--> statement-breakpoint
77
DO $$
88
BEGIN
99
IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'role') THEN
10-
CREATE TYPE "public"."role" AS ENUM('user', 'assistant', 'system');
10+
CREATE TYPE "public"."message_role" AS ENUM('user', 'assistant');
1111
END IF;
1212
END $$;--> statement-breakpoint
1313
CREATE TABLE IF NOT EXISTS "canvas" (
@@ -44,7 +44,7 @@ CREATE TABLE IF NOT EXISTS "messages" (
4444
"conversation_id" uuid NOT NULL,
4545
"content" text NOT NULL,
4646
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
47-
"role" "role" NOT NULL,
47+
"role" "message_role" NOT NULL,
4848
"applied" boolean DEFAULT false NOT NULL,
4949
"snapshots" jsonb DEFAULT '{}'::jsonb NOT NULL,
5050
"context" jsonb DEFAULT '[]'::jsonb NOT NULL,
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
CREATE TABLE "rate_limits" (
2+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
3+
"user_id" uuid NOT NULL,
4+
"subscription_id" uuid NOT NULL,
5+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
6+
"started_at" timestamp with time zone NOT NULL,
7+
"ended_at" timestamp with time zone NOT NULL,
8+
"max" integer NOT NULL,
9+
"left" integer DEFAULT 0 NOT NULL,
10+
"carry_over_key" uuid NOT NULL,
11+
"carry_over_total" integer DEFAULT 0 NOT NULL,
12+
"stripe_subscription_item_id" text NOT NULL
13+
);
14+
--> statement-breakpoint
15+
ALTER TABLE "rate_limits" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint
16+
ALTER TABLE "messages" ALTER COLUMN "applied" DROP DEFAULT;--> statement-breakpoint
17+
ALTER TABLE "messages" ALTER COLUMN "applied" DROP NOT NULL;--> statement-breakpoint
18+
ALTER TABLE "messages" ALTER COLUMN "snapshots" DROP DEFAULT;--> statement-breakpoint
19+
ALTER TABLE "messages" ALTER COLUMN "snapshots" DROP NOT NULL;--> statement-breakpoint
20+
ALTER TABLE "conversations" ADD COLUMN "suggestions" jsonb DEFAULT '[]'::jsonb;--> statement-breakpoint
21+
ALTER TABLE "messages" ADD COLUMN "checkpoints" jsonb DEFAULT '[]'::jsonb NOT NULL;--> statement-breakpoint
22+
ALTER TABLE "subscriptions" ADD COLUMN "stripe_current_period_start" timestamp with time zone NOT NULL;--> statement-breakpoint
23+
ALTER TABLE "subscriptions" ADD COLUMN "stripe_current_period_end" timestamp with time zone NOT NULL;--> statement-breakpoint
24+
ALTER TABLE "users" ADD COLUMN "stripe_customer_id" text;--> statement-breakpoint
25+
ALTER TABLE "rate_limits" ADD CONSTRAINT "rate_limits_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
26+
ALTER TABLE "rate_limits" ADD CONSTRAINT "rate_limits_subscription_id_subscriptions_id_fk" FOREIGN KEY ("subscription_id") REFERENCES "public"."subscriptions"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
27+
CREATE INDEX "rate_limits_user_time_idx" ON "rate_limits" USING btree ("user_id","started_at","ended_at");--> statement-breakpoint
28+
CREATE INDEX "usage_records_user_time_idx" ON "usage_records" USING btree ("user_id","timestamp");--> statement-breakpoint

0 commit comments

Comments
 (0)