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
@@ -16,8 +16,11 @@ const MAX_POLLS = 120; // 10 minutes
type Step = "offer" | "confirm" | "pay";
/** What is analysed: a natal chart, or a comparison of two charts. */
export type AnalysisTarget = { kind: "natal"; chartId: string } | { kind: "synastry"; synastryId: string };
/** What is analysed: a natal chart, a comparison of two charts, or one year of a chart. */
export type AnalysisTarget =
| { kind: "natal"; chartId: string }
| { kind: "synastry"; synastryId: string }
| { kind: "forecast"; forecastId: string };
const TEXTS = {
natal: {
@@ -46,8 +49,32 @@ const TEXTS = {
unitName: "kapcsolati elemzés",
packages: ["addon_synastry", "couple", "family"],
},
forecast: {
eyebrow: "Éves előrejelzés",
title: "Az éved, fejezetekre bontva",
about:
"Kb. 1800 szó öt fejezetben: az év fő témája, kapcsolatok, munka és pénz, belső fejlődés, és negyedévenként az év menete " +
"a fontos dátumokkal. A végén lehetőségek, kihívások és útravaló. Trendekről és lehetőségekről szól, nem jósol meg biztos eseményeket.",
loadingTitle: "Készül az éves előrejelzésed",
loading:
"Most íródik az öt fejezet a szolár képlet, a tranzitok és a progresszió alapján. Ez általában 1–3 perc; nyugodtan elhagyhatod az oldalt, az előrejelzés elkészül és itt vár.",
item: "Részletes éves előrejelzés",
unitName: "előrejelzés",
packages: ["addon_forecast", "couple", "family"],
},
};
function targetPath(target: AnalysisTarget): string {
switch (target.kind) {
case "natal":
return `/charts/${target.chartId}`;
case "synastry":
return `/synastries/${target.synastryId}`;
case "forecast":
return `/forecasts/${target.forecastId}`;
}
}
/**
* The detailed analysis of a chart or a comparison. A saved one is shown at once; otherwise
* the offer: admins start it free, users with units confirm, others pay
@@ -76,7 +103,7 @@ export function DetailedAnalysis({
const [error, setError] = useState<string | null>(null);
const waiting = analysis?.status === "pending" || analysis?.status === "running";
const t = TEXTS[target.kind];
const path = target.kind === "natal" ? `/charts/${target.chartId}` : `/synastries/${target.synastryId}`;
const path = targetPath(target);
useEffect(() => {
if (!waiting || !analysis) return;
@@ -175,7 +202,7 @@ export function DetailedAnalysis({
) : (
<div className="form-actions">
<button type="button" className="btn btn-primary" onClick={() => setStep("confirm")}>
Részletes elemzés kérése
{target.kind === "forecast" ? "Részletes előrejelzés kérése" : "Részletes elemzés kérése"}
</button>
<span className="hint">
Még {left} {t.unitName}ed van.
@@ -198,7 +225,7 @@ export function DetailedAnalysis({
) : (
<div className="form-actions">
<button type="button" className="btn btn-primary" onClick={() => setStep("pay")}>
Részletes elemzés kérése
{target.kind === "forecast" ? "Részletes előrejelzés kérése" : "Részletes elemzés kérése"}
</button>
{target.kind === "natal" && (
<Link href="/pelda" className="btn btn-ghost">