feat: initial prototype

This commit is contained in:
2026-02-13 15:52:13 +07:00
parent 134351b326
commit e8dbefde43
140 changed files with 12390 additions and 1369 deletions

View File

@@ -1,17 +1,18 @@
import { api } from "@minikura/api";
import { treaty } from "@elysiajs/eden";
import type { App } from "@minikura/backend";
import { redirect } from "next/navigation";
async function fetchData() {
const response = await api.index.get();
return response;
}
export default async function Page() {
const data = await fetchData();
return (
<div>
<h1>Hello React</h1>
<pre>{JSON.stringify(data, null, 2)}</pre>
</div>
);
export const dynamic = "force-dynamic";
const apiUrl = process.env.NEXT_PUBLIC_API_URL || "http://localhost:3000";
const api = treaty<App>(apiUrl);
export default async function HomePage() {
const { data } = await api.bootstrap.status.get();
if (data?.needsSetup) {
redirect("/bootstrap");
} else {
redirect("/login");
}
}