{{ define "home" }} {{ $stats := .Data }}

Fast SSR banking demo

Transfer money by account number with real ledger rules.

Each new user receives a generated CZK account number and a 10 000,00 CZK signup bonus. Admins use a separate login and every privileged action is audited.

{{ end }} {{ define "register" }}

Create user account

Every signup gets a new account number and 10 000,00 CZK.

{{ end }} {{ define "login" }}

User login

{{ end }} {{ define "admin_login" }}

Admin login

Separate authentication from customer accounts.

{{ end }} {{ define "dashboard" }} {{ $page := .Data }}

Current balance

{{ money $page.User.BalanceMinor }}

Account number: {{ $page.User.AccountNumber }}

User: {{ $page.User.Username }}

Recent activity

{{ template "transaction_table" $page.Transactions }}
{{ end }} {{ define "leaderboard" }} {{ $page := .Data }}

Leaderboard

All active users ranked by current account balance.

Ordered highest to lowest balance.
{{ range $page.Entries }} {{ else }} {{ end }}
#UserAccountBalance
{{ .Rank }} {{ .Username }} {{ .AccountNumber }} {{ money .BalanceMinor }}
No users available yet.
{{ end }} {{ define "transfer" }}

Send money

{{ end }} {{ define "transactions" }} {{ $page := .Data }}

Transaction history

{{ template "transaction_table" $page.Transactions }}
{{ end }} {{ define "lottery" }} {{ $page := .Data }}

Hourly pool

Deposit into the pool and wait for the next draw.

Each deposit joins the active round. When the draw deadline passes, the full pool is credited to one randomly selected ticket holder.

Your balance {{ money $page.User.BalanceMinor }}
Current pool {{ if $page.Lottery.ActiveRound }}{{ money $page.Lottery.ActiveRound.PoolMinor }}{{ else }}0,00 CZK{{ end }}
{{ if $page.LastPayout }}
Latest draw paid {{ money $page.LastPayout.PoolMinor }} to {{ $page.LastPayout.WinnerUsername }}.
{{ end }}

Join the round

Each deposit creates one ticket. More deposits mean more chances in the same hourly round.

Active round

{{ if $page.Lottery.ActiveRound }}
Draw at
{{ dt $page.Lottery.ActiveRound.DrawAt }}
Participants
{{ $page.Lottery.ActiveRound.ParticipantCount }}
Total tickets
{{ $page.Lottery.ActiveRound.TicketCount }}
Your tickets
{{ $page.Lottery.ActiveRound.UserTicketCount }}

Your current contribution: {{ money $page.Lottery.ActiveRound.UserContributionMinor }}

{{ else }}

No active round yet. The first deposit starts the next one-hour lottery window.

{{ end }}

Recent winners

{{ range $page.Lottery.RecentPayouts }} {{ else }} {{ end }}
WhenWinnerPoolTickets
{{ dt .CompletedAt }} {{ .WinnerUsername }}
{{ .WinnerAccount }}
{{ money .PoolMinor }} {{ .TicketCount }}
No lottery winners yet.
{{ end }} {{ define "admin_dashboard" }} {{ $page := .Data }}
Users{{ $page.Dashboard.UserCount }}
Accounts{{ $page.Dashboard.AccountCount }}
Transactions{{ $page.Dashboard.TransactionCount }}
Frozen users{{ $page.Dashboard.FrozenUserCount }}

Recent transactions

{{ template "transaction_table" $page.Dashboard.RecentTransactions }}

Recent audit activity

{{ range $page.Dashboard.RecentAuditActivity }} {{ else }} {{ end }}
WhenAdminActionTarget
{{ dt .CreatedAt }}{{ .AdminEmail }}{{ .Action }}{{ .TargetType }} / {{ .TargetID }}
No audit activity yet.
{{ end }} {{ define "admin_users" }} {{ $page := .Data }}

Users

Search by email, username, or account number.

{{ range $page.Users }} {{ else }} {{ end }}
UserAccountStatusBalanceCreated
{{ .Username }}
{{ .Email }}
{{ .AccountNumber }} {{ .Status }} {{ money .BalanceMinor }} {{ dt .CreatedAt }}
No users found.
{{ end }} {{ define "admin_user_detail" }} {{ $page := .Data }}

{{ $page.User.Username }}

{{ $page.User.Email }}

Account number: {{ $page.User.AccountNumber }}

Balance: {{ money $page.User.BalanceMinor }}

Status: {{ $page.User.Status }}

{{ if eq $page.User.Status "active" }}
{{ else }}
{{ end }}

Adjust balance

Recent transactions

{{ template "transaction_table" $page.Transactions }}
{{ end }} {{ define "admin_audit_logs" }}

Audit logs

{{ range .Data }} {{ else }} {{ end }}
WhenAdminActionTargetMetadata
{{ dt .CreatedAt }} {{ .AdminEmail }} {{ .Action }} {{ .TargetType }} / {{ .TargetID }} {{ .Metadata }}
No audit logs yet.
{{ end }} {{ define "transaction_table" }}
{{ range . }} {{ else }} {{ end }}
WhenTypeDirectionSenderRecipientAmountDescription
{{ dt .CreatedAt }} {{ .Type }} {{ .Direction }} {{ if .SenderAccount }}{{ .SenderAccount }}{{ else }}-{{ end }} {{ if .RecipientAccount }}{{ .RecipientAccount }}{{ else }}-{{ end }} {{ money .AmountMinor }} {{ .Description }}
No transactions yet.
{{ end }}