Skip to content

Commit 9965871

Browse files
aidenybaiamiagent
andcommitted
add website with animated CLI terminal landing page
Generated with [Ami](https://ami.dev) Co-Authored-By: Ami <noreply@ami.dev>
1 parent c993b69 commit 9965871

8 files changed

Lines changed: 432 additions & 34 deletions

File tree

packages/website/.oxlintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": ["../.oxlintrc.json"],
2+
"extends": ["../../.oxlintrc.json"],
33
"plugins": ["typescript", "react", "import", "nextjs", "jsx-a11y"],
44
"rules": {}
55
}

packages/website/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"start": "next start"
99
},
1010
"dependencies": {
11+
"lucide-react": "^0.564.0",
1112
"next": "16.1.6",
1213
"react": "19.2.3",
1314
"react-dom": "19.2.3"

packages/website/src/app/api/score/route.ts

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ const calculateScore = (diagnostics: DiagnosticInput[]): number => {
3131
}
3232
}
3333

34-
const penalty =
35-
errorRules.size * ERROR_RULE_PENALTY +
36-
warningRules.size * WARNING_RULE_PENALTY;
34+
const penalty = errorRules.size * ERROR_RULE_PENALTY + warningRules.size * WARNING_RULE_PENALTY;
3735

3836
return Math.max(0, Math.round(PERFECT_SCORE - penalty));
3937
};
@@ -54,8 +52,7 @@ const CORS_HEADERS = {
5452
"Access-Control-Allow-Headers": "Content-Type",
5553
};
5654

57-
export const OPTIONS = (): Response =>
58-
new Response(null, { status: 204, headers: CORS_HEADERS });
55+
export const OPTIONS = (): Response => new Response(null, { status: 204, headers: CORS_HEADERS });
5956

6057
export const POST = async (request: Request): Promise<Response> => {
6158
const body = await request.json().catch(() => null);
@@ -67,21 +64,19 @@ export const POST = async (request: Request): Promise<Response> => {
6764
);
6865
}
6966

70-
const isValidPayload = body.diagnostics.every(
71-
(entry: unknown) => isValidDiagnostic(entry),
72-
);
67+
const isValidPayload = body.diagnostics.every((entry: unknown) => isValidDiagnostic(entry));
7368

7469
if (!isValidPayload) {
7570
return Response.json(
76-
{ error: "Each diagnostic must have 'plugin' (string), 'rule' (string), and 'severity' ('error' | 'warning')" },
71+
{
72+
error:
73+
"Each diagnostic must have 'plugin' (string), 'rule' (string), and 'severity' ('error' | 'warning')",
74+
},
7775
{ status: 400, headers: CORS_HEADERS },
7876
);
7977
}
8078

8179
const score = calculateScore(body.diagnostics);
8280

83-
return Response.json(
84-
{ score, label: getScoreLabel(score) },
85-
{ headers: CORS_HEADERS },
86-
);
81+
return Response.json({ score, label: getScoreLabel(score) }, { headers: CORS_HEADERS });
8782
};
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,20 @@
11
@import "tailwindcss";
2+
3+
@theme {
4+
--font-mono: var(--font-mono), ui-monospace, monospace;
5+
--animate-fade-in: fade-in 200ms ease-out both;
6+
}
7+
8+
@keyframes fade-in {
9+
from { opacity: 0; }
10+
to { opacity: 1; }
11+
}
12+
13+
html,
14+
body {
15+
background: #0a0a0a;
16+
height: 100%;
17+
overflow: hidden;
18+
scrollbar-width: thin;
19+
scrollbar-color: #333 transparent;
20+
}
Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
import type { Metadata } from "next";
2-
import { Geist, Geist_Mono } from "next/font/google";
2+
import { IBM_Plex_Mono } from "next/font/google";
33
import "./globals.css";
44

5-
const geistSans = Geist({
6-
variable: "--font-geist-sans",
7-
subsets: ["latin"],
8-
});
9-
10-
const geistMono = Geist_Mono({
11-
variable: "--font-geist-mono",
5+
const ibmPlexMono = IBM_Plex_Mono({
6+
variable: "--font-mono",
127
subsets: ["latin"],
8+
weight: ["400", "500"],
139
});
1410

1511
export const metadata: Metadata = {
1612
title: "React Doctor",
17-
description: "",
13+
description: "Let coding agents diagnose and fix your React code.",
1814
};
1915

2016
export default function RootLayout({
@@ -24,7 +20,7 @@ export default function RootLayout({
2420
}>) {
2521
return (
2622
<html lang="en">
27-
<body className={`${geistSans.variable} ${geistMono.variable} antialiased`}>{children}</body>
23+
<body className={`${ibmPlexMono.variable} antialiased`}>{children}</body>
2824
</html>
2925
);
3026
}

packages/website/src/app/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import Image from "next/image";
1+
import Terminal from "@/components/terminal";
22

3-
export default function Home() {
4-
return <div>hi</div>;
5-
}
3+
const Home = () => <Terminal />;
4+
5+
export default Home;

0 commit comments

Comments
 (0)