Skip to content

Commit 9edac41

Browse files
authored
Update folder structure and add full screen schema editor (#8)
* feat: implement a full screen text editor sheet with a font size adjuster * chore: update folder structure * chore: add vscode to gitignore * fix: missing icon exports and fix react flow rendering
1 parent 2cbddf7 commit 9edac41

Some content is hidden

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

49 files changed

+1440
-1000
lines changed

app/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
/.next/
1313
/out/
1414

15+
# editor
16+
.vscode
17+
1518
# production
1619
/build
1720

app/.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"editor.defaultFormatter": "biomejs.biome",
3+
"editor.formatOnSave": true
4+
}

app/components.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
"prefix": ""
1212
},
1313
"aliases": {
14-
"components": "@/components",
15-
"utils": "@/lib/util",
16-
"ui": "@/components/ui",
17-
"lib": "@/lib",
18-
"hooks": "@/hooks"
14+
"components": "components",
15+
"utils": "lib/util",
16+
"ui": "components/ui",
17+
"lib": "lib",
18+
"hooks": "hooks"
1919
}
2020
}

app/src/app/layout.tsx

Lines changed: 14 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import { Assistant } from "next/font/google";
2-
import Link from "next/link";
3-
import { NuqsAdapter } from "nuqs/adapters/next/app";
42

5-
import Header from "@/components/Header";
6-
import ThemeProvider from "@/components/ThemeProvider";
3+
import { Footer, Header } from "components/layout";
4+
import { NuqsProvider, ThemeProvider } from "providers";
75

86
import type { Metadata } from "next";
97
import type { PropsWithChildren } from "react";
@@ -20,45 +18,18 @@ export const metadata: Metadata = {
2018
const RootLayout = ({ children }: PropsWithChildren) => (
2119
<html lang="en" suppressHydrationWarning>
2220
<body className={assistant.className}>
23-
<ThemeProvider
24-
enableSystem
25-
attribute="class"
26-
defaultTheme="system"
27-
disableTransitionOnChange
28-
>
29-
<NuqsAdapter>
30-
<Header />
31-
32-
<div className="relative flex h-[100dvh] w-full flex-col">
33-
<main className="mt-[72px] w-full flex-1">{children}</main>
34-
35-
<footer className="flex w-full shrink-0 flex-col items-center gap-2 border-t bg-muted/10 px-4 py-6 sm:flex-row md:px-6">
36-
<p className="text-muted-foreground text-xs">
37-
© {new Date().getFullYear()} Omni
38-
</p>
39-
40-
<nav className="flex gap-4 sm:ml-auto sm:gap-6">
41-
<Link
42-
className="text-muted-foreground text-xs transition-colors hover:text-primary"
43-
href="https://omni.dev/terms-of-service"
44-
target="_blank"
45-
rel="noopener noreferrer"
46-
>
47-
Terms of Service
48-
</Link>
49-
50-
<Link
51-
className="text-muted-foreground text-xs transition-colors hover:text-primary"
52-
href="https://omni.dev/privacy-policy"
53-
target="_blank"
54-
rel="noopener noreferrer"
55-
>
56-
Privacy
57-
</Link>
58-
</nav>
59-
</footer>
60-
</div>
61-
</NuqsAdapter>
21+
<ThemeProvider>
22+
<NuqsProvider>
23+
<main className="grid h-dvh w-screen grid-rows-layout">
24+
<div className="flex h-screen w-full flex-col">
25+
<Header />
26+
27+
{children}
28+
29+
<Footer />
30+
</div>
31+
</main>
32+
</NuqsProvider>
6233
</ThemeProvider>
6334
</body>
6435
</html>

app/src/app/not-found.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import Link from "next/link";
2+
3+
import { buttonVariants } from "components/ui";
4+
5+
const NotFound = () => {
6+
return (
7+
<section className="flex h-full flex-col items-center justify-center gap-4">
8+
<h1 className="">This page doesn't exist.</h1>
9+
10+
<Link href="/" className={`w-fit ${buttonVariants()}`}>
11+
Go home
12+
</Link>
13+
</section>
14+
);
15+
};
16+
17+
export default NotFound;

app/src/app/page.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
import { ArrowRight, Code, Share2, Sparkles, Zap } from "lucide-react";
21
import Link from "next/link";
32

4-
import { Button } from "@/components/ui/button";
5-
import cn from "@/lib/util/cn";
3+
import { Icons } from "components/core";
4+
import { Button } from "components/ui";
5+
import cn from "lib/util/cn";
66

77
const features = [
88
{
9-
icon: <Code className="h-6 w-6" />,
9+
icon: <Icons.Code className="h-6 w-6" />,
1010
title: "Easy Modeling",
1111
description:
1212
"Define your ecosystem structure using an intuitive JSON schema",
1313
},
1414
{
15-
icon: <Share2 className="h-6 w-6" />,
15+
icon: <Icons.Share2 className="h-6 w-6" />,
1616
title: "Interactive Maps",
1717
description: "Transform complex relationships into clear, visual insights",
1818
},
1919
{
20-
icon: <Zap className="h-6 w-6" />,
20+
icon: <Icons.Zap className="h-6 w-6" />,
2121
title: "Dynamic Updates",
2222
description:
2323
"Watch your ecosystem map evolve in real-time as you make changes",
@@ -74,7 +74,7 @@ const HomePage = () => (
7474
Visualize Your Ecosystem{" "}
7575
</h1>
7676

77-
<Sparkles className="hidden h-10 w-10 md:flex" />
77+
<Icons.Sparkles className="hidden h-10 w-10 md:flex" />
7878
</div>
7979

8080
<p className="mx-auto max-w-[700px] text-muted-foreground md:text-xl">
@@ -89,23 +89,23 @@ const HomePage = () => (
8989
className="gap-2 bg-primary hover:bg-primary/90"
9090
>
9191
Start Modeling
92-
<ArrowRight className="h-4 w-4" />
92+
<Icons.ArrowRight className="h-4 w-4" />
9393
</Button>
9494
</Link>
9595
</div>
9696
</div>
9797
</div>
9898
</section>
9999

100-
<section className="flex w-full h-full flex-col items-center justify-center py-12 bg-muted/50">
100+
<section className="flex h-full w-full flex-col items-center justify-center bg-muted/50 py-12">
101101
<div className="container px-4 md:px-6">
102102
<div className="grid gap-10 sm:grid-cols-2 lg:grid-cols-3">
103103
{features.map((feature) => (
104104
<div
105105
key={feature.title}
106106
className={cn(
107107
"group relative flex flex-col items-center space-y-4 text-center",
108-
"rounded-lg border bg-background p-6 shadow-lg transition-shadow hover:shadow-xl"
108+
"rounded-lg border bg-background p-6 shadow-lg transition-shadow hover:shadow-xl",
109109
)}
110110
>
111111
<div className="rounded-full bg-primary/10 p-4 text-primary">
@@ -126,7 +126,7 @@ const HomePage = () => (
126126
<Link href="/visualizer">
127127
<Button size="lg" className="gap-2 bg-primary hover:bg-primary/90">
128128
Start Modeling
129-
<ArrowRight className="h-4 w-4" />
129+
<Icons.ArrowRight className="h-4 w-4" />
130130
</Button>
131131
</Link>
132132
</div>

0 commit comments

Comments
 (0)