feat(altyapı): yerel MongoDB, Axum backend ve Vite frontend iskeleti

- docker-compose.dev.yml: MongoDB 7, tek düğümlü replica set (port 27020)
- Backend: Axum + tokio, GET /api/health
- Frontend: React + TypeScript + Vite, /api proxy, geçici durum ekranı
- Kök package.json: npm run dev ile DB + backend + frontend
- backend/api.http örnek istekler

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-11 23:01:14 +03:00
parent 204c120f4f
commit af2c01dbee
23 changed files with 3103 additions and 9 deletions
+29
View File
@@ -0,0 +1,29 @@
import { useEffect, useState } from 'react'
type Health = { status: string; version: string }
// Faz 0 geçici ekranı: frontend ↔ backend bağlantısını doğrular.
// Faz 2'de gerçek tasarım sistemi ve layout ile değiştirilecek.
export default function App() {
const [health, setHealth] = useState<Health | null>(null)
const [error, setError] = useState(false)
useEffect(() => {
fetch('/api/health')
.then((r) => (r.ok ? r.json() : Promise.reject()))
.then(setHealth)
.catch(() => setError(true))
}, [])
return (
<main className="placeholder">
<h1>📒 Kakeibo</h1>
<p>Kişisel Ev Finans Defteri</p>
<p className="status">
{error && '🔴 Backend\'e ulaşılamadı'}
{!error && !health && '⏳ Backend kontrol ediliyor…'}
{health && `🟢 Backend çalışıyor (v${health.version})`}
</p>
</main>
)
}
+37
View File
@@ -0,0 +1,37 @@
/* Faz 0 geçici stil. Faz 2'de TailwindCSS ile değiştirilecek. */
:root {
font-family: Inter, system-ui, sans-serif;
color-scheme: light dark;
background: #fafaf9;
color: #1c1917;
}
@media (prefers-color-scheme: dark) {
:root {
background: #1c1917;
color: #f5f5f4;
}
}
body {
margin: 0;
}
.placeholder {
min-height: 100dvh;
display: grid;
place-content: center;
text-align: center;
gap: 0.25rem;
padding: 1rem;
}
.placeholder h1 {
margin: 0;
font-size: 2.5rem;
}
.status {
margin-top: 1.5rem;
font-variant-numeric: tabular-nums;
}
+10
View File
@@ -0,0 +1,10 @@
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
import App from './App.tsx'
createRoot(document.getElementById('root')!).render(
<StrictMode>
<App />
</StrictMode>,
)