chore: release v1.0.0 — каркас FastAPI, ingress Grafana, интеграции, документация
Made-with: Cursor
This commit is contained in:
32
web/src/App.tsx
Normal file
32
web/src/App.tsx
Normal file
@ -0,0 +1,32 @@
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
type Status = Record<string, unknown>;
|
||||
|
||||
export default function App() {
|
||||
const [status, setStatus] = useState<Status | null>(null);
|
||||
const [err, setErr] = useState<string | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
fetch("/api/v1/status")
|
||||
.then((r) => (r.ok ? r.json() : Promise.reject(new Error(String(r.status)))))
|
||||
.then(setStatus)
|
||||
.catch((e) => setErr(String(e)));
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div style={{ fontFamily: "system-ui", padding: "2rem", maxWidth: 640 }}>
|
||||
<h1>onGuard24</h1>
|
||||
<p>Модульный монолит: API на FastAPI, модули — заглушки.</p>
|
||||
<h2>Статус</h2>
|
||||
{err && <p style={{ color: "crimson" }}>Ошибка: {err}</p>}
|
||||
{status && (
|
||||
<pre style={{ background: "#f4f4f5", padding: "1rem", borderRadius: 8 }}>
|
||||
{JSON.stringify(status, null, 2)}
|
||||
</pre>
|
||||
)}
|
||||
<p style={{ marginTop: "2rem", color: "#666" }}>
|
||||
Бэкенд: <code>uvicorn onguard24.main:app --port 8080</code>
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
5
web/src/index.css
Normal file
5
web/src/index.css
Normal file
@ -0,0 +1,5 @@
|
||||
body {
|
||||
margin: 0;
|
||||
background: #fafafa;
|
||||
color: #18181b;
|
||||
}
|
||||
10
web/src/main.tsx
Normal file
10
web/src/main.tsx
Normal file
@ -0,0 +1,10 @@
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import App from "./App";
|
||||
import "./index.css";
|
||||
|
||||
ReactDOM.createRoot(document.getElementById("root")!).render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
</React.StrictMode>,
|
||||
);
|
||||
1
web/src/vite-env.d.ts
vendored
Normal file
1
web/src/vite-env.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
/// <reference types="vite/client" />
|
||||
Reference in New Issue
Block a user