Add Turso/Vercel deployment configuration

- Updated database connection to support Turso auth token
- Added vercel.json with bun build configuration
- Updated environment schema for production deployment
- Added new features and components for production readiness
This commit is contained in:
2025-07-12 01:42:43 -04:00
parent 2d217fab47
commit a1b40e7a9c
75 changed files with 8821 additions and 1803 deletions
@@ -0,0 +1,11 @@
"use client";
import { BusinessForm } from "~/components/business-form";
import { useParams } from "next/navigation";
export default function EditBusinessPage() {
const params = useParams();
const businessId = Array.isArray(params?.id) ? params.id[0] : params?.id;
if (!businessId) return null;
return <BusinessForm businessId={businessId} mode="edit" />;
}
@@ -0,0 +1,15 @@
"use client";
import { api } from "~/trpc/react";
import { UniversalTable } from "~/components/ui/universal-table";
import { TableSkeleton } from "~/components/ui/skeleton";
export function BusinessesTable() {
const { isLoading } = api.businesses.getAll.useQuery();
if (isLoading) {
return <TableSkeleton rows={8} />;
}
return <UniversalTable resource="businesses" />;
}
@@ -0,0 +1,5 @@
import { BusinessForm } from "~/components/business-form";
export default function NewBusinessPage() {
return <BusinessForm mode="create" />;
}
+35
View File
@@ -0,0 +1,35 @@
import Link from "next/link";
import { api, HydrateClient } from "~/trpc/server";
import { Button } from "~/components/ui/button";
import { Plus } from "lucide-react";
import { BusinessesTable } from "./_components/businesses-table";
export default async function BusinessesPage() {
return (
<div>
<div className="mb-8 flex flex-col gap-4 md:flex-row md:items-center md:justify-between">
<div>
<h1 className="bg-gradient-to-r from-emerald-600 to-teal-600 bg-clip-text text-3xl font-bold text-transparent">
Businesses
</h1>
<p className="mt-1 text-lg text-gray-600">
Manage your businesses and their information.
</p>
</div>
<Button
asChild
size="lg"
className="bg-gradient-to-r from-emerald-600 to-teal-600 font-medium text-white shadow-lg hover:from-emerald-700 hover:to-teal-700 hover:shadow-xl"
>
<Link href="/dashboard/businesses/new">
<Plus className="mr-2 h-5 w-5" /> Add Business
</Link>
</Button>
</div>
<HydrateClient>
<BusinessesTable />
</HydrateClient>
</div>
);
}