Commit graph

84 commits

Author SHA1 Message Date
Claude
faa0d89e8d
fix: SQLite database path in container + create on build
Container was using host path for SQLite. Now creates database.sqlite
during Docker build and sets DB_DATABASE=/app/database/database.sqlite
in compose env. Migrations run on startup via laravel-entrypoint.sh.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 11:36:08 +01:00
Claude
f60f0803da
fix: status page handles wallet RPC unreachable gracefully
WalletRpc::getBalance() can throw when wallet is on localhost and
app runs in Docker. Wrapped in try/catch so status page degrades
gracefully instead of 500ing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 11:34:07 +01:00
Claude
4f72d62146
feat: Octane domain middleware + fix catch-all route conflicts
DomainScope middleware checks Host header per-request — Octane-safe.
Applied to Api homepage (scoped to api.lthn.io). Explorer and Docs
subdomain routes stay disabled — catch-all routes like /{section}/{page?}
match before middleware runs, breaking other routes. These modules
need own containers for proper domain isolation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 11:31:19 +01:00
Claude
41a13e6ef4
refactor: extract ChainDaemon and ChainWallet interface contracts
DaemonRpc implements ChainDaemon, WalletRpc implements ChainWallet.
Interfaces bound in FrameworkBooted — enables mocking for tests and
swapping to Go wrapper when go-process is ready. Concrete bindings
kept for backwards compatibility.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 11:26:25 +01:00
Claude
ca11c4ccee
refactor: extract Actions for CheckAvailability, SubmitClaim, RegisterName
CorePHP Actions pattern — single-purpose classes with static ::run().
Controller methods now delegate to Actions. Each Action validates,
executes, and returns typed results. Enables reuse from commands,
jobs, and tests without going through HTTP.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 11:24:27 +01:00
Claude
2b91476cf7
refactor: move pre-registration claims from Cache to database model
Claims stored in Cache were lost on cache clear. Now persisted in
name_claims SQLite table via NameClaim Eloquent model. Auto-generates
claim_id via random_bytes. Scopes: pending(), approved(). Methods:
approve(), reject(). Status page updated to query model.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 11:21:58 +01:00
Claude
9b1a062f2e
fix: revert @cspnonce — Headers Boot not registering directive
The @cspnonce Blade directive isn't available (Headers module not
loading). Reverted to plain <script>/<style> tags. unsafe-inline
in CSP config handles security. Nonces re-added when Headers Boot
is properly integrated.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 11:14:41 +01:00
Claude
7070d45e1c
fix: lthn.io running on FrankenPHP Octane via Docker
Container on noc-net network for Traefik DNS resolution.
Traefik routes to http://lthn-io:80. All pages serving 200.
Disabled Mod/Home (conflicting / route), disabled subdomain
Website modules (Octane can't scope routes by domain at boot).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 11:08:24 +01:00
Claude
b1227f08d3
fix: disable subdomain Website modules to fix Octane route conflicts
Explorer, Docs, Pool, Trade, Names subdomain Website modules had
routes at root (/) that conflicted with the Lethean homepage when
registered unconditionally (required for Octane). Disabled subdomain
routes — Mod modules handle prefixed paths (/explorer, /names etc).

Container now serves all 10+ pages correctly on FrankenPHP Octane.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 11:06:02 +01:00
Claude
32d64561b2
fix: Octane compatibility — unconditional route registration
Octane registers routes once at startup when $_SERVER['HTTP_HOST']
is not available. All Website modules now register routes without
domain checks. Pool/Trade/Names subdomain routes disabled (views
not built). Home module disabled (Lethean handles homepage).

Container now serves 200 on FrankenPHP Octane.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 11:03:03 +01:00
Claude
5d38d09c3a
wip: FrankenPHP container setup (Octane + Supervisor)
Dockerfile from hostuk (FrankenPHP 1-php8.5), stripped scorer binary.
Supervisor config simplified for lthn.io (no horizon/reverb).
Octane + Predis installed. docker-compose.yml with Traefik labels,
host.docker.internal for daemon/wallet/LNS access, file cache.

TODO: Fix view namespace resolution inside container (localhost
doesn't match Lethean $domains). Need to add localhost to Lethean
$domains or test with proper Host header.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 10:54:20 +01:00
Claude
9286f84020
feat: chain:start and chain:status artisan commands
CorePHP manages the testnet chain binaries via ConsoleBooting lifecycle.
chain:start checks if daemon/wallet are running, starts them if not,
waits for RPC readiness. chain:status shows daemon height, aliases,
PoS status, wallet and LNS node state. Config-driven paths for
binary locations, data dirs, mining address.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 10:39:24 +01:00
Claude
c89bee8e51
feat: add FrankenPHP + Octane Dockerfile and docker-compose
Copied production-quality Dockerfile from hostuk (FrankenPHP 1-php8.5,
Octane, Supervisor, Redis). Added docker-compose.yml with Traefik
labels for lthn.io, api.lthn.io, docs.lthn.io, explorer.lthn.io.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 10:36:42 +01:00
Claude
8a21996add
security: add CSP nonce attributes to inline scripts and styles
Added @cspnonce to all inline <script> and <style> tags in layout,
explorer, and register views. Enabled nonce generation in headers
config. unsafe-inline kept as fallback. Nonces will activate after
container restart when the Headers Boot registers the Blade directive.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 10:22:38 +01:00
Claude
a04c5a226d
refactor: move Chain Boot singletons to FrameworkBooted
DaemonRpc, WalletRpc singletons and config now register in
FrameworkBooted instead of WebRoutesRegistering. Per CorePHP docs,
service registration belongs in FrameworkBooted. Controller DI
resolves lazily so singletons don't need to exist during route
registration. Verified health endpoint still works.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 10:19:52 +01:00
Claude
63447cba2a
docs: 23 additional content pages for docs.lthn.io
Complete documentation across all 6 sections:
- Getting Started (4): introduction, quick-start, registration, dns-management
- Chain (5): overview, daemon-rpc, wallet-rpc, mining, aliases, hardforks
- Names (4): overview, registration, dns-records, sunrise, sidechain
- Services (4): dns-hosting, ssl-certificates, proxy-network, gateway-operators
- API (6): overview, names, explorer, proxy, gateway, authentication
- Governance (3): cic, wallet-holders, economics

28 markdown pages total, covering the full Lethean ecosystem.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 10:15:18 +01:00
Claude
0bc44d483d
feat: Website/Docs module for docs.lthn.io
Full documentation site with sidebar navigation, search, markdown
rendering, and prev/next navigation. Initial content: introduction,
chain overview, name system, API reference, CIC governance.

Lethean Boot.php now only registers routes on matching domains
(lthn.io, testnet.lthn.io, localhost) — no longer bleeds onto
api.*, docs.*, explorer.* subdomains.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 10:07:21 +01:00
Claude
6ebb8407a2
refactor: adopt CorePHP patterns in Pool, Trade, Names Website modules
All three Website modules now use $event->routes() with domain-scoped
routing. On their subdomain (e.g. pool.lthn.io): routes serve at root.
On lthn.io: the Mod modules handle the prefixed paths (/pool, /trade,
/names). Removed loadViewsFrom from boot() where views are already
registered by the corresponding Mod modules.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 09:58:38 +01:00
Claude
c1402cade5
refactor: Website/Explorer uses $event->routes() and domain-scoped routing
On explorer.lthn.io: routes serve at root (/). On lthn.io: Mod/Explorer
handles the /explorer prefix. Adopted CorePHP $event->routes() pattern.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 09:57:23 +01:00
Claude
712a5c56b7
fix: exclude Lethean web routes from api.* domains
Lethean module now checks HTTP_HOST and skips route registration on
api.* domains. This lets the Website/Api module's homepage route win
on api.lthn.io. Also migrated to $event->routes() pattern.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 09:55:23 +01:00
Claude
c0ab4aa27b
fix: update API URLs for production domain separation
Widget.js default API URL changed to api.lthn.io. API docs page "Try"
links now use configurable API_URL. Base URL display is dynamic.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 09:50:37 +01:00
Claude
07051071a4
feat: Sunrise Fast Track — $49 BTC to skip verification queue
Adds paid fast-track option to sunrise page, reserved name detail
pages, and pricing table. Links to Blesta order form for BTCPay
payment. Three clear paths: free DNS verification, free manual
verification, or $49 BTC fast track with immediate registration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 09:46:20 +01:00
Claude
d83c9094cd
refactor: move /v1/* API routes exclusively to Website/Api module
Production stack has honeypot that null-routes API payloads sent to
the web domain. API routes now only register via Website/Api module
(api.lthn.io). Mod modules stripped to web-only routes. Frontend JS
fetch calls use configurable API_URL for cross-origin API access.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 09:36:59 +01:00
Claude
6b2032c687
fix: exclude API routes from CSRF validation
POST endpoints on /v1/* were returning 419 CSRF mismatch because
$event->routes() wraps routes in the web middleware group which
includes ValidateCsrfToken. External clients (Blesta, curl) can't
send CSRF tokens. withoutMiddleware() on /v1/* prefixes fixes this.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 09:26:54 +01:00
Claude
45ad7f3858
fix: publish CSP config with unsafe-inline for inline styles/scripts
The $event->routes() pattern applies SecurityHeaders middleware which
sets CSP. Inline <style> and <script> tags in Blade views need
unsafe-inline to render. Published config from framework with fix.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 09:22:04 +01:00
Claude
01533975a7
fix: add 'Why' link to navigation bar
The Why Lethean page (/about) existed but was unreachable from the nav.
CTOs need to find the CIC governance and positioning page.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 09:16:37 +01:00
Claude
646fb0602f
refactor: adopt CorePHP lifecycle event patterns in all Mod modules
All 6 Mod modules now use $event->routes() and $event->views() instead
of raw Route:: and app('view')-> calls. Service singletons moved to
FrameworkBooted where appropriate. Website/Api module added for
api.lthn.io domain with proper DomainResolving.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 09:13:34 +01:00
Claude
f1b741da49
feat(names): enrich name detail pages with DNS records + services
Name detail pages now show DNS records from sidechain, ITNS sidechain
registration, services links (DNS/SSL/Proxy), and CIC governance label
for community members. Available names link to claim page.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 08:47:20 +01:00
Claude
db24961a0f
docs: add claim endpoints + 5 missing explorer endpoints to /docs
API reference now covers all 29 endpoints across Names (13), Proxy (5),
Gateway (4), and Explorer (7). All GET endpoints verified returning 200.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 08:35:08 +01:00
Claude
774e9be207
feat: /status page with live system health checks
Shows blockchain daemon, wallet, gateways, name registry, and consensus
status with green/amber indicators. Chain stats, hardfork status, and
gateway details. Footer link added.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 08:33:14 +01:00
Claude
1f31444171
feat(names): pre-registration claim system for soft launch
Adds claim/listClaims endpoints so visitors can reserve .lthn names
before chain registration is fully automated. Claims are stored with
email for notification when approved. Admin endpoint lists all claims.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 08:30:23 +01:00
Claude
9b4b6d5264
feat: instant name registration page with live availability check
- /names/register: search → see result → one-click register
- Live API check via JavaScript (no page reload)
- Green "Register now" button links directly to Blesta checkout
- Reserved names link to /sunrise, taken names link to detail page
- Requirements and features shown alongside search
- Autofocus on input, Enter key support

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 08:15:46 +01:00
Claude
0220be23a4
fix: medium code review findings
- NodeSelector: array_values inside cache closure (fix key gaps)
- GatewayRegistry: prune expired entries from live_list on access
- Removed orphaned lethean::names view (replaced by names::index)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 08:10:58 +01:00
Claude
a5f28d5f6f
security: fix critical + high code review findings
CRITICAL:
- DaemonRpc: only cache successful responses as stale fallback (not errors)
- Records endpoint: replaced file_get_contents with Http::timeout(3)

HIGH:
- WalletRpc: removed exception message from API response (IP leak)
- Ticket/session IDs: replaced MD5(predictable) with random_bytes (CSPRNG)
- Race condition lock: Cache::add() atomic instead of has()+put()

MEDIUM:
- Block caching: getBlockByHeight cached 1hr (blocks are immutable)
- Sunrise meta description: fixed Blade variable syntax

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 08:08:18 +01:00
Claude
5e631f5a68
feat: Web3 Starter Bundle — name + DNS Pro + DV SSL for $9.99/yr
- Bundle package: saves 85% vs buying separately ($64.87 → $9.99)
- New order form: /order/bundles
- Pricing page shows bundle with strikethrough original price
- 6 Blesta order forms total: domains, ssl, dns, proxy, bundles

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 08:04:22 +01:00
Claude
d96821f795
fix: pricing page shows monthly proxy plans with overage rates 2026-04-04 08:02:56 +01:00
Claude
bb6c7693e2
feat: proxy order form + affiliate program + all product links wired
- Proxy Services: Residential $49.99/mo, Mobile $99.99/mo, SEO $29.99/mo
- 5 Blesta order forms: domains, ssl, dns, proxy (+ old form 2)
- Affiliate program enabled: 10% commission
- All service pages link to correct order forms with group_ids
- .lthn internal SSL section on /services/ssl with trust model

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 08:01:34 +01:00
Claude
a336a35139
feat: .lthn internal SSL section + proxy order links + trust model
- SSL page: lthn.ca Certificate Authority section with trust model
- Valid/revoked/no cert visual trust indicators
- Proxy service pages link to proxy order form
- Foundation for lthn.ca ACME integration

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 07:59:37 +01:00
Claude
2264b7c151
fix(explorer): live feed moved to top, capped at 8 lines 2026-04-04 07:55:53 +01:00
Claude
425d54f251
feat: improved footer with quick links — Pricing, API, Sunrise, Order, Source, Contact 2026-04-04 07:54:34 +01:00
Claude
cfd977aaaf
feat(explorer): live chain feed with 10s polling
- Real-time block notifications at bottom of explorer
- Green dot pulses on new blocks
- Shows block height, connection status, name/tx counts
- Polls /v1/explorer/info every 10 seconds
- Auto-scrolling feed, max 50 entries

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 07:44:40 +01:00
Claude
21975b8ffe
fix: API docs at /docs (not /api — route conflict with Laravel) 2026-04-04 07:26:21 +01:00
Claude
03a9b55bf8
feat: interactive API reference page + domain corrections
- /api page with all 22 endpoints: Names, Proxy, Gateway, Explorer
- "Try" links on public GET endpoints for live testing
- Auth docs, widget embed code
- GET=green badge, POST=amber badge
- lthn.ca = Certificate Authority (not Canada)
- Nav API link now goes to /api page

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 07:25:56 +01:00
Claude
8deebc8384
feat: "Why Lethean" page replacing sparse about page
- CIC governance explained (UK law, 8-pac voting, enforceable)
- Blockchain-native vs database comparison table
- 6 feature cards: CIC, blockchain, BTC, open source, wholesale, decentralised
- Lethean vs Traditional Registrars comparison table
- CTA to pricing page

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 07:05:43 +01:00
Claude
1c294455cd
feat: pricing page with full product comparison
- /pricing — all products in one view: names, SSL, DNS, proxy
- Names: free registration + sunrise claims
- SSL: 6 tiers from DV $4.99 to EV $69.99
- DNS: 3 tiers from free to enterprise $14.99/mo
- Proxy: 3 models from $1/1K requests to $5/GB mobile
- "All payments via BTC" CTA
- Added to nav between Services and Network

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 06:59:08 +01:00
Claude
d293d2f221
feat(blesta): SSL + DNS order forms and packages
- SSL Certificates order form with 4 packages: DV ($4.99), Wildcard ($39.99), IP SSL ($18), Code Signing ($59.99)
- DNS Hosting order form with 3 packages: Starter (free), Pro ($4.99/mo), Enterprise ($14.99/mo)
- Package groups created: SSL Certificates, DNS Hosting
- Order links on lthn.io pages point to correct Blesta forms
- Packages use None module as placeholder until GoGetSSL/ClouDNS creds added

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 06:56:46 +01:00
Claude
d17fe54cf1
feat: full registrar product suite — SSL, DNS hosting, updated homepage
- /services/ssl — GoGetSSL wholesale: DV, Wildcard, IP SSL, OV, EV, Code Signing
- /services/dns-hosting — ClouDNS tiers: Starter (free), Pro ($4.99), Enterprise ($14.99)
- Services landing includes SSL + DNS cards alongside proxy categories
- Homepage: "Names. DNS. SSL. Proxy." hero with full product grid
- Six product cards: .lthn Names, DNS Hosting, SSL Certs, Proxy, Explorer, Discovery
- All linked to order.lthn.ai for purchase

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 06:49:41 +01:00
Claude
ed300e200e
feat(sunrise): verify then pay claim flow + ownership tiers
- Verify response includes claim_process (4 steps: verify → check → pay → transfer)
- Ownership tiers: free (registry key, limited DNS) vs paid (your key, full control)
- Check response includes purchase_url when verified
- Payment via Blesta/BTCPay completes the claim

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 06:34:26 +01:00
Claude
cf24879c9c
fix: remove letterhead as accepted proof (forgeable) 2026-04-04 06:29:20 +01:00
Claude
054b2e6161
feat(sunrise): DNS TXT verification for brand claims (HNS-style)
- GET /v1/names/sunrise/verify/{name} — generate verification token
- GET /v1/names/sunrise/check/{name} — check TXT record across .com/.org/.net/.io/.co.uk
- Token: _lthn-verify.brand.com TXT "lthn-verify={hash}"
- Same process as Handshake TLD claims
- Sunrise page shows both auto (DNS) and manual (email) verification paths
- Automatic claim when DNS record matches

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 06:28:58 +01:00