How integeralex/fingerprint-oss-demo works
Project type and purpose
• This is a frontend-focused demo application built with Next.js 13 (App Router) and React, showcasing the capabilities of the Fingerprint OSS library.
• It’s a static-export site (hosted on GitHub Pages) that, at runtime, calls Fingerprint OSS in the browser, collects fingerprint data, and renders it via React components.
Main components
a. Developer & Build Environment
• Source code (app/, components/, hooks/, lib/, styles/, public/)
• Configuration files (next.config.mjs, tailwind.config.ts, postcss.config.mjs, tsconfig.json, package.json)
• Build toolchain (Node.js + pnpm) → Next.js compiler + Tailwind/PostCSS → Static assets
b. Hosting & Delivery
• GitHub Pages (or any static host) serving the generated HTML/CSS/JS from the build
c. Client-side Runtime
• Browser
– Next.js Client Bundle (React app)
– Global layout (app/layout.tsx) + Routing (app/page.tsx)
– UI Component Library (components/ui/* & custom components like fingerprint-display.tsx)
– Custom Hooks (hooks/use-mobile.tsx, hooks/use-toast.ts)
– Utility modules (lib/utils.ts)
– Fingerprint OSS library (npm dependency)
Relationships and data flow
1. Developer writes code → runs npm run build → Next.js + Tailwind produce static assets.
2. CI/deployment pushes assets to GitHub Pages.
3. End user’s browser requests the page → static HTML/CSS/JS is delivered.
4. On page load:
• React hydrates the App Router root (app/layout.tsx → app/page.tsx).
• fingerprint-display component (or a hook) invokes the Fingerprint OSS library.
• The library collects data (browser info, OS, hardware, network, time zones).
• Results bubble up through React state into UI components.
• Custom hooks (use-toast) trigger notifications; use-mobile adapts layout.
Architectural patterns & design principles
• Component-based architecture (atomic UI in components/ui).
• Separation of concerns:
• Presentation (React components in components/)
• Domain logic (Fingerprint OSS calls wrapped in components or hooks)
• Utility functions (lib/utils.ts)
• Styling (Tailwind CSS via globals.css & postcss)
• Static-first deployment (pre-built assets, no runtime server).
Essential elements to capture
• Clear labels for: Next.js App, React Components, Fingerprint OSS library, Custom Hooks, Utilities, Build Config, Hosting Platform.
• Deployment flow from source → CI/build → GitHub Pages → end-user browser.