# anonymous-hyena/project-hyena architecture

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

- Interactive diagram: https://gitdiagram.com/anonymous-hyena/project-hyena
- Repository: https://github.com/anonymous-hyena/project-hyena

## Overview

Anonymous Hyena is a community project-discovery and submission app with Google sign-in, optional GitHub linking, profile and notification features, and staff moderation. The main workflow is: a user signs in, connects GitHub, submits an owned public repository, and staff review it before it becomes publicly discoverable. The graph includes documented admin and moderation capabilities even where the UI implementation was not sampled; those UI-to-API links are marked unverified. Source excerpts show the server API’s database calls and the auth server’s dispatch to it.

Main entry points: [`src/App.jsx`](https://github.com/anonymous-hyena/project-hyena/blob/main/src/App.jsx) (App shell), [`server/authServer.js`](https://github.com/anonymous-hyena/project-hyena/blob/main/server/authServer.js) (Auth server), [`src/api.js`](https://github.com/anonymous-hyena/project-hyena/blob/main/src/api.js) (JSON client), [`server/api.js`](https://github.com/anonymous-hyena/project-hyena/blob/main/server/api.js) (API handlers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_app["App shell<br/>[App.jsx]"]
  node_catalog["Project catalog<br/>[siteData.js]"]
  node_http["JSON client<br/>[api.js]"]
end

subgraph group_identity["Identity"]
  node_auth["Auth server<br/>[authServer.js]"]
end

subgraph group_workflows["Community workflows"]
  node_contribution["Submission form"]
  node_profile["Profile editor<br/>[ProfileDialog.jsx]"]
  node_admin["Staff portal<br/>[AdminPortal.jsx]"]
  node_notifications["Notifications<br/>[App.jsx]"]
end

subgraph group_server["Application server"]
  node_api["API handlers<br/>[api.js]"]
  node_database[("App database<br/>[database.js]")]
end

node_visitor(("Visitor"))
node_google{{"Google OAuth"}}
node_github{{"GitHub API"}}
node_sqlite[("SQLite store")]

node_visitor -->|"uses"| node_app
node_app -->|"loads"| node_catalog
node_app -->|"opens"| node_contribution
node_app -->|"opens"| node_profile
node_app -->|"renders"| node_admin
node_app -->|"shows"| node_notifications
node_app -->|"requests"| node_http
node_contribution -->|"submits via"| node_http
node_profile -->|"saves via"| node_http
node_notifications -->|"loads via"| node_http
node_http -.->|"calls"| node_api
node_admin -.->|"manages via"| node_api
node_app -->|"checks session"| node_auth
node_app -->|"signs out via"| node_auth
node_visitor -->|"signs in"| node_auth
node_auth -->|"authorizes with"| node_google
node_auth -->|"links account"| node_github
node_auth -->|"updates account"| node_database
node_auth -->|"dispatches to"| node_api
node_api -->|"reads and writes"| node_database
node_database -->|"persists in"| node_sqlite

click node_app "https://github.com/anonymous-hyena/project-hyena/blob/main/src/App.jsx"
click node_catalog "https://github.com/anonymous-hyena/project-hyena/blob/main/src/data/siteData.js"
click node_contribution "https://github.com/anonymous-hyena/project-hyena/blob/main/src/ContributionDialog.jsx"
click node_profile "https://github.com/anonymous-hyena/project-hyena/blob/main/src/ProfileDialog.jsx"
click node_admin "https://github.com/anonymous-hyena/project-hyena/blob/main/src/AdminPortal.jsx"
click node_notifications "https://github.com/anonymous-hyena/project-hyena/blob/main/src/App.jsx"
click node_http "https://github.com/anonymous-hyena/project-hyena/blob/main/src/api.js"
click node_auth "https://github.com/anonymous-hyena/project-hyena/blob/main/server/authServer.js"
click node_api "https://github.com/anonymous-hyena/project-hyena/blob/main/server/api.js"
click node_database "https://github.com/anonymous-hyena/project-hyena/blob/main/server/database.js"

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_catalog,node_http toneBlue
class node_auth,node_sqlite toneAmber
class node_contribution,node_profile,node_admin,node_notifications,node_github toneMint
class node_api,node_database toneRose
class node_visitor,node_google toneIndigo
```

## Components

### Web experience

- [App shell](https://github.com/anonymous-hyena/project-hyena/blob/main/src/App.jsx): `src/App.jsx`
- [Project catalog](https://github.com/anonymous-hyena/project-hyena/blob/main/src/data/siteData.js): `src/data/siteData.js`
- [JSON client](https://github.com/anonymous-hyena/project-hyena/blob/main/src/api.js): `src/api.js`

### Identity

- [Auth server](https://github.com/anonymous-hyena/project-hyena/blob/main/server/authServer.js): `server/authServer.js`

### Community workflows

- [Submission form](https://github.com/anonymous-hyena/project-hyena/blob/main/src/ContributionDialog.jsx): `src/ContributionDialog.jsx`
- [Profile editor](https://github.com/anonymous-hyena/project-hyena/blob/main/src/ProfileDialog.jsx): `src/ProfileDialog.jsx`
- [Staff portal](https://github.com/anonymous-hyena/project-hyena/blob/main/src/AdminPortal.jsx): `src/AdminPortal.jsx`
- [Notifications](https://github.com/anonymous-hyena/project-hyena/blob/main/src/App.jsx): `src/App.jsx`

### Application server

- [API handlers](https://github.com/anonymous-hyena/project-hyena/blob/main/server/api.js): `server/api.js`
- [App database](https://github.com/anonymous-hyena/project-hyena/blob/main/server/database.js): `server/database.js`

### Other components

- **Visitor**
- **Google OAuth**
- **GitHub API**
- **SQLite store**

## Connections

- Visitor → App shell: uses (evidence: `README.md`)
- App shell → Project catalog: loads (evidence: `src/App.jsx`)
- App shell → Submission form: opens (evidence: `src/App.jsx`)
- App shell → Profile editor: opens (evidence: `src/App.jsx`)
- App shell → Staff portal: renders (evidence: `src/App.jsx`)
- App shell → Notifications: shows (evidence: `src/App.jsx`)
- App shell → JSON client: requests (evidence: `src/App.jsx`)
- Submission form → JSON client: submits via (evidence: `src/ContributionDialog.jsx`)
- Profile editor → JSON client: saves via (evidence: `src/ProfileDialog.jsx`)
- Notifications → JSON client: loads via (evidence: `src/App.jsx`)
- JSON client → API handlers: calls
- Staff portal → API handlers: manages via
- App shell → Auth server: checks session (evidence: `src/App.jsx`)
- App shell → Auth server: signs out via (evidence: `src/App.jsx`)
- Visitor → Auth server: signs in (evidence: `README.md`)
- Auth server → Google OAuth: authorizes with (evidence: `server/authServer.js`)
- Auth server → GitHub API: links account (evidence: `server/authServer.js`)
- Auth server → App database: updates account (evidence: `server/authServer.js`)
- Auth server → API handlers: dispatches to (evidence: `server/authServer.js`)
- API handlers → App database: reads and writes (evidence: `server/api.js`)
- App database → SQLite store: persists in (evidence: `server/database.js`)
