How tudeptrai1712/bio-page works
Self-Hosted Bio Page serves a customizable public link-in-bio page and an authenticated admin dashboard. Visitors receive server-rendered profile content; the public API also exposes profile/theme data and records views and link clicks. Admins edit profile and links, manage uploads, and configure password, TOTP, and passkey sign-in. SQLite stores application records; Redis accelerates public responses, tracks counters, and stores challenges and revocations. The source index and excerpts show the main route wiring and selected calls; some UI-to-API and unsampled feature details are documented in the README rather than verified in source.
Main entry points: app.js HTTP Application · auth.js Password and TOTP API · webauthn.js Passkey API · redis.js Redis and Cache
Components 22
Web Experience
- HTTP Application
src/app.js - Public Page UI
public/js/main.js - Admin Dashboard UI
src/views/admin/admin.js - Login UI
public/js/login.js - Passkey Manager UI
src/views/admin/webauthn-admin.js
Profile and Analytics
- Public API
src/routes/public.js - Page Renderer
src/renderer.js - Admin API
src/routes/admin.js - Analytics Events
src/routes/public.js
Authentication and Security
- Password and TOTP API
src/routes/auth.js - Passkey API
src/routes/webauthn.js - Session and Password Logic
src/auth.js - TOTP Logic
src/totp.js - WebAuthn Logic
src/webauthn.js - Security Middleware
src/middleware/security.js - Rate Limiter
src/middleware/rateLimit.js - Upload Protection
src/middleware/upload.js
Data and Services
- SQLite Database
src/db.js - Redis and Cache
src/redis.js - Audit Logger
src/logger.js
Other components
- Visitor
- Admin
Connections 36
- Visitor → HTTP Application: requests page
src/app.js - Admin → HTTP Application: opens dashboard
src/app.js - HTTP Application → Page Renderer: renders page
src/app.js - HTTP Application → Public API: mounts routes
src/app.js - HTTP Application → Password and TOTP API: mounts routes
src/app.js - HTTP Application → Passkey API: mounts routes
src/app.js - HTTP Application → Admin API: mounts routes
src/app.js - HTTP Application → Security Middleware: applies headers
src/app.js - Page Renderer → SQLite Database: reads profile
src/renderer.js - Page Renderer → Redis and Cache: reads and caches HTML
src/renderer.js - Public API → SQLite Database: reads public data
src/routes/public.js - Public API → Redis and Cache: caches profile and theme
src/routes/public.js - Public API → Analytics Events: routes analytics
src/app.js - Analytics Events → SQLite Database: records events
src/routes/public.js - Analytics Events → Redis and Cache: increments counters
src/routes/public.js - Admin API → SQLite Database: updates content
src/routes/admin.js - Admin API → Redis and Cache: invalidates cache
src/routes/admin.js - Admin API → Upload Protection: validates uploads
src/routes/admin.js - Password and TOTP API → SQLite Database: checks credentials
src/routes/auth.js - Password and TOTP API → Session and Password Logic: uses session logic
src/routes/auth.js - Password and TOTP API → TOTP Logic: verifies codes
src/routes/auth.js - Password and TOTP API → Rate Limiter: limits attempts
src/routes/auth.js - Passkey API → SQLite Database: loads credentials
src/routes/webauthn.js - Passkey API → Session and Password Logic: creates sessions
src/routes/webauthn.js - Passkey API → Redis and Cache: stores challenges
src/routes/webauthn.js - Passkey API → WebAuthn Logic: verifies credentials
src/routes/webauthn.js - Passkey API → Rate Limiter: limits attempts
src/routes/webauthn.js - Session and Password Logic → Redis and Cache: stores revocations
src/auth.js - Rate Limiter → Redis and Cache: uses distributed limits
src/middleware/rateLimit.js - Rate Limiter → Audit Logger: logs blocked requests
src/middleware/rateLimit.js - Password and TOTP API → Audit Logger: audits sign-in
src/routes/auth.js - Admin API → Audit Logger: audits changes
src/routes/admin.js - Public Page UI → HTTP Application: requests page data
README.md - Admin Dashboard UI → HTTP Application: edits bio settings
README.md - Login UI → HTTP Application: starts sign-in
README.md - Passkey Manager UI → HTTP Application: manages passkeys
README.md