From 299d57db5185eabb7d0baa157bbba907310d919d Mon Sep 17 00:00:00 2001 From: snehasishcodes Date: Fri, 4 Sep 2026 23:12:44 +0530 Subject: [PATCH 1/2] feat(web): add built-with-crosscode project showcase to feedback form --- apps/web/drizzle/0003_dusty_betty_ross.sql | 3 + apps/web/drizzle/meta/0003_snapshot.json | 963 ++++++++++++++++++ apps/web/drizzle/meta/_journal.json | 7 + apps/web/src/app/api/beta/feedback/route.ts | 3 + .../web/src/components/beta/feedback-form.tsx | 12 + apps/web/src/lib/db/schema.ts | 3 + 6 files changed, 991 insertions(+) create mode 100644 apps/web/drizzle/0003_dusty_betty_ross.sql create mode 100644 apps/web/drizzle/meta/0003_snapshot.json diff --git a/apps/web/drizzle/0003_dusty_betty_ross.sql b/apps/web/drizzle/0003_dusty_betty_ross.sql new file mode 100644 index 0000000..745d2e9 --- /dev/null +++ b/apps/web/drizzle/0003_dusty_betty_ross.sql @@ -0,0 +1,3 @@ +ALTER TABLE "beta_feedback" ADD COLUMN "project_name" text;--> statement-breakpoint +ALTER TABLE "beta_feedback" ADD COLUMN "project_desc" text;--> statement-breakpoint +ALTER TABLE "beta_feedback" ADD COLUMN "project_link" text; \ No newline at end of file diff --git a/apps/web/drizzle/meta/0003_snapshot.json b/apps/web/drizzle/meta/0003_snapshot.json new file mode 100644 index 0000000..d2c728c --- /dev/null +++ b/apps/web/drizzle/meta/0003_snapshot.json @@ -0,0 +1,963 @@ +{ + "id": "e721ae78-37fd-4b1a-b8ca-c02d4074f540", + "prevId": "f104a067-d8d6-4762-a463-7ece6041d12e", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.account": { + "name": "account", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "account_id": { + "name": "account_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "access_token": { + "name": "access_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "refresh_token": { + "name": "refresh_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "id_token": { + "name": "id_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "access_token_expires_at": { + "name": "access_token_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "refresh_token_expires_at": { + "name": "refresh_token_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "scope": { + "name": "scope", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "account_user_id_user_id_fk": { + "name": "account_user_id_user_id_fk", + "tableFrom": "account", + "tableTo": "user", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.account_notification_settings": { + "name": "account_notification_settings", + "schema": "", + "columns": { + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "agent_response_completed": { + "name": "agent_response_completed", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "agent_question_interruption": { + "name": "agent_question_interruption", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "agent_permission_interruption": { + "name": "agent_permission_interruption", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "agent_error_interruption": { + "name": "agent_error_interruption", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "account_notification_settings_user_id_user_id_fk": { + "name": "account_notification_settings_user_id_user_id_fk", + "tableFrom": "account_notification_settings", + "tableTo": "user", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.beta_feedback": { + "name": "beta_feedback", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "tester_id": { + "name": "tester_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "app_version": { + "name": "app_version", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "device_model": { + "name": "device_model", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "android_version": { + "name": "android_version", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "pc_os": { + "name": "pc_os", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "flows_tested": { + "name": "flows_tested", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "rating_overall": { + "name": "rating_overall", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "rating_ux": { + "name": "rating_ux", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "rating_perf": { + "name": "rating_perf", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "bugs": { + "name": "bugs", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "fav": { + "name": "fav", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "missing": { + "name": "missing", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "keep_using": { + "name": "keep_using", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "project_name": { + "name": "project_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "project_desc": { + "name": "project_desc", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "project_link": { + "name": "project_link", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "testimonial": { + "name": "testimonial", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "testimonial_opt_in": { + "name": "testimonial_opt_in", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "beta_feedback_tester_id_beta_tester_id_fk": { + "name": "beta_feedback_tester_id_beta_tester_id_fk", + "tableFrom": "beta_feedback", + "tableTo": "beta_tester", + "columnsFrom": [ + "tester_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.beta_tester": { + "name": "beta_tester", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "play_email": { + "name": "play_email", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "device_model": { + "name": "device_model", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "android_version": { + "name": "android_version", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'invited'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "beta_tester_email_unique": { + "name": "beta_tester_email_unique", + "nullsNotDistinct": false, + "columns": [ + "email" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.device_session": { + "name": "device_session", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "device_name": { + "name": "device_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "device_session_user_id_user_id_fk": { + "name": "device_session_user_id_user_id_fk", + "tableFrom": "device_session", + "tableTo": "user", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "device_session_token_unique": { + "name": "device_session_token_unique", + "nullsNotDistinct": false, + "columns": [ + "token" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.dodo_webhook_event": { + "name": "dodo_webhook_event", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "processed_at": { + "name": "processed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.push_device": { + "name": "push_device", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "device_session_id": { + "name": "device_session_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "expo_push_token": { + "name": "expo_push_token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "platform": { + "name": "platform", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "device_name": { + "name": "device_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "push_device_user_id_user_id_fk": { + "name": "push_device_user_id_user_id_fk", + "tableFrom": "push_device", + "tableTo": "user", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "push_device_device_session_id_device_session_id_fk": { + "name": "push_device_device_session_id_device_session_id_fk", + "tableFrom": "push_device", + "tableTo": "device_session", + "columnsFrom": [ + "device_session_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "push_device_expo_push_token_unique": { + "name": "push_device_expo_push_token_unique", + "nullsNotDistinct": false, + "columns": [ + "expo_push_token" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.session": { + "name": "session", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "ip_address": { + "name": "ip_address", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "session_user_id_user_id_fk": { + "name": "session_user_id_user_id_fk", + "tableFrom": "session", + "tableTo": "user", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "session_token_unique": { + "name": "session_token_unique", + "nullsNotDistinct": false, + "columns": [ + "token" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user": { + "name": "user", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email_verified": { + "name": "email_verified", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "image": { + "name": "image", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tier": { + "name": "tier", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'free'" + }, + "api_key": { + "name": "api_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "dodo_customer_id": { + "name": "dodo_customer_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "dodo_subscription_id": { + "name": "dodo_subscription_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "subscription_status": { + "name": "subscription_status", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "subscription_product_id": { + "name": "subscription_product_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "subscription_renews_at": { + "name": "subscription_renews_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "subscription_cancel_at_period_end": { + "name": "subscription_cancel_at_period_end", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "user_email_unique": { + "name": "user_email_unique", + "nullsNotDistinct": false, + "columns": [ + "email" + ] + }, + "user_api_key_unique": { + "name": "user_api_key_unique", + "nullsNotDistinct": false, + "columns": [ + "api_key" + ] + }, + "user_dodo_customer_id_unique": { + "name": "user_dodo_customer_id_unique", + "nullsNotDistinct": false, + "columns": [ + "dodo_customer_id" + ] + }, + "user_dodo_subscription_id_unique": { + "name": "user_dodo_subscription_id_unique", + "nullsNotDistinct": false, + "columns": [ + "dodo_subscription_id" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.verification": { + "name": "verification", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "identifier": { + "name": "identifier", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.waitlist": { + "name": "waitlist", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "waitlist_email_unique": { + "name": "waitlist_email_unique", + "nullsNotDistinct": false, + "columns": [ + "email" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": {}, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/apps/web/drizzle/meta/_journal.json b/apps/web/drizzle/meta/_journal.json index 4b4a3f7..4644a57 100644 --- a/apps/web/drizzle/meta/_journal.json +++ b/apps/web/drizzle/meta/_journal.json @@ -22,6 +22,13 @@ "when": 1788541556882, "tag": "0002_foamy_silver_sable", "breakpoints": true + }, + { + "idx": 3, + "version": "7", + "when": 1788543710879, + "tag": "0003_dusty_betty_ross", + "breakpoints": true } ] } \ No newline at end of file diff --git a/apps/web/src/app/api/beta/feedback/route.ts b/apps/web/src/app/api/beta/feedback/route.ts index ded206d..82cd00c 100644 --- a/apps/web/src/app/api/beta/feedback/route.ts +++ b/apps/web/src/app/api/beta/feedback/route.ts @@ -102,6 +102,9 @@ export async function POST(request: Request) { fav: String(body?.fav ?? "").slice(0, 2000) || null, missing: String(body?.missing ?? "").slice(0, 2000) || null, keepUsing: ["yes", "maybe", "no"].includes(body?.keepUsing) ? body.keepUsing : null, + projectName: String(body?.projectName ?? "").slice(0, 100) || null, + projectDesc: String(body?.projectDesc ?? "").slice(0, 2000) || null, + projectLink: String(body?.projectLink ?? "").slice(0, 500) || null, testimonial: String(body?.testimonial ?? "").slice(0, 2000) || null, testimonialOptIn: Boolean(body?.testimonialOptIn), }) diff --git a/apps/web/src/components/beta/feedback-form.tsx b/apps/web/src/components/beta/feedback-form.tsx index 6b1283e..a557607 100644 --- a/apps/web/src/components/beta/feedback-form.tsx +++ b/apps/web/src/components/beta/feedback-form.tsx @@ -100,6 +100,9 @@ export function FeedbackForm() { fav: data.get("fav"), missing: data.get("missing"), keepUsing: data.get("keepUsing"), + projectName: data.get("projectName"), + projectDesc: data.get("projectDesc"), + projectLink: data.get("projectLink"), testimonial: data.get("testimonial"), testimonialOptIn: true, }), @@ -225,6 +228,15 @@ export function FeedbackForm() { +
+

I built a project

+

Shipped something with CrossCode? Show it off. Leave empty if not.

+
+ +