small changes
This commit is contained in:
parent
561a284fc9
commit
f35e5debff
4938
backend/database/package-lock.json
generated
Normal file
4938
backend/database/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -222,6 +222,13 @@ export default {
|
||||
|
||||
const res = await db.insert(user).values({ id, name, email }).returning().get();
|
||||
return json({ res });
|
||||
} else if (method === "DELETE") {
|
||||
const params = url.searchParams;
|
||||
if (params.has("id")) {
|
||||
const id = params.get("id") as string;
|
||||
await db.delete(user).where(eq(user.id, id));
|
||||
return success;
|
||||
} else return invalidRequest;
|
||||
} else {
|
||||
return methodNotAllowed;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
|
||||
@layer base {
|
||||
:root {
|
||||
--background: 0 0% 100%;
|
||||
@ -9,63 +9,63 @@
|
||||
|
||||
--card: 0 0% 100%;
|
||||
--card-foreground: 0 0% 3.9%;
|
||||
|
||||
|
||||
--popover: 0 0% 100%;
|
||||
--popover-foreground: 0 0% 3.9%;
|
||||
|
||||
|
||||
--primary: 0 0% 9%;
|
||||
--primary-foreground: 0 0% 98%;
|
||||
|
||||
|
||||
--secondary: 0 0% 96.1%;
|
||||
--secondary-foreground: 0 0% 9%;
|
||||
|
||||
|
||||
--muted: 0 0% 96.1%;
|
||||
--muted-foreground: 0 0% 45.1%;
|
||||
|
||||
|
||||
--accent: 0 0% 96.1%;
|
||||
--accent-foreground: 0 0% 9%;
|
||||
|
||||
|
||||
--destructive: 0 84.2% 60.2%;
|
||||
--destructive-foreground: 0 0% 98%;
|
||||
|
||||
--border: 0 0% 89.8%;
|
||||
--input: 0 0% 89.8%;
|
||||
--ring: 0 0% 3.9%;
|
||||
|
||||
|
||||
--radius: 0.5rem;
|
||||
}
|
||||
|
||||
|
||||
.dark {
|
||||
--background: 0 0% 3.9%;
|
||||
--foreground: 0 0% 98%;
|
||||
|
||||
|
||||
--card: 0 0% 3.9%;
|
||||
--card-foreground: 0 0% 98%;
|
||||
|
||||
|
||||
--popover: 0 0% 3.9%;
|
||||
--popover-foreground: 0 0% 98%;
|
||||
|
||||
|
||||
--primary: 0 0% 98%;
|
||||
--primary-foreground: 0 0% 9%;
|
||||
|
||||
|
||||
--secondary: 0 0% 14.9%;
|
||||
--secondary-foreground: 0 0% 98%;
|
||||
|
||||
|
||||
--muted: 0 0% 14.9%;
|
||||
--muted-foreground: 0 0% 63.9%;
|
||||
|
||||
|
||||
--accent: 0 0% 14.9%;
|
||||
--accent-foreground: 0 0% 98%;
|
||||
|
||||
|
||||
--destructive: 0 62.8% 60%;
|
||||
--destructive-foreground: 0 0% 98%;
|
||||
|
||||
|
||||
--border: 0 0% 14.9%;
|
||||
--input: 0 0% 14.9%;
|
||||
--ring: 0 0% 83.1%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@layer base {
|
||||
* {
|
||||
@apply border-border;
|
||||
@ -76,19 +76,31 @@
|
||||
}
|
||||
|
||||
.gradient-button-bg {
|
||||
background: radial-gradient(circle at top, #a5b4fc 0%, #3730a3 50%); /* violet 300 -> 800 */
|
||||
background: radial-gradient(
|
||||
circle at top,
|
||||
#a5b4fc 0%,
|
||||
#3730a3 50%
|
||||
); /* violet 300 -> 800 */
|
||||
}
|
||||
|
||||
.gradient-button {
|
||||
background: radial-gradient(circle at bottom, #312e81 -10%, hsl(0 0% 3.9%) 50%); /* violet 900 -> bg */
|
||||
background: radial-gradient(
|
||||
circle at bottom,
|
||||
#312e81 -10%,
|
||||
hsl(0 0% 3.9%) 50%
|
||||
); /* violet 900 -> bg */
|
||||
}
|
||||
|
||||
.gradient-button-bg > div:hover {
|
||||
background: radial-gradient(circle at bottom, #312e81 -10%, hsl(0 0% 3.9%) 80%); /* violet 900 -> bg */
|
||||
background: radial-gradient(
|
||||
circle at bottom,
|
||||
#312e81 -10%,
|
||||
hsl(0 0% 3.9%) 80%
|
||||
); /* violet 900 -> bg */
|
||||
}
|
||||
|
||||
.inline-decoration::before {
|
||||
content: 'Generate';
|
||||
content: "Generate";
|
||||
color: #525252;
|
||||
/* border: 1px solid #525252; */
|
||||
/* padding: 2px 4px; */
|
||||
@ -96,7 +108,7 @@
|
||||
margin-left: 36px;
|
||||
}
|
||||
.inline-decoration::after {
|
||||
content: '⌘G';
|
||||
content: "⌘G";
|
||||
color: #525252;
|
||||
border: 1px solid #525252;
|
||||
border-bottom-width: 2px;
|
||||
@ -143,4 +155,4 @@
|
||||
|
||||
.tab-scroll::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
@ -1,62 +1,13 @@
|
||||
import Image from "next/image"
|
||||
import Logo from "@/assets/logo.svg"
|
||||
import XLogo from "@/assets/x.svg"
|
||||
import Button from "@/components/ui/customButton"
|
||||
import { ChevronRight } from "lucide-react"
|
||||
import Link from "next/link"
|
||||
import { currentUser } from "@clerk/nextjs"
|
||||
import { redirect } from "next/navigation"
|
||||
import { currentUser } from "@clerk/nextjs";
|
||||
import { redirect } from "next/navigation";
|
||||
import Landing from "@/components/landing";
|
||||
|
||||
export default async function Home() {
|
||||
const user = await currentUser()
|
||||
const user = await currentUser();
|
||||
|
||||
if (user) {
|
||||
redirect("/dashboard")
|
||||
redirect("/dashboard");
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="w-screen h-screen flex justify-center overflow-hidden overscroll-none">
|
||||
<div className="w-full max-w-screen-md px-8 flex flex-col items-center">
|
||||
<div className="w-full flex items-center justify-between py-8">
|
||||
<div className="flex items-center font-medium">
|
||||
<Image
|
||||
src={Logo}
|
||||
alt="Logo"
|
||||
width={36}
|
||||
height={36}
|
||||
className="mr-2"
|
||||
/>
|
||||
</div>
|
||||
<div className="flex items-center space-x-4">
|
||||
<a href="https://www.x.com/ishaandey_" target="_blank">
|
||||
<Image src={XLogo} alt="X Logo" width={18} height={18} />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<h1 className="text-2xl font-medium text-center mt-16">
|
||||
A Collaborative, AI-Powered, Auto-Scaling Code Editor
|
||||
</h1>
|
||||
<div className="text-muted-foreground mt-4 text-center ">
|
||||
Sandbox is an open-source cloud-based code editing environment with
|
||||
custom AI code autocompletion and real-time collaboration. The
|
||||
infrastructure runs on Docker and Kubernetes to scale automatically
|
||||
based on resource usage.
|
||||
</div>
|
||||
<div className="mt-8 flex space-x-4">
|
||||
<Link href="/sign-up">
|
||||
<Button>Go To App</Button>
|
||||
</Link>
|
||||
<a
|
||||
href="https://github.com/ishaan1013/sandbox"
|
||||
target="_blank"
|
||||
className="group h-9 px-4 py-2 inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"
|
||||
>
|
||||
GitHub Repository
|
||||
<ChevronRight className="h-4 w-4 ml-1 transition-all group-hover:translate-x-1" />
|
||||
</a>
|
||||
</div>
|
||||
<div className="aspect-video w-full rounded-lg bg-neutral-800 mt-12"></div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
return <Landing />;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
"use client"
|
||||
"use client";
|
||||
|
||||
import {
|
||||
Dialog,
|
||||
@ -7,19 +7,19 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from "@/components/ui/dialog"
|
||||
import Image from "next/image"
|
||||
import { useState } from "react"
|
||||
} from "@/components/ui/dialog";
|
||||
import Image from "next/image";
|
||||
import { useState } from "react";
|
||||
|
||||
import { Button } from "../ui/button"
|
||||
import { ChevronRight } from "lucide-react"
|
||||
import { Button } from "../ui/button";
|
||||
import { ChevronRight } from "lucide-react";
|
||||
|
||||
export default function AboutModal({
|
||||
open,
|
||||
setOpen,
|
||||
}: {
|
||||
open: boolean
|
||||
setOpen: (open: boolean) => void
|
||||
open: boolean;
|
||||
setOpen: (open: boolean) => void;
|
||||
}) {
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={setOpen}>
|
||||
@ -30,10 +30,10 @@ export default function AboutModal({
|
||||
<div className="text-sm text-muted-foreground">
|
||||
Sandbox is an open-source cloud-based code editing environment with
|
||||
custom AI code autocompletion and real-time collaboration. The
|
||||
infrastructure runs on Docker and Kubernetes to scale automatically
|
||||
based on resource usage.
|
||||
infrastructure runs on Docker and AWS ECS to scale automatically based
|
||||
on resource usage.
|
||||
</div>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -117,7 +117,11 @@ export default function Dashboard({
|
||||
</div>
|
||||
</div>
|
||||
{screen === "projects" ? (
|
||||
<DashboardProjects sandboxes={sandboxes} q={q} />
|
||||
<>
|
||||
{sandboxes ? (
|
||||
<DashboardProjects sandboxes={sandboxes} q={q} />
|
||||
) : null}
|
||||
</>
|
||||
) : screen === "shared" ? (
|
||||
<DashboardSharedWithMe shared={shared} />
|
||||
) : screen === "settings" ? null : null}
|
||||
|
54
frontend/components/landing/index.tsx
Normal file
54
frontend/components/landing/index.tsx
Normal file
@ -0,0 +1,54 @@
|
||||
import Image from "next/image";
|
||||
import Logo from "@/assets/logo.svg";
|
||||
import XLogo from "@/assets/x.svg";
|
||||
import Button from "@/components/ui/customButton";
|
||||
import { ChevronRight } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
|
||||
export default function Landing() {
|
||||
return (
|
||||
<div className="w-screen h-screen flex justify-center overflow-hidden overscroll-none">
|
||||
<div className="w-full max-w-screen-md px-8 flex flex-col items-center relative">
|
||||
<div className="w-full flex items-center justify-between py-8">
|
||||
<div className="flex items-center font-medium">
|
||||
<Image
|
||||
src={Logo}
|
||||
alt="Logo"
|
||||
width={36}
|
||||
height={36}
|
||||
className="mr-2"
|
||||
/>
|
||||
</div>
|
||||
<div className="flex items-center space-x-4">
|
||||
<a href="https://www.x.com/ishaandey_" target="_blank">
|
||||
<Image src={XLogo} alt="X Logo" width={18} height={18} />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<h1 className="text-2xl font-medium text-center mt-16">
|
||||
A Collaborative, AI-Powered, Auto-Scaling Code Editor
|
||||
</h1>
|
||||
<div className="text-muted-foreground mt-4 text-center ">
|
||||
Sandbox is an open-source cloud-based code editing environment with
|
||||
custom AI code autocompletion and real-time collaboration. The
|
||||
infrastructure runs on Docker and AWS ECS to scale automatically based
|
||||
on resource usage.
|
||||
</div>
|
||||
<div className="mt-8 flex space-x-4">
|
||||
<Link href="/sign-up">
|
||||
<Button>Go To App</Button>
|
||||
</Link>
|
||||
<a
|
||||
href="https://github.com/ishaan1013/sandbox"
|
||||
target="_blank"
|
||||
className="group h-9 px-4 py-2 inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"
|
||||
>
|
||||
GitHub Repository
|
||||
<ChevronRight className="h-4 w-4 ml-1 transition-all group-hover:translate-x-1" />
|
||||
</a>
|
||||
</div>
|
||||
<div className="aspect-video w-full rounded-lg bg-neutral-800 mt-12"></div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user