Files
sorsfonalak/services/frontend/src/app/admin/page.tsx
T
fecoandClaude Opus 5.5 ce3d3804a7 Paid detailed analyses with per-kind units; example analysis page
- Credits become analysis units (migration 0006): a natal analysis uses
  one 'natal' unit, a synastry analysis one 'synastry' unit. No monthly
  free credits, no model tiers: ANALYSIS_MODEL (default Opus 5.5) writes
  every paid analysis. Admins grant units per kind; the worker refunds
  the right unit on failure.
- Chart page: the detailed analysis card (offer with units left and a
  confirmation, progress while writing, the finished six sections).
- Public /pelda page: a full Opus analysis of a made-up chart, with the
  free summary and a login call to action.
- The worker sends the JSON schema with properties in 'required' order.
  serde_json sorted them, so the title came after ~9000 tokens of text
  and Opus sometimes left it empty (3 failed attempts in a live test);
  with the order fixed the same analysis succeeded at the first try.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
2026-11-16 17:39:15 +00:00

24 lines
790 B
TypeScript

import type { Metadata } from "next";
import { notFound } from "next/navigation";
import { requireMe } from "@/lib/server";
import { AdminUsers } from "./AdminUsers";
export const metadata: Metadata = { title: "Admin" };
export default async function AdminPage() {
const me = await requireMe("/admin");
// Non-admins see the same 404 as for a missing page.
if (!me.user.roles.includes("admin")) notFound();
return (
<main className="page" style={{ maxWidth: 1180 }}>
<div className="page-head">
<h1>Felhasználók</h1>
<p className="muted">Szerepkörök kezelése és részletes elemzések jóváírása (ajándék, reklamáció). A vásárlások is ide könyvelődnek majd.</p>
</div>
<AdminUsers selfId={me.user.id} />
</main>
);
}