feat: add basic webui
This commit is contained in:
BIN
apps/api/app/apple-icon.png
Normal file
BIN
apps/api/app/apple-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 216 B |
17
apps/api/app/cron/keep-alive/route.ts
Normal file
17
apps/api/app/cron/keep-alive/route.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { database } from '@konobangu/database';
|
||||
|
||||
export const POST = async () => {
|
||||
const newPage = await database
|
||||
.insertInto('page')
|
||||
.values([
|
||||
{
|
||||
name: 'cron-temp',
|
||||
},
|
||||
])
|
||||
.returning('id')
|
||||
.executeTakeFirstOrThrow();
|
||||
|
||||
await database.deleteFrom('page').where('id', '=', newPage.id);
|
||||
|
||||
return new Response('OK', { status: 200 });
|
||||
};
|
||||
29
apps/api/app/global-error.tsx
Normal file
29
apps/api/app/global-error.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
'use client';
|
||||
|
||||
import { Button } from '@konobangu/design-system/components/ui/button';
|
||||
import { fonts } from '@konobangu/design-system/lib/fonts';
|
||||
import { captureException } from '@sentry/nextjs';
|
||||
import type NextError from 'next/error';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
type GlobalErrorProperties = {
|
||||
readonly error: NextError & { digest?: string };
|
||||
readonly reset: () => void;
|
||||
};
|
||||
|
||||
const GlobalError = ({ error, reset }: GlobalErrorProperties) => {
|
||||
useEffect(() => {
|
||||
captureException(error);
|
||||
}, [error]);
|
||||
|
||||
return (
|
||||
<html lang="en" className={fonts}>
|
||||
<body>
|
||||
<h1>Oops, something went wrong</h1>
|
||||
<Button onClick={() => reset()}>Try again</Button>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
};
|
||||
|
||||
export default GlobalError;
|
||||
3
apps/api/app/health/route.ts
Normal file
3
apps/api/app/health/route.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export const runtime = 'edge';
|
||||
|
||||
export const GET = (): Response => new Response('OK', { status: 200 });
|
||||
BIN
apps/api/app/icon.png
Normal file
BIN
apps/api/app/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 96 B |
13
apps/api/app/layout.tsx
Normal file
13
apps/api/app/layout.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
type RootLayoutProperties = {
|
||||
readonly children: ReactNode;
|
||||
};
|
||||
|
||||
const RootLayout = ({ children }: RootLayoutProperties) => (
|
||||
<html lang="en">
|
||||
<body>{children}</body>
|
||||
</html>
|
||||
);
|
||||
|
||||
export default RootLayout;
|
||||
BIN
apps/api/app/opengraph-image.png
Normal file
BIN
apps/api/app/opengraph-image.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 57 KiB |
Reference in New Issue
Block a user