Famous people: admin page, own prompt, one photo, public pages
CI / test (push) Successful in 2m21s
CI / build (push) Skipped
CI / deploy (push) Skipped

- Admin "Híres emberek": birth data, one photo (S3: DigitalOcean Spaces in
  production, RustFS in development), a face point that every crop keeps
  in view, publishing, and a detailed portrait written with its own
  `celebrity` prompt (third person, by name, from the chart alone).
- The photo is stored once (upright JPEG, at most 2000 px, no metadata);
  next/image makes the sizes from it, so Cloudflare can cache those.
- Public list and pages (/hires-emberek), in the sitemap, with a share
  image showing the face and the chart.
- Share images: the wheel's glyphs and numbers are drawn with the card's
  fonts (inside the SVG image they came out as boxes, on every card).

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-22 16:08:35 +00:00
co-authored by Claude Opus 5.5
parent 13e22a9c7d
commit 37cb0abf4b
47 changed files with 3008 additions and 77 deletions
+8 -3
View File
@@ -27,7 +27,8 @@ use crate::error::{ApiError, ApiResult};
use crate::views::{rfc3339, rfc3339_opt};
/// The kinds whose prompt the admin page edits.
const EDITABLE: [Kind; 5] = [Kind::Summary, Kind::Natal, Kind::Synastry, Kind::Forecast, Kind::Question];
const EDITABLE: [Kind; 6] =
[Kind::Summary, Kind::Natal, Kind::Synastry, Kind::Forecast, Kind::Question, Kind::Celebrity];
const MAX_CHARS: usize = 50_000;
const HISTORY: i64 = 20;
/// Test runs of one admin waiting or being written at the same time.
@@ -158,7 +159,8 @@ pub async fn save(
pub struct StartPreview {
/// The draft to try (it need not be saved).
system: String,
/// One of the admin's own charts (own or a person), for a summary or natal analysis.
/// One of the admin's own charts (own or a person), for a summary or natal
/// analysis; a famous person's chart (anyone's) for their analysis.
chart_id: Option<Uuid>,
/// One of the admin's own comparisons, for a synastry analysis.
synastry_id: Option<Uuid>,
@@ -216,7 +218,10 @@ pub async fn start_preview(
let (chart_id, synastry_id, forecast_id) = (req.chart_id, req.synastry_id, req.forecast_id);
let (query, id, what) = match (kind, chart_id, synastry_id, forecast_id) {
(Kind::Summary | Kind::Natal, Some(id), None, None) => {
("SELECT id FROM charts WHERE id = $1 AND owner_id = $2", id, "chart")
("SELECT id FROM charts WHERE id = $1 AND owner_id = $2 AND kind <> 'celebrity'", id, "chart")
}
(Kind::Celebrity, Some(id), None, None) => {
("SELECT chart_id FROM celebrities WHERE chart_id = $1 AND $2::uuid IS NOT NULL", id, "celebrity")
}
(Kind::Synastry, None, Some(id), None) => {
("SELECT id FROM synastries WHERE id = $1 AND owner_id = $2", id, "synastry")