Start the Next.js frontend: Google login, profile, birth data, admin

services/frontend (Next.js 16, App Router) runs on port 3001 in compose. The
browser only talks to the frontend: /api/v1/* is proxied to the backend, so
the session cookie lives on the frontend's host, and /api/geo/* exposes the
country list and place search of the horoscope-api.

- /belepes: Google Identity Services button, client id from /v1/config
- /profil: account facts, display name and language, own birth data with
  place search, DST ambiguity prompt and the chart's positions
- /admin: user search, role toggles, credit grants (admins only, 404 otherwise)

Services now tolerate migrations newer than their binary, so they can be
rebuilt one at a time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-15 21:00:50 +00:00
co-authored by Claude Opus 5.5
parent 4aabb7343c
commit 1f177f859e
38 changed files with 2996 additions and 5 deletions
@@ -0,0 +1,140 @@
import { ANGLES, POINTS, SIGNS, dms, signName } from "@/lib/astro";
import type { Chart, Position } from "@/lib/types";
function Pos({ p }: { p: Position }) {
return (
<>
{dms(p.degree_in_sign_dms)} <span className="sym">{SIGNS[p.sign]?.glyph}</span> {signName(p.sign)}
</>
);
}
/** The big three and the positions of a natal chart. */
export function ChartTables({ chart }: { chart: Chart }) {
const result = chart.chart;
const timeKnown = chart.highlights.time_known;
const angles = ANGLES.map(([key, label]) => [label, result.angles[key]] as const).filter(
(a): a is readonly [string, Position] => typeof a[1] === "object" && a[1] !== null,
);
const fortune = result.lots?.fortune;
const sun = result.points.find((p) => p.id === "sun");
const moon = result.points.find((p) => p.id === "moon");
return (
<div className="field" style={{ gap: 24 }}>
<div className="big3">
<div>
<span className="muted">Nap</span>
<span className="glyph sym">{SIGNS[chart.highlights.sun ?? ""]?.glyph}</span>
<strong>{signName(chart.highlights.sun)}</strong>
{sun && <span className="muted num">{dms(sun.degree_in_sign_dms)}</span>}
</div>
<div>
<span className="muted">Hold{!timeKnown && " (közelítő)"}</span>
<span className="glyph sym">{SIGNS[chart.highlights.moon ?? ""]?.glyph}</span>
<strong>{signName(chart.highlights.moon)}</strong>
{moon && <span className="muted num">{dms(moon.degree_in_sign_dms)}</span>}
</div>
<div>
<span className="muted">Aszcendens</span>
{timeKnown ? (
<>
<span className="glyph sym">{SIGNS[chart.highlights.ascendant ?? ""]?.glyph}</span>
<strong>{signName(chart.highlights.ascendant)}</strong>
</>
) : (
<strong className="muted">–</strong>
)}
</div>
</div>
<div className="grid-2" style={{ alignItems: "start" }}>
<div className="table-wrap">
<h3 style={{ marginBottom: 8 }}>Bolygók és pontok</h3>
<table>
<thead>
<tr>
<th scope="col">Pont</th>
<th scope="col">Pozíció</th>
{timeKnown && <th scope="col">Ház</th>}
</tr>
</thead>
<tbody>
{result.points.map((p) => (
<tr key={p.id}>
<td>
<span className="sym" aria-hidden="true">
{POINTS[p.id]?.glyph}
</span>{" "}
{POINTS[p.id]?.hu ?? p.id}
{p.retrograde && (
<abbr className="retro" title="retrográd">
R
</abbr>
)}
</td>
<td className="num">
<Pos p={p} />
</td>
{timeKnown && <td className="num">{p.house ? `${p.house}.` : "–"}</td>}
</tr>
))}
{timeKnown && fortune && (
<tr>
<td>Szerencsepont</td>
<td className="num">
<Pos p={fortune} />
</td>
<td className="num">{fortune.house ? `${fortune.house}.` : "–"}</td>
</tr>
)}
</tbody>
</table>
</div>
{timeKnown && (
<div className="field" style={{ gap: 24 }}>
<div className="table-wrap">
<h3 style={{ marginBottom: 8 }}>Tengelyek</h3>
<table>
<tbody>
{angles.map(([label, p]) => (
<tr key={label}>
<td>{label}</td>
<td className="num">
<Pos p={p} />
</td>
</tr>
))}
</tbody>
</table>
</div>
{result.houses && (
<div className="table-wrap">
<h3 style={{ marginBottom: 8 }}>Házcsúcsok (Placidus)</h3>
<table>
<tbody>
{result.houses.cusps.map((c) => (
<tr key={c.house}>
<td>{c.house}. ház</td>
<td className="num">
<Pos p={c} />
</td>
</tr>
))}
</tbody>
</table>
</div>
)}
</div>
)}
</div>
{!timeKnown && (
<p className="hint">
Születési idő nélkül a házak, a tengelyek és az Aszcendens nem számolhatók; a Hold helyzete a nap folyamán akár
jegyet is válthat, ezért közelítő.
</p>
)}
</div>
);
}