# jackpeplinski/verified-luxury-authentics architecture

> Architecture diagram of the GitHub repository jackpeplinski/verified-luxury-authentics, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jackpeplinski/verified-luxury-authentics
- Repository: https://github.com/jackpeplinski/verified-luxury-authentics

## Overview

##### Main Components
- Client (Frontend): This is a React-based web application found in the “client” directory. Its structure (with subdirectories for assets, components, pages, and styles) indicates a modern single-page application where users interact with the system to view product authenticity and ownership history.
- Server (Backend): The “server” directory comprises the backend logic (server.js and requests.js). This layer likely manages API endpoints, handles requests between the client and external systems, and coordinates the flow of data.
- External Systems/Services:
- Ethereum Blockchain: Based on the README, NFTs are minted on the Ethereum blockchain. Represent this as an external component where blockchain-related transactions occur.
- NFC Tag & Authentication Service (Seritag): Since NFC tags integrate with the blockchain and the authentication server provided by Seritag, include an external component representing this authentication service.

##### Relationships and Data Flows
- Optionally, include a data storage element if the server maintains any local records (such as caching or logging) even if it isn’t explicit in the tree.

##### Architectural Patterns/Design Principles
- Clear separation of concerns: the client (presentation/UI layer) is independent from the server (business logic/API layer).
- It follows a typical full-stack design pattern that involves API calls, third-party integrations, and external verifications.
- Micro-service like interaction with external systems—each external service (Ethereum blockchain and NFC authentication) can be viewed as loosely coupled.

##### Relevant Technologies & Frameworks
- For the Server: Indicate Node.js (as seen with package.json, server.js) handling API requests.
- For the Blockchain: Mention Ethereum and possibly smart contracts (NFT minting process).
- Specify the NFC/Seritag service as the external authentication provider that ties physical goods to NFTs.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Client (React Frontend)"
        FE["React Frontend"]:::frontend
    end

    subgraph "Server (Node.js API Server)"
        BE["Node.js API Server"]:::backend
    end

    subgraph "External Services"
        EB["Ethereum Blockchain"]:::external
        SN["Seritag NFC Authentication"]:::external
    end

    FE -->|"APIcalls"| BE
    BE -->|"NFTminting/query"| EB
    BE -->|"verifyauthenticity"| SN

    click FE "https://github.com/jackpeplinski/verified-luxury-authentics/tree/main/client/src"
    click BE "https://github.com/jackpeplinski/verified-luxury-authentics/blob/main/server/server.js"
    click BE "https://github.com/jackpeplinski/verified-luxury-authentics/blob/main/server/requests.js"

    classDef frontend fill:#cce5ff,stroke:#004085,stroke-width:2px;
    classDef backend fill:#d4edda,stroke:#155724,stroke-width:2px;
    classDef external fill:#fff3cd,stroke:#856404,stroke-width:2px;
```
