Forum: a service of its own and the /forum pages

services/forum (axum, port 8083) on the same database and login, in the
forum schema (migration 0038, which also adds the moderator role):
nicknames, profiles with shared signs, topics, threads with listening or
advice intent, two-level replies, read marks and followed threads,
reactions as ratings with points and ranks, newcomer limits (lifted by a
purchase), moderation with reasons, bans and a log. Integration tests run
in CI.

The frontend's /forum pages (light by default, dark on request, phone
first with a desktop layout) are switched on by FORUM_URL; the /api/v1
proxy sends /api/v1/forum/* to the forum service. Concept and status:
docs/kozosseg.md.

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-26 10:29:49 +00:00
co-authored by Claude Opus 5.5
parent fa46dcb757
commit 36b38525c3
52 changed files with 6782 additions and 11 deletions
@@ -1,5 +1,6 @@
import Link from "next/link";
import { forumEnabled } from "@/lib/forumServer";
import type { Me, SkyNow } from "@/lib/types";
import { MobileMenu } from "./MobileMenu";
@@ -42,10 +43,11 @@ export function PublicHeader({
current,
}: {
onHome?: boolean;
current?: "pelda" | "horoszkop" | "csillagjegyek" | "hires" | "holdnaptar" | "retrograd";
current?: "pelda" | "horoszkop" | "csillagjegyek" | "hires" | "holdnaptar" | "retrograd" | "forum";
}) {
const home = onHome ? "" : "/";
const here = (page: typeof current) => (current === page ? "page" : undefined);
const forum = forumEnabled();
return (
<header className="site-header lp-header">
<Logo />
@@ -56,6 +58,11 @@ export function PublicHeader({
<Link href="/pelda" aria-current={here("pelda")}>
Példa
</Link>
{forum && (
<Link href="/forum" aria-current={here("forum")}>
Fórum
</Link>
)}
</nav>
<nav className="lp-free" aria-label="Ingyenes, belépés nélkül">
<span className="lp-free-label">Ingyenes</span>
@@ -81,6 +88,7 @@ export function PublicHeader({
{ href: `${home}#elorejelzes`, label: "Előrejelzés" },
{ href: `${home}#osszevetes`, label: "Összevetés" },
{ href: "/pelda", label: "Példa" },
...(forum ? [{ href: "/forum", label: "Fórum" }] : []),
],
},
{
@@ -148,6 +156,7 @@ export function SiteHeader({ me, sky }: { me: Me; sky?: SkyNow | null }) {
{ href: "/szemelyek", label: "Személyek", icon: "persons" },
{ href: "/osszevetesek", label: "Összevetések", icon: "compare" },
{ href: "/kartyajoslas", label: "Kártyajóslás", icon: "tarot" },
...(forumEnabled() ? [{ href: "/forum", label: "Fórum", icon: "forum" as const }] : []),
];
const packages: NavItem = { href: "/csomagok", label: "Csomagok", icon: "packages" };
const team: NavItem[] = me.user.roles.includes("admin")