Yearly forecast: solar return, transits, progressions, profection, eclipses
CI / test (push) Successful in 56s
CI / build (push) Successful in 4m41s
CI / deploy (push) Skipped

- astro-engine: forecast module (solar return moment, slow-planet transits
  with exact dates and periods, natal house ingresses, secondary
  progressions, annual profection, eclipses via Swiss Ephemeris)
- horoscope-api: POST /v1/forecast, solar return chart cast for the place
  of the birthday
- backend: forecasts table, /v1/charts/{id}/forecasts, /v1/forecasts/{id}
  and its analyses using a new 'forecast' unit; current year of life open,
  the next one 30 days before the birthday
- packages: Páros and Család include forecasts (6 000 / 11 000 Ft),
  +1 éves előrejelzés add-on 2 500 Ft; Egy elemzés unchanged
- worker and prompt: forecast kind with five sections and forecast rules
  (trends, no event predictions); no birth data, place or exact age sent
- frontend: /kepletek/{id}/elorejelzes with the solar return wheel, the
  keys of the year, a monthly timeline, transit list and detailed forecast
- data export: forecasts added, model name removed

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-18 08:19:13 +00:00
co-authored by Claude Opus 5.5
parent 829c33e52f
commit f1bd34c394
42 changed files with 4764 additions and 85 deletions
+6 -4
View File
@@ -33,12 +33,14 @@ pub async fn list_users(
let limit = query.limit.unwrap_or(50).clamp(1, 200);
let offset = query.offset.unwrap_or(0).max(0);
let pattern = query.q.as_deref().map(|q| format!("%{}%", q.trim().replace(['%', '_'], "")));
type Row = (Uuid, String, Option<String>, Vec<String>, bool, OffsetDateTime, Option<OffsetDateTime>, i64, i64, i64);
type Row =
(Uuid, String, Option<String>, Vec<String>, bool, OffsetDateTime, Option<OffsetDateTime>, i64, i64, i64, i64);
let rows: Vec<Row> = sqlx::query_as(
"SELECT u.id, u.email, u.display_name, u.roles, u.email_verified_at IS NOT NULL, u.created_at, u.last_login_at, \
(SELECT count(*) FROM charts c WHERE c.owner_id = u.id), \
(SELECT COALESCE(SUM(delta), 0)::bigint FROM credit_ledger l WHERE l.user_id = u.id AND l.unit = 'natal'), \
(SELECT COALESCE(SUM(delta), 0)::bigint FROM credit_ledger l WHERE l.user_id = u.id AND l.unit = 'synastry') \
(SELECT COALESCE(SUM(delta), 0)::bigint FROM credit_ledger l WHERE l.user_id = u.id AND l.unit = 'synastry'), \
(SELECT COALESCE(SUM(delta), 0)::bigint FROM credit_ledger l WHERE l.user_id = u.id AND l.unit = 'forecast') \
FROM users u \
WHERE $1::text IS NULL OR u.email ILIKE $1 OR u.display_name ILIKE $1 \
ORDER BY u.created_at DESC LIMIT $2 OFFSET $3",
@@ -50,11 +52,11 @@ pub async fn list_users(
.await?;
let users: Vec<Value> = rows
.into_iter()
.map(|(id, email, name, roles, verified, created, last_login, charts, natal, synastry)| {
.map(|(id, email, name, roles, verified, created, last_login, charts, natal, synastry, forecast)| {
json!({
"id": id, "email": email, "display_name": name, "roles": roles, "email_verified": verified,
"created_at": rfc3339(created), "last_login_at": rfc3339_opt(last_login),
"charts": charts, "analyses_left": {"natal": natal, "synastry": synastry},
"charts": charts, "analyses_left": {"natal": natal, "synastry": synastry, "forecast": forecast},
})
})
.collect();