Gonçalo Rodrigues fb6c839352 feat: public landing page + split personal/business nav (#26)
* feat: public landing page with auth-conditional state

Rewrites homepage.html as a full marketing landing page serving both
unauthenticated visitors (Sign In CTA) and authenticated users (Personal
+ Business portal links). Fixes handler to pass UserID so auth-conditional
rendering activates correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(k8s): expose / without auth so homepage is publicly reachable

Adds a second Ingress (api-public) for the exact path / with no
forward-auth middleware. Traefik prefers the Exact match for the root,
while the Prefix ingress (with auth) still protects all other routes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: homepage renders correctly at / for unauthenticated visitors

Two fixes:
1. Added parseStandalone() helper — parseTmpl() roots on "" but ParseFS()
   stores standalone (no {{define}}) files under their base filename, so
   Execute() ran the empty root and returned Content-Length: 0.
2. Added router.priority: 100 annotation to api-public ingress so Traefik
   picks the Exact / rule over the Prefix / rule (Traefik ranks by rule
   string length by default, which made PathPrefix beat Path).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat: self-contained auth — email/password + Google OAuth, HMAC session cookies

Embeds a full authentication system into the finance API so it can be
deployed as a standalone container without any external auth dependency.

- Email/password registration and login with bcrypt hashing
- Google OAuth 2.0 (GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET env vars)
- HMAC-SHA256 signed session cookies (SESSION_SECRET env var, 30-day TTL)
- Sessions stored in MongoDB finance_sessions with TTL index auto-expiry
- Users stored in MongoDB finance_users with unique email index
- /auth/login, /auth/register, /auth/logout, /auth/oauth/google routes
- authMW now redirects to /auth/login?next=... instead of auth.homelab.local
- getAuth() resolves session cookie first, falls back to X-Auth-* headers
- Default categories seeded automatically on new account creation
- seed.go checks finance_users before the shared legacy users collection

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: homepage sign-in links point to /auth/login instead of auth.homelab.local

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(k8s): remove forward-auth middleware from finance ingress

The app now handles its own auth at /auth/login — Traefik no longer
needs to forward-auth requests, which was causing redirects to
auth.homelab.local instead of finance.homelab.local.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Gonçalo Rodrigues <guga@Goncalos-MacBook-Pro.local>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15 18:18:09 +01:00

882 lines
39 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Finance Hub — Personal &amp; Business Finance</title>
<meta name="description" content="A self-hosted finance platform for personal wealth and business finance management.">
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
:root {
--bg: #040609;
--bg2: #080c12;
--surface: rgba(12,16,26,0.7);
--text: #eaf2f0;
--text2: #7aada9;
--text3: #364e4c;
--teal: #00c9b8;
--teal2: #33d9ca;
--teal-dim: rgba(0,201,184,0.08);
--teal-glow: rgba(0,201,184,0.22);
--purple: #7c3aed;
--purple2: #a855f7;
--purple-dim:rgba(124,58,237,0.08);
--purple-glow:rgba(124,58,237,0.2);
--border: rgba(255,255,255,0.055);
--border2: rgba(255,255,255,0.1);
--green: #34d399;
--radius: 16px;
--radius-sm: 9px;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: var(--bg);
color: var(--text);
min-height: 100vh;
overflow-x: hidden;
-webkit-font-smoothing: antialiased;
}
/* ── Canvas + orbs ─────────────────────────────────────────────── */
#bg-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.orb {
position: fixed; border-radius: 50%;
filter: blur(120px); pointer-events: none; z-index: 0;
}
.orb-1 {
width: 700px; height: 700px;
background: radial-gradient(circle, rgba(0,201,184,0.09) 0%, transparent 70%);
top: -250px; left: -150px;
animation: orb-a 14s ease-in-out infinite alternate;
}
.orb-2 {
width: 900px; height: 900px;
background: radial-gradient(circle, rgba(124,58,237,0.08) 0%, transparent 70%);
bottom: -350px; right: -250px;
animation: orb-b 18s ease-in-out infinite alternate;
}
.orb-3 {
width: 500px; height: 500px;
background: radial-gradient(circle, rgba(168,85,247,0.06) 0%, transparent 70%);
top: 45%; left: 45%;
animation: orb-a 22s ease-in-out infinite alternate;
animation-delay: -8s;
}
@keyframes orb-a { from { transform: translate(0,0) scale(1); } to { transform: translate(50px,35px) scale(1.1); } }
@keyframes orb-b { from { transform: translate(0,0) scale(1); } to { transform: translate(-40px,-30px) scale(1.08); } }
/* ── Layout wrapper ────────────────────────────────────────────── */
.page { position: relative; z-index: 1; }
/* ── Topnav ────────────────────────────────────────────────────── */
.topnav {
position: sticky; top: 0; z-index: 100;
display: flex; align-items: center; justify-content: space-between;
padding: 0 40px;
height: 60px;
background: rgba(4,6,9,0.75);
backdrop-filter: blur(18px) saturate(160%);
-webkit-backdrop-filter: blur(18px) saturate(160%);
border-bottom: 1px solid var(--border);
}
.topnav-logo {
display: flex; align-items: center; gap: 10px;
font-size: 17px; font-weight: 700; letter-spacing: -0.3px;
color: var(--text); text-decoration: none;
}
.topnav-logo-icon {
width: 32px; height: 32px;
background: linear-gradient(135deg, var(--teal), var(--purple2));
border-radius: 9px;
display: flex; align-items: center; justify-content: center;
font-size: 16px;
box-shadow: 0 0 18px rgba(0,201,184,0.25), 0 0 36px rgba(124,58,237,0.15);
animation: logo-glow 3s ease-in-out infinite;
}
@keyframes logo-glow {
0%,100% { box-shadow: 0 0 18px rgba(0,201,184,0.25), 0 0 36px rgba(124,58,237,0.15); }
50% { box-shadow: 0 0 28px rgba(0,201,184,0.45), 0 0 56px rgba(124,58,237,0.28); }
}
.topnav-right { display: flex; align-items: center; gap: 12px; }
.topnav-email { font-size: 12px; color: var(--text3); }
.btn-signin {
display: inline-flex; align-items: center; gap: 7px;
padding: 8px 18px;
background: linear-gradient(135deg, var(--teal), var(--teal2));
color: #030609;
font-size: 13.5px; font-weight: 600;
border-radius: var(--radius-sm);
text-decoration: none;
transition: all 0.2s ease;
box-shadow: 0 2px 14px rgba(0,201,184,0.3);
}
.btn-signin:hover { transform: translateY(-1px); box-shadow: 0 5px 22px rgba(0,201,184,0.45); }
.btn-open {
display: inline-flex; align-items: center; gap: 7px;
padding: 7px 16px;
background: transparent;
border: 1px solid var(--border2);
color: var(--text2);
font-size: 13px; font-weight: 500;
border-radius: var(--radius-sm);
text-decoration: none;
transition: all 0.18s ease;
}
.btn-open:hover { border-color: var(--teal); color: var(--text); }
/* ── Hero ──────────────────────────────────────────────────────── */
.hero {
display: flex; flex-direction: column; align-items: center; text-align: center;
padding: 100px 24px 80px;
max-width: 900px; margin: 0 auto;
}
.hero-eyebrow {
display: inline-flex; align-items: center; gap: 8px;
font-size: 11px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase;
color: var(--teal);
background: var(--teal-dim);
border: 1px solid rgba(0,201,184,0.18);
padding: 5px 14px; border-radius: 100px;
margin-bottom: 28px;
animation: fadeUp 0.7s ease-out both;
}
.eyebrow-dot {
width: 5px; height: 5px; border-radius: 50%;
background: var(--teal);
animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
0%,100% { opacity: 1; transform: scale(1); }
50% { opacity: 0.5; transform: scale(0.7); }
}
.hero-title {
font-size: clamp(44px, 7.5vw, 76px);
font-weight: 800;
letter-spacing: -2.5px;
line-height: 1.0;
margin-bottom: 24px;
animation: fadeUp 0.7s 0.1s ease-out both;
}
.hero-title-line1 {
display: block;
background: linear-gradient(135deg, #fff 0%, var(--teal) 40%, var(--teal2) 60%, #fff 100%);
background-size: 200% auto;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
animation: shimmer-text 5s linear infinite;
}
.hero-title-line2 {
display: block;
background: linear-gradient(135deg, #fff 0%, var(--purple) 40%, var(--purple2) 60%, #fff 100%);
background-size: 200% auto;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
animation: shimmer-text 5s 1s linear infinite;
}
@keyframes shimmer-text {
0% { background-position: 0% center; }
100% { background-position: 200% center; }
}
.hero-sub {
font-size: 18px; color: var(--text2); line-height: 1.65;
max-width: 520px; margin: 0 auto 36px;
animation: fadeUp 0.7s 0.2s ease-out both;
}
.hero-cta {
display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center;
animation: fadeUp 0.7s 0.3s ease-out both;
}
.cta-primary {
display: inline-flex; align-items: center; gap: 8px;
padding: 14px 28px;
background: linear-gradient(135deg, var(--teal), var(--teal2));
color: #030609;
font-size: 15px; font-weight: 700;
border-radius: 12px; text-decoration: none;
transition: all 0.2s ease;
box-shadow: 0 4px 24px rgba(0,201,184,0.35);
}
.cta-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 36px rgba(0,201,184,0.5); }
.cta-primary .arrow { transition: transform 0.2s ease; }
.cta-primary:hover .arrow { transform: translateX(4px); }
.cta-secondary {
display: inline-flex; align-items: center; gap: 8px;
padding: 13px 24px;
border: 1px solid var(--border2);
color: var(--text2);
font-size: 15px; font-weight: 500;
border-radius: 12px; text-decoration: none;
transition: all 0.2s ease;
}
.cta-secondary:hover { border-color: var(--border2); color: var(--text); background: rgba(255,255,255,0.04); }
/* ── Trust bar ─────────────────────────────────────────────────── */
.trust-bar {
display: flex; align-items: center; justify-content: center; gap: 32px; flex-wrap: wrap;
padding: 20px 24px 60px;
animation: fadeUp 0.7s 0.4s ease-out both;
}
.trust-item {
display: flex; align-items: center; gap: 8px;
font-size: 13px; color: var(--text3); font-weight: 500;
}
.trust-icon { font-size: 15px; }
.trust-sep {
width: 4px; height: 4px; border-radius: 50%;
background: var(--text3); opacity: 0.3;
}
/* ── Section wrapper ───────────────────────────────────────────── */
.section {
max-width: 1100px; margin: 0 auto; padding: 0 24px 100px;
}
.section-label {
font-size: 11px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase;
margin-bottom: 10px;
}
.section-label.teal { color: var(--teal); }
.section-label.purple { color: var(--purple2); }
.section-title {
font-size: clamp(28px, 4vw, 40px);
font-weight: 700; letter-spacing: -1px; line-height: 1.15;
margin-bottom: 14px;
}
.section-sub {
font-size: 16px; color: var(--text2); line-height: 1.65; max-width: 520px; margin-bottom: 48px;
}
/* ── Products cards ────────────────────────────────────────────── */
.products-grid {
display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
perspective: 1400px;
}
.pcard {
position: relative;
border-radius: 22px;
border: 1px solid var(--border);
padding: 36px 32px 32px;
background: rgba(10,14,22,0.75);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
overflow: hidden;
cursor: pointer;
transition: box-shadow 0.3s ease;
transform-style: preserve-3d;
will-change: transform;
text-decoration: none; color: inherit;
display: flex; flex-direction: column; gap: 18px;
}
.pcard:hover { box-shadow: 0 28px 72px rgba(0,0,0,0.55); }
.pcard-glow {
position: absolute; width: 240px; height: 240px; border-radius: 50%;
filter: blur(70px); opacity: 0; transition: opacity 0.4s ease;
pointer-events: none; top: -80px; left: -80px;
}
.pcard:hover .pcard-glow { opacity: 1; }
.pcard-teal { animation: float-a 7s ease-in-out infinite; }
.pcard-teal .pcard-glow { background: radial-gradient(circle, var(--teal-glow), transparent); }
.pcard-teal:hover { border-color: rgba(0,201,184,0.25); }
.pcard-purple { animation: float-b 7s ease-in-out infinite; }
.pcard-purple .pcard-glow { background: radial-gradient(circle, var(--purple-glow), transparent); }
.pcard-purple:hover { border-color: rgba(124,58,237,0.25); }
@keyframes float-a { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes float-b { 0%,100% { transform: translateY(-5px); } 50% { transform: translateY(5px); } }
.pcard-badge {
font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
padding: 3px 10px; border-radius: 100px;
}
.pcard-teal .pcard-badge { color: var(--teal); background: var(--teal-dim); border: 1px solid rgba(0,201,184,0.15); }
.pcard-purple .pcard-badge { color: var(--purple2); background: var(--purple-dim); border: 1px solid rgba(124,58,237,0.15); }
.pcard-icon {
width: 56px; height: 56px; border-radius: 15px;
display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.pcard-teal .pcard-icon { background: var(--teal-dim); border: 1px solid rgba(0,201,184,0.18); }
.pcard-purple .pcard-icon { background: var(--purple-dim); border: 1px solid rgba(124,58,237,0.18); }
.pcard-name { font-size: 24px; font-weight: 700; letter-spacing: -0.4px; }
.pcard-desc { font-size: 14px; color: var(--text2); line-height: 1.6; }
.pcard-features {
list-style: none; display: flex; flex-direction: column; gap: 10px; flex: 1;
}
.pcard-features li {
display: flex; align-items: center; gap: 10px;
font-size: 13px; color: var(--text2);
}
.pcard-features li::before {
content: ''; flex-shrink: 0;
width: 5px; height: 5px; border-radius: 50%;
}
.pcard-teal .pcard-features li::before { background: var(--teal); }
.pcard-purple .pcard-features li::before { background: var(--purple2); }
.pcard-cta {
display: inline-flex; align-items: center; gap: 7px;
padding: 12px 22px; border-radius: 11px;
font-size: 14px; font-weight: 600; text-decoration: none;
transition: all 0.2s ease; align-self: flex-start;
position: relative; overflow: hidden;
}
.pcard-cta::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0.1); opacity: 0; transition: opacity 0.2s; }
.pcard-cta:hover::after { opacity: 1; }
.pcard-cta:hover { transform: translateY(-2px); }
.pcard-teal .pcard-cta {
background: linear-gradient(135deg, var(--teal), var(--teal2));
color: #030609;
box-shadow: 0 4px 18px rgba(0,201,184,0.32);
}
.pcard-teal .pcard-cta:hover { box-shadow: 0 7px 28px rgba(0,201,184,0.5); }
.pcard-purple .pcard-cta {
background: linear-gradient(135deg, var(--purple), var(--purple2));
color: #fff;
box-shadow: 0 4px 18px rgba(124,58,237,0.32);
}
.pcard-purple .pcard-cta:hover { box-shadow: 0 7px 28px rgba(124,58,237,0.5); }
.cta-arr { transition: transform 0.2s ease; }
.pcard-cta:hover .cta-arr { transform: translateX(3px); }
/* ── Divider ───────────────────────────────────────────────────── */
.divider {
max-width: 1100px; margin: 0 auto;
height: 1px;
background: linear-gradient(90deg, transparent, var(--border2), transparent);
margin-bottom: 80px;
}
/* ── Feature detail sections ───────────────────────────────────── */
.feature-section {
max-width: 1100px; margin: 0 auto; padding: 0 24px 100px;
display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
}
.feature-section.reverse { direction: rtl; }
.feature-section.reverse > * { direction: ltr; }
.feature-text { }
.feature-chips {
display: flex; flex-direction: column; gap: 14px;
}
.feature-chip {
display: flex; align-items: flex-start; gap: 14px;
padding: 16px 18px;
background: rgba(12,16,26,0.5);
border: 1px solid var(--border);
border-radius: 13px;
transition: border-color 0.2s ease;
}
.feature-chip:hover { border-color: var(--border2); }
.feature-chip-icon {
font-size: 20px; flex-shrink: 0;
width: 38px; height: 38px; border-radius: 9px;
display: flex; align-items: center; justify-content: center;
}
.feature-chip-icon.teal { background: var(--teal-dim); }
.feature-chip-icon.purple { background: var(--purple-dim); }
.feature-chip-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.feature-chip-desc { font-size: 12px; color: var(--text2); line-height: 1.5; }
/* mini mock screen */
.mock-screen {
border-radius: 16px;
border: 1px solid var(--border);
background: rgba(10,14,22,0.8);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
overflow: hidden;
position: relative;
}
.mock-titlebar {
display: flex; align-items: center; gap: 6px;
padding: 12px 16px;
border-bottom: 1px solid var(--border);
background: rgba(6,9,16,0.6);
}
.mock-dot {
width: 10px; height: 10px; border-radius: 50%;
}
.mock-body { padding: 18px; }
.mock-stat {
padding: 12px 14px; border-radius: 10px;
margin-bottom: 10px;
border: 1px solid var(--border);
}
.mock-stat-label { font-size: 10px; color: var(--text3); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 5px; }
.mock-stat-value { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }
.mock-stat-value.teal { color: var(--teal); }
.mock-stat-value.purple { color: var(--purple2); }
.mock-stat-sub { font-size: 11px; color: var(--text3); margin-top: 2px; }
.mock-row {
display: flex; align-items: center; justify-content: space-between;
padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 12px;
}
.mock-row:last-child { border-bottom: none; }
.mock-row-label { color: var(--text2); }
.mock-row-val { font-weight: 600; color: var(--text); }
.mock-row-val.green { color: var(--green); }
.mock-row-val.red { color: #f87171; }
.mock-bar-wrap { margin: 12px 0 4px; }
.mock-bar-track { height: 5px; background: rgba(255,255,255,0.05); border-radius: 3px; overflow: hidden; }
.mock-bar-fill { height: 100%; border-radius: 3px; transition: width 1s ease; }
.mock-badge {
display: inline-flex; align-items: center;
padding: 2px 8px; border-radius: 100px; font-size: 10px; font-weight: 700;
letter-spacing: 0.04em;
}
.mock-badge.active { background: rgba(0,201,184,0.12); color: var(--teal); }
.mock-badge.pending { background: rgba(168,85,247,0.12); color: var(--purple2); }
.mock-badge.approved { background: rgba(52,211,153,0.12); color: var(--green); }
/* ── Sign-in block ─────────────────────────────────────────────── */
.signin-block {
max-width: 560px; margin: 0 auto 100px;
text-align: center; padding: 0 24px;
}
.signin-card {
background: rgba(10,14,22,0.75);
border: 1px solid var(--border);
border-radius: 22px;
padding: 44px 40px;
backdrop-filter: blur(16px);
position: relative; overflow: hidden;
}
.signin-card::before {
content: '';
position: absolute; inset: 0; border-radius: 22px;
background: linear-gradient(135deg, var(--teal-glow), transparent 50%, var(--purple-glow));
opacity: 0.25; pointer-events: none;
}
.signin-card h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 10px; }
.signin-card p { font-size: 15px; color: var(--text2); margin-bottom: 28px; line-height: 1.6; }
/* ── Footer ────────────────────────────────────────────────────── */
.footer {
border-top: 1px solid var(--border);
padding: 28px 40px;
display: flex; align-items: center; justify-content: space-between;
font-size: 12px; color: var(--text3);
}
.footer-logo { display: flex; align-items: center; gap: 8px; color: var(--text3); text-decoration: none; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--text3); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--text2); }
/* ── Animations ────────────────────────────────────────────────── */
@keyframes fadeUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.reveal { opacity:0; transform:translateY(22px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.reveal.visible { opacity:1; transform:translateY(0); }
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 760px) {
.topnav { padding: 0 20px; }
.products-grid { grid-template-columns: 1fr; }
.feature-section { grid-template-columns: 1fr; gap: 36px; }
.feature-section.reverse { direction: ltr; }
.footer { flex-direction: column; gap: 16px; text-align: center; }
.hero { padding: 70px 20px 60px; }
.trust-bar { gap: 20px; }
.trust-sep { display: none; }
}
@media (max-width: 500px) {
.hero-cta { flex-direction: column; width: 100%; }
.cta-primary, .cta-secondary { width: 100%; justify-content: center; }
}
</style>
</head>
<body>
<canvas id="bg-canvas"></canvas>
<div class="orb orb-1"></div>
<div class="orb orb-2"></div>
<div class="orb orb-3"></div>
<div class="page">
<!-- ── Top nav ──────────────────────────────────────────────────── -->
<nav class="topnav">
<a href="/" class="topnav-logo">
<div class="topnav-logo-icon"></div>
Finance Hub
</a>
<div class="topnav-right">
{{if .UserID}}
<span class="topnav-email">{{.Email}}</span>
<a href="/dashboard" class="btn-open">Personal</a>
<a href="/orgs" class="btn-open">Business</a>
{{else}}
<a href="/auth/login" class="btn-signin">Sign in <span></span></a>
{{end}}
</div>
</nav>
<!-- ── Hero ─────────────────────────────────────────────────────── -->
<section class="hero">
<div class="hero-eyebrow"><span class="eyebrow-dot"></span>Self-hosted · Private · Open</div>
<h1 class="hero-title">
<span class="hero-title-line1">Personal wealth.</span>
<span class="hero-title-line2">Business finances.</span>
</h1>
<p class="hero-sub">
One self-hosted platform to track your personal wealth and manage your organisation's budget — without handing your data to anyone.
</p>
<div class="hero-cta">
{{if .UserID}}
<a href="/dashboard" class="cta-primary">Open personal <span class="arrow"></span></a>
<a href="/orgs" class="cta-secondary">Open business</a>
{{else}}
<a href="/auth/login" class="cta-primary">Get started <span class="arrow"></span></a>
<a href="#products" class="cta-secondary">See what's inside</a>
{{end}}
</div>
</section>
<!-- ── Trust bar ────────────────────────────────────────────────── -->
<div class="trust-bar">
<div class="trust-item"><span class="trust-icon">🔒</span> Your data, your server</div>
<div class="trust-sep"></div>
<div class="trust-item"><span class="trust-icon">🏦</span> Multi-bank CSV import</div>
<div class="trust-sep"></div>
<div class="trust-item"><span class="trust-icon">🌙</span> Dark &amp; light mode</div>
<div class="trust-sep"></div>
<div class="trust-item"><span class="trust-icon">👥</span> Role-based access</div>
<div class="trust-sep"></div>
<div class="trust-item"><span class="trust-icon">📊</span> Real-time analytics</div>
</div>
<!-- ── Products ─────────────────────────────────────────────────── -->
<div class="section" id="products">
<div class="products-grid">
<a href="{{if .UserID}}/dashboard{{else}}/auth/login{{end}}"
class="pcard pcard-teal reveal" id="card-personal">
<div class="pcard-glow"></div>
<div class="pcard-badge">Personal</div>
<div class="pcard-icon">🏦</div>
<div class="pcard-name">My Finance</div>
<p class="pcard-desc">Full visibility into your personal wealth — spending, investments, goals, and net worth in one place.</p>
<ul class="pcard-features">
<li>Spending dashboard &amp; monthly trends</li>
<li>Transactions with category budgets</li>
<li>Investment portfolio tracking</li>
<li>Financial goals with progress</li>
<li>Net worth &amp; what-if projections</li>
<li>Tax report export</li>
<li>Household sharing &amp; multi-user view</li>
</ul>
<span class="pcard-cta">{{if .UserID}}Open app{{else}}Sign in{{end}} <span class="cta-arr"></span></span>
</a>
<a href="{{if .UserID}}/orgs{{else}}/auth/login{{end}}"
class="pcard pcard-purple reveal" id="card-business">
<div class="pcard-glow"></div>
<div class="pcard-badge">Business</div>
<div class="pcard-icon">🏢</div>
<div class="pcard-name">Organisations</div>
<p class="pcard-desc">Manage organisations, plan fiscal years, control event budgets, and keep teams financially aligned.</p>
<ul class="pcard-features">
<li>Multi-org with fiscal year lifecycle</li>
<li>Teams with emoji avatars &amp; roles</li>
<li>Events with budget lines &amp; goals</li>
<li>Purchase requests &amp; approval flow</li>
<li>Ledger &amp; bank CSV import</li>
<li>Variance analysis per event &amp; team</li>
<li>End-of-year narrative report</li>
</ul>
<span class="pcard-cta">{{if .UserID}}Open orgs{{else}}Sign in{{end}} <span class="cta-arr"></span></span>
</a>
</div>
</div>
<div class="divider"></div>
<!-- ── Personal features ─────────────────────────────────────────── -->
<div class="feature-section">
<div class="feature-text">
<p class="section-label teal">Personal Finance</p>
<h2 class="section-title">Complete visibility<br>over your wealth</h2>
<p class="section-sub">From daily coffee to long-term portfolio — everything in one dashboard, updated as you import.</p>
<div class="feature-chips">
<div class="feature-chip reveal">
<div class="feature-chip-icon teal">📊</div>
<div>
<div class="feature-chip-title">Smart dashboard</div>
<div class="feature-chip-desc">Monthly income vs spending, top categories, recent transactions, and budget health at a glance.</div>
</div>
</div>
<div class="feature-chip reveal">
<div class="feature-chip-icon teal">📈</div>
<div>
<div class="feature-chip-title">Portfolio tracking</div>
<div class="feature-chip-desc">Import trades, track ISIN-mapped tickers, see P&amp;L and allocation by asset class.</div>
</div>
</div>
<div class="feature-chip reveal">
<div class="feature-chip-icon teal">🎯</div>
<div>
<div class="feature-chip-title">Goals &amp; projections</div>
<div class="feature-chip-desc">Set savings goals, model scenarios, and see your projected net worth over time.</div>
</div>
</div>
</div>
</div>
<div class="mock-screen reveal">
<div class="mock-titlebar">
<div class="mock-dot" style="background:#f87171;"></div>
<div class="mock-dot" style="background:#fbbf24;"></div>
<div class="mock-dot" style="background:var(--green);"></div>
<span style="font-size:11px; color:var(--text3); margin-left:8px;">Dashboard</span>
</div>
<div class="mock-body">
<div style="display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:14px;">
<div class="mock-stat">
<div class="mock-stat-label">Net income</div>
<div class="mock-stat-value teal">+€2,840</div>
<div class="mock-stat-sub">vs last month +12%</div>
</div>
<div class="mock-stat">
<div class="mock-stat-label">Net worth</div>
<div class="mock-stat-value" style="font-size:18px;">€47,320</div>
<div class="mock-stat-sub">↑ €1,240 this month</div>
</div>
</div>
<div style="font-size:10px; color:var(--text3); font-weight:700; letter-spacing:0.06em; text-transform:uppercase; margin-bottom:8px;">Budget health</div>
<div class="mock-row">
<span class="mock-row-label">Groceries</span>
<span class="mock-row-val green">€182 / €250</span>
</div>
<div class="mock-row">
<span class="mock-row-label">Dining out</span>
<span class="mock-row-val red">€148 / €100</span>
</div>
<div class="mock-row">
<span class="mock-row-label">Transport</span>
<span class="mock-row-val green">€64 / €120</span>
</div>
<div class="mock-row">
<span class="mock-row-label">Entertainment</span>
<span class="mock-row-val" style="color:var(--teal);">€38 / €80</span>
</div>
</div>
</div>
</div>
<!-- ── Business features ─────────────────────────────────────────── -->
<div class="feature-section reverse">
<div class="mock-screen reveal">
<div class="mock-titlebar">
<div class="mock-dot" style="background:#f87171;"></div>
<div class="mock-dot" style="background:#fbbf24;"></div>
<div class="mock-dot" style="background:var(--green);"></div>
<span style="font-size:11px; color:var(--text3); margin-left:8px;">Events — Summer Festival 2025</span>
</div>
<div class="mock-body">
<div class="mock-stat" style="margin-bottom:14px;">
<div style="display:flex; justify-content:space-between; align-items:center;">
<div>
<div class="mock-stat-label">Budget</div>
<div class="mock-stat-value purple" style="color:var(--purple2);">€12,500</div>
</div>
<span class="mock-badge active">Active year</span>
</div>
<div class="mock-bar-wrap">
<div style="display:flex; justify-content:space-between; font-size:10px; color:var(--text3); margin-bottom:4px;">
<span>Spent: €8,340</span><span>67%</span>
</div>
<div class="mock-bar-track">
<div class="mock-bar-fill" style="width:67%; background:linear-gradient(90deg,var(--purple),var(--purple2));"></div>
</div>
</div>
</div>
<div style="font-size:10px; color:var(--text3); font-weight:700; letter-spacing:0.06em; text-transform:uppercase; margin-bottom:8px;">Requests</div>
<div class="mock-row">
<span class="mock-row-label">Sound equipment rental</span>
<span class="mock-badge approved">Approved</span>
</div>
<div class="mock-row">
<span class="mock-row-label">Catering deposit</span>
<span class="mock-badge pending">Pending</span>
</div>
<div class="mock-row">
<span class="mock-row-label">Stage lighting</span>
<span class="mock-badge active">In transit</span>
</div>
</div>
</div>
<div class="feature-text">
<p class="section-label purple">Business Finance</p>
<h2 class="section-title">Budget control<br>for your org</h2>
<p class="section-sub">From fiscal year kick-off to the final report — with full traceability for every euro spent.</p>
<div class="feature-chips">
<div class="feature-chip reveal">
<div class="feature-chip-icon purple">📅</div>
<div>
<div class="feature-chip-title">Fiscal year lifecycle</div>
<div class="feature-chip-desc">Plan events and budgets per year. Activate, lock, and close with an end-of-year report.</div>
</div>
</div>
<div class="feature-chip reveal">
<div class="feature-chip-icon purple">📋</div>
<div>
<div class="feature-chip-title">Request &amp; approval flow</div>
<div class="feature-chip-desc">Teams submit purchase requests. Finance approves, tracks delivery, and settles against the ledger.</div>
</div>
</div>
<div class="feature-chip reveal">
<div class="feature-chip-icon purple">📊</div>
<div>
<div class="feature-chip-title">Variance analysis</div>
<div class="feature-chip-desc">Compare planned vs actual per event and per team. Identify overspend before the year closes.</div>
</div>
</div>
</div>
</div>
</div>
<!-- ── Sign-in block (logged-out only) ──────────────────────────── -->
{{if not .UserID}}
<div class="signin-block">
<div class="signin-card">
<h2>Ready to get started?</h2>
<p>Finance Hub is self-hosted on your homelab. Sign in with your account to access your personal and business dashboards.</p>
<a href="/auth/login" class="cta-primary" style="margin: 0 auto;">
Sign in to Finance Hub <span class="arrow"></span>
</a>
</div>
</div>
{{end}}
<!-- ── Footer ───────────────────────────────────────────────────── -->
<footer class="footer">
<a href="/" class="footer-logo">
<div style="width:22px; height:22px; background:linear-gradient(135deg,var(--teal),var(--purple2)); border-radius:6px; display:flex; align-items:center; justify-content:center; font-size:11px;"></div>
Finance Hub
</a>
<div class="footer-links">
{{if .UserID}}
<a href="/dashboard">Personal</a>
<a href="/orgs">Business</a>
{{else}}
<a href="/auth/login">Sign in</a>
{{end}}
</div>
<span>Self-hosted homelab</span>
</footer>
</div><!-- .page -->
<script>
/* ── Particle canvas ─────────────────────────────────────────── */
(function() {
const canvas = document.getElementById('bg-canvas');
const ctx = canvas.getContext('2d');
let W, H, pts;
function resize() { W = canvas.width = innerWidth; H = canvas.height = innerHeight; }
resize();
window.addEventListener('resize', resize);
const N = 55;
function initPts() {
pts = Array.from({length: N}, () => ({
x: Math.random() * W, y: Math.random() * H,
vx: (Math.random() - 0.5) * 0.28, vy: (Math.random() - 0.5) * 0.28,
r: Math.random() * 1.6 + 0.5,
}));
}
initPts();
let mx = W/2, my = H/2;
window.addEventListener('mousemove', e => { mx = e.clientX; my = e.clientY; });
function draw() {
ctx.clearRect(0, 0, W, H);
for (const p of pts) {
p.x += p.vx; p.y += p.vy;
if (p.x < 0 || p.x > W) p.vx *= -1;
if (p.y < 0 || p.y > H) p.vy *= -1;
}
const LINK = 130;
for (let i = 0; i < N; i++) {
for (let j = i+1; j < N; j++) {
const dx = pts[i].x - pts[j].x, dy = pts[i].y - pts[j].y;
const d = Math.sqrt(dx*dx+dy*dy);
if (d < LINK) {
ctx.beginPath(); ctx.moveTo(pts[i].x, pts[i].y); ctx.lineTo(pts[j].x, pts[j].y);
ctx.strokeStyle = `rgba(0,201,184,${0.055*(1-d/LINK)})`; ctx.lineWidth=0.7; ctx.stroke();
}
}
const mdx = pts[i].x-mx, mdy = pts[i].y-my, md = Math.sqrt(mdx*mdx+mdy*mdy);
if (md < 180) {
ctx.beginPath(); ctx.arc(pts[i].x, pts[i].y, pts[i].r*2.8, 0, Math.PI*2);
ctx.fillStyle = `rgba(124,58,237,${0.65*(1-md/180)})`; ctx.fill();
}
ctx.beginPath(); ctx.arc(pts[i].x, pts[i].y, pts[i].r, 0, Math.PI*2);
ctx.fillStyle = 'rgba(0,201,184,0.3)'; ctx.fill();
}
requestAnimationFrame(draw);
}
draw();
})();
/* ── 3D card tilt ────────────────────────────────────────────── */
(function() {
document.querySelectorAll('.pcard').forEach(card => {
const MAX = 11;
card.addEventListener('mousemove', e => {
const r = card.getBoundingClientRect();
const dx = (e.clientX - r.left - r.width/2) / (r.width/2);
const dy = (e.clientY - r.top - r.height/2) / (r.height/2);
card.style.transform = `perspective(900px) rotateX(${-dy*MAX}deg) rotateY(${dx*MAX}deg) translateZ(6px)`;
card.style.transition = 'transform 0.07s ease-out, box-shadow 0.3s ease';
});
card.addEventListener('mouseleave', () => {
card.style.transition = 'transform 0.55s ease, box-shadow 0.3s ease';
card.style.transform = '';
});
});
})();
/* ── Scroll reveal ────────────────────────────────────────────── */
const io = new IntersectionObserver(entries => {
entries.forEach(e => { if (e.isIntersecting) { e.target.classList.add('visible'); io.unobserve(e.target); }});
}, { threshold: 0.1 });
document.querySelectorAll('.reveal').forEach(el => io.observe(el));
/* ── Rotating rings ───────────────────────────────────────────── */
(function() {
const s = document.createElement('style');
s.textContent = `
@keyframes ring-spin { from{transform:rotateX(72deg) rotateZ(0)} to{transform:rotateX(72deg) rotateZ(360deg)} }
.bg-ring { position:fixed; border-radius:50%; border:1px solid rgba(0,201,184,0.04);
pointer-events:none; z-index:0; animation:ring-spin linear infinite; }
`;
document.head.appendChild(s);
[[380,'16s','rgba(0,201,184,0.04)'],[600,'26s','rgba(124,58,237,0.03)'],[220,'11s','rgba(168,85,247,0.05)']].forEach(([sz,dur,col]) => {
const d = document.createElement('div');
d.className = 'bg-ring';
d.style.cssText = `width:${sz}px;height:${sz}px;top:50%;left:50%;margin:${-sz/2}px 0 0 ${-sz/2}px;animation-duration:${dur};border-color:${col}`;
document.body.appendChild(d);
});
})();
</script>
</body>
</html>