# denmarkdeni/fakedetect architecture

> Architecture diagram of the GitHub repository denmarkdeni/fakedetect, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/denmarkdeni/fakedetect
- Repository: https://github.com/denmarkdeni/fakedetect

## Overview

Fake Detect is a marketplace-oriented counterfeit-reporting and trust platform: customers browse products, flag suspected counterfeits, and use shopping features, while sellers manage listings and administrators review products, flags, and users. The frontend routes role-specific screens and calls a Django REST API backed by marketplace models. Email verification is a documented registration-to-login flow. Source excerpts do not expose the complete API routing or most feature implementations, so uncertain frontend/backend links are dashed or omitted.

Main entry points: [`frontend/src/App.js`](https://github.com/denmarkdeni/fakedetect/blob/main/frontend/src/App.js) (App Router), [`backend/api_app/views.py`](https://github.com/denmarkdeni/fakedetect/blob/main/backend/api_app/views.py) (API Views), [`frontend/src/pages/auth.js`](https://github.com/denmarkdeni/fakedetect/blob/main/frontend/src/pages/auth.js) (Authentication), [`frontend/src/pages/EmailVerified.js`](https://github.com/denmarkdeni/fakedetect/blob/main/frontend/src/pages/EmailVerified.js) (Email Verification)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend"]
  node_app["App Router<br/>[App.js]"]
  node_home["Home Page<br/>[Home.js]"]
  node_auth["Authentication<br/>[auth.js]"]
  node_verification["Email Verification<br/>[EmailVerified.js]"]
  node_api_client["API Client<br/>[api.js]"]
end

subgraph group_commerce["Marketplace"]
  node_customer_views["Customer Screens"]
  node_customer_dashboard["Customer Dashboard"]
  node_product_details["Product Details<br/>[ProductDetails.js]"]
  node_seller_screens["Seller Screens<br/>[SellerProducts.js]"]
end

subgraph group_admin["Administration"]
  node_admin_screens["Admin Screens"]
end

subgraph group_backend["Backend"]
  node_api_views["API Views<br/>[views.py]"]
  node_serializers["Serializers<br/>[serializers.py]"]
  node_models[("Marketplace Models<br/>[models.py]")]
end

node_customer(("Customer"))
node_seller(("Seller"))
node_administrator(("Administrator"))
node_email_service["Email Service"]

node_customer -->|"uses"| node_app
node_seller -->|"uses"| node_app
node_administrator -->|"uses"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_auth
node_app -->|"routes to"| node_verification
node_app -->|"routes to"| node_customer_dashboard
node_app -->|"routes to"| node_product_details
node_app -->|"routes to"| node_customer_views
node_app -->|"routes to"| node_seller_screens
node_app -->|"routes to"| node_admin_screens
node_auth -->|"submits credentials"| node_api_client
node_product_details -.->|"requests product data"| node_api_views
node_customer_views -.->|"requests marketplace actions"| node_api_views
node_seller_screens -.->|"manages listings"| node_api_views
node_admin_screens -->|"manages products"| node_api_views
node_api_client -.->|"sends API requests"| node_api_views
node_api_views -->|"serializes records"| node_serializers
node_api_views -->|"reads and updates"| node_models
node_serializers -->|"serializes models"| node_models
node_auth -.->|"requests verification"| node_email_service
node_email_service -.->|"delivers link"| node_verification
node_verification -.->|"continues to login"| node_auth

click node_app "https://github.com/denmarkdeni/fakedetect/blob/main/frontend/src/App.js"
click node_home "https://github.com/denmarkdeni/fakedetect/blob/main/frontend/src/pages/Home.js"
click node_auth "https://github.com/denmarkdeni/fakedetect/blob/main/frontend/src/pages/auth.js"
click node_verification "https://github.com/denmarkdeni/fakedetect/blob/main/frontend/src/pages/EmailVerified.js"
click node_customer_views "https://github.com/denmarkdeni/fakedetect/tree/main/frontend/src/components/customer"
click node_customer_dashboard "https://github.com/denmarkdeni/fakedetect/blob/main/frontend/src/components/dashboards/CustomerDashboard.js"
click node_product_details "https://github.com/denmarkdeni/fakedetect/blob/main/frontend/src/components/dashboards/ProductDetails.js"
click node_seller_screens "https://github.com/denmarkdeni/fakedetect/blob/main/frontend/src/components/dashboards/SellerProducts.js"
click node_admin_screens "https://github.com/denmarkdeni/fakedetect/tree/main/frontend/src/components/admin"
click node_api_client "https://github.com/denmarkdeni/fakedetect/blob/main/frontend/src/api/api.js"
click node_api_views "https://github.com/denmarkdeni/fakedetect/blob/main/backend/api_app/views.py"
click node_serializers "https://github.com/denmarkdeni/fakedetect/blob/main/backend/api_app/serializers.py"
click node_models "https://github.com/denmarkdeni/fakedetect/blob/main/backend/api_app/models.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_home,node_auth,node_verification,node_api_client toneBlue
class node_customer_views,node_customer_dashboard,node_product_details,node_seller_screens toneAmber
class node_admin_screens toneMint
class node_api_views,node_serializers,node_models toneRose
class node_customer,node_seller,node_administrator,node_email_service toneIndigo
```

## Components

### Frontend

- [App Router](https://github.com/denmarkdeni/fakedetect/blob/main/frontend/src/App.js): `frontend/src/App.js`
- [Home Page](https://github.com/denmarkdeni/fakedetect/blob/main/frontend/src/pages/Home.js): `frontend/src/pages/Home.js`
- [Authentication](https://github.com/denmarkdeni/fakedetect/blob/main/frontend/src/pages/auth.js): `frontend/src/pages/auth.js`
- [Email Verification](https://github.com/denmarkdeni/fakedetect/blob/main/frontend/src/pages/EmailVerified.js): `frontend/src/pages/EmailVerified.js`
- [API Client](https://github.com/denmarkdeni/fakedetect/blob/main/frontend/src/api/api.js): `frontend/src/api/api.js`

### Marketplace

- [Customer Screens](https://github.com/denmarkdeni/fakedetect/tree/main/frontend/src/components/customer): `frontend/src/components/customer`
- [Customer Dashboard](https://github.com/denmarkdeni/fakedetect/blob/main/frontend/src/components/dashboards/CustomerDashboard.js): `frontend/src/components/dashboards/CustomerDashboard.js`
- [Product Details](https://github.com/denmarkdeni/fakedetect/blob/main/frontend/src/components/dashboards/ProductDetails.js): `frontend/src/components/dashboards/ProductDetails.js`
- [Seller Screens](https://github.com/denmarkdeni/fakedetect/blob/main/frontend/src/components/dashboards/SellerProducts.js): `frontend/src/components/dashboards/SellerProducts.js`

### Administration

- [Admin Screens](https://github.com/denmarkdeni/fakedetect/tree/main/frontend/src/components/admin): `frontend/src/components/admin`

### Backend

- [API Views](https://github.com/denmarkdeni/fakedetect/blob/main/backend/api_app/views.py): `backend/api_app/views.py`
- [Serializers](https://github.com/denmarkdeni/fakedetect/blob/main/backend/api_app/serializers.py): `backend/api_app/serializers.py`
- [Marketplace Models](https://github.com/denmarkdeni/fakedetect/blob/main/backend/api_app/models.py): `backend/api_app/models.py`

### Other components

- **Customer**
- **Seller**
- **Administrator**
- **Email Service**

## Connections

- Customer → App Router: uses
- Seller → App Router: uses
- Administrator → App Router: uses
- App Router → Home Page: routes to (evidence: `frontend/src/App.js`)
- App Router → Authentication: routes to (evidence: `frontend/src/App.js`)
- App Router → Email Verification: routes to (evidence: `frontend/src/App.js`)
- App Router → Customer Dashboard: routes to (evidence: `frontend/src/App.js`)
- App Router → Product Details: routes to (evidence: `frontend/src/App.js`)
- App Router → Customer Screens: routes to (evidence: `frontend/src/App.js`)
- App Router → Seller Screens: routes to (evidence: `frontend/src/App.js`)
- App Router → Admin Screens: routes to (evidence: `frontend/src/App.js`)
- Authentication → API Client: submits credentials (evidence: `frontend/src/pages/auth.js`)
- Product Details → API Views: requests product data
- Customer Screens → API Views: requests marketplace actions
- Seller Screens → API Views: manages listings
- Admin Screens → API Views: manages products (evidence: `frontend/src/components/admin/ProductManagement.js`)
- API Client → API Views: sends API requests
- API Views → Serializers: serializes records (evidence: `backend/api_app/views.py`)
- API Views → Marketplace Models: reads and updates (evidence: `backend/api_app/views.py`)
- Serializers → Marketplace Models: serializes models (evidence: `backend/api_app/serializers.py`)
- Authentication → Email Service: requests verification
- Email Service → Email Verification: delivers link
- Email Verification → Authentication: continues to login
