# marbeegit/hackathonscraper architecture

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

- Interactive diagram: https://gitdiagram.com/marbeegit/hackathonscraper
- Repository: https://github.com/marbeegit/hackathonscraper

## Overview

Hackathon Scraper aggregates listings from four platforms, normalizes and stores them, then exposes them through a REST API and web interface. Its main workflow is scheduled or manually triggered scraping, followed by persistence and browsing/filtering. The graph includes the documented deduplication capability, although its implementation and wiring were not sampled; the UI-to-API connection is likewise documented as a product capability but its HTTP call is not shown in the excerpts.

Main entry points: [`app/hackathons/page.tsx`](https://github.com/marbeegit/hackathonscraper/blob/master/app/hackathons/page.tsx) (Hackathon listing), [`src/api/server.ts`](https://github.com/marbeegit/hackathonscraper/blob/master/src/api/server.ts) (Express server), [`src/scheduler/index.ts`](https://github.com/marbeegit/hackathonscraper/blob/master/src/scheduler/index.ts) (Scrape scheduler), [`src/pipeline/scraper-pipeline.ts`](https://github.com/marbeegit/hackathonscraper/blob/master/src/pipeline/scraper-pipeline.ts) (Scrape pipeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Collection and scheduling"]
  node_scheduler["Scrape scheduler<br/>[index.ts]"]
  node_devpost["Devpost scraper<br/>[devpost.ts]"]
  node_unstop["Unstop scraper<br/>[unstop.ts]"]
  node_hackerearth["HackerEarth scraper<br/>[hackerearth.ts]"]
  node_devfolio["Devfolio scraper<br/>[devfolio.ts]"]
end

subgraph group_data["Validation and storage"]
  node_pipeline["Scrape pipeline"]
  node_schema["Canonical validation"]
  node_dedup["Cross-platform deduplication<br/>[deduplication.ts]"]
  node_repository["Data repository<br/>[repository.ts]"]
  node_sqlite[("SQLite database<br/>[index.ts]")]
end

subgraph group_service["API service"]
  node_api_server["Express server<br/>[server.ts]"]
  node_hackathon_routes["Hackathon routes<br/>[hackathons.ts]"]
  node_platform_routes["Platform routes<br/>[platforms.ts]"]
  node_admin_routes["Admin scrape route<br/>[admin.ts]"]
  node_health_routes["Health route<br/>[health.ts]"]
end

subgraph group_web["Web interface"]
  node_listing_page["Hackathon listing<br/>[page.tsx]"]
  node_detail_page["Hackathon detail<br/>[page.tsx]"]
  node_filter_bar["Filter controls<br/>[FilterBar.tsx]"]
  node_card["Hackathon card<br/>[HackathonCard.tsx]"]
  node_detail_view["Detail view"]
  node_freshness["Freshness indicator"]
  node_pagination["Pagination<br/>[Pagination.tsx]"]
end

node_source_platforms(("Hackathon platforms"))
node_visitor(("Web visitor"))
node_api_consumer(("Browser API client"))

node_scheduler -->|"dispatches"| node_devpost
node_scheduler -->|"dispatches"| node_unstop
node_scheduler -->|"dispatches"| node_hackerearth
node_scheduler -->|"dispatches"| node_devfolio
node_source_platforms -.->|"scrapes"| node_devpost
node_source_platforms -.->|"scrapes"| node_unstop
node_source_platforms -.->|"scrapes"| node_hackerearth
node_source_platforms -.->|"scrapes"| node_devfolio
node_scheduler -->|"invokes"| node_pipeline
node_pipeline -->|"uses validated output"| node_schema
node_devpost -->|"uses schema"| node_schema
node_unstop -->|"uses schema"| node_schema
node_hackerearth -->|"uses schema"| node_schema
node_devfolio -->|"uses schema"| node_schema
node_pipeline -->|"writes records"| node_repository
node_repository -->|"queries and writes"| node_sqlite
node_pipeline -.->|"deduplicates"| node_dedup
node_api_server -->|"routes requests"| node_hackathon_routes
node_api_server -->|"routes requests"| node_platform_routes
node_api_server -->|"routes requests"| node_admin_routes
node_api_server -->|"routes requests"| node_health_routes
node_api_server -->|"initializes"| node_sqlite
node_hackathon_routes -->|"queries records"| node_repository
node_platform_routes -->|"reads platforms"| node_repository
node_admin_routes -->|"triggers scrape"| node_pipeline
node_admin_routes -.->|"uses scraper"| node_devpost
node_visitor -->|"browses"| node_listing_page
node_visitor -->|"opens detail"| node_detail_page
node_listing_page -->|"renders"| node_filter_bar
node_listing_page -->|"renders"| node_card
node_listing_page -->|"renders"| node_freshness
node_listing_page -->|"renders"| node_pagination
node_detail_page -->|"renders"| node_detail_view
node_listing_page -.->|"fetches data"| node_api_consumer
node_detail_page -.->|"fetches data"| node_api_consumer
node_api_consumer -.->|"requests API"| node_api_server

click node_scheduler "https://github.com/marbeegit/hackathonscraper/blob/master/src/scheduler/index.ts"
click node_devpost "https://github.com/marbeegit/hackathonscraper/blob/master/src/scrapers/devpost.ts"
click node_unstop "https://github.com/marbeegit/hackathonscraper/blob/master/src/scrapers/unstop.ts"
click node_hackerearth "https://github.com/marbeegit/hackathonscraper/blob/master/src/scrapers/hackerearth.ts"
click node_devfolio "https://github.com/marbeegit/hackathonscraper/blob/master/src/scrapers/devfolio.ts"
click node_pipeline "https://github.com/marbeegit/hackathonscraper/blob/master/src/pipeline/scraper-pipeline.ts"
click node_schema "https://github.com/marbeegit/hackathonscraper/blob/master/src/schemas/hackathon.schema.ts"
click node_dedup "https://github.com/marbeegit/hackathonscraper/blob/master/src/db/deduplication.ts"
click node_repository "https://github.com/marbeegit/hackathonscraper/blob/master/src/db/repository.ts"
click node_sqlite "https://github.com/marbeegit/hackathonscraper/blob/master/src/db/index.ts"
click node_api_server "https://github.com/marbeegit/hackathonscraper/blob/master/src/api/server.ts"
click node_hackathon_routes "https://github.com/marbeegit/hackathonscraper/blob/master/src/api/routes/hackathons.ts"
click node_platform_routes "https://github.com/marbeegit/hackathonscraper/blob/master/src/api/routes/platforms.ts"
click node_admin_routes "https://github.com/marbeegit/hackathonscraper/blob/master/src/api/routes/admin.ts"
click node_health_routes "https://github.com/marbeegit/hackathonscraper/blob/master/src/api/routes/health.ts"
click node_listing_page "https://github.com/marbeegit/hackathonscraper/blob/master/app/hackathons/page.tsx"
click node_detail_page "https://github.com/marbeegit/hackathonscraper/blob/master/app/hackathons/%5Bid%5D/page.tsx"
click node_filter_bar "https://github.com/marbeegit/hackathonscraper/blob/master/src/components/FilterBar.tsx"
click node_card "https://github.com/marbeegit/hackathonscraper/blob/master/src/components/HackathonCard.tsx"
click node_detail_view "https://github.com/marbeegit/hackathonscraper/blob/master/src/components/HackathonDetail.tsx"
click node_freshness "https://github.com/marbeegit/hackathonscraper/blob/master/src/components/FreshnessIndicator.tsx"
click node_pagination "https://github.com/marbeegit/hackathonscraper/blob/master/src/components/Pagination.tsx"

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_scheduler,node_devpost,node_unstop,node_hackerearth,node_devfolio,node_api_consumer toneBlue
class node_pipeline,node_schema,node_dedup,node_repository,node_sqlite toneAmber
class node_api_server,node_hackathon_routes,node_platform_routes,node_admin_routes,node_health_routes toneMint
class node_listing_page,node_detail_page,node_filter_bar,node_card,node_detail_view,node_freshness,node_pagination toneRose
class node_source_platforms,node_visitor toneIndigo
```

## Components

### Collection and scheduling

- [Scrape scheduler](https://github.com/marbeegit/hackathonscraper/blob/master/src/scheduler/index.ts): `src/scheduler/index.ts`
- [Devpost scraper](https://github.com/marbeegit/hackathonscraper/blob/master/src/scrapers/devpost.ts): `src/scrapers/devpost.ts`
- [Unstop scraper](https://github.com/marbeegit/hackathonscraper/blob/master/src/scrapers/unstop.ts): `src/scrapers/unstop.ts`
- [HackerEarth scraper](https://github.com/marbeegit/hackathonscraper/blob/master/src/scrapers/hackerearth.ts): `src/scrapers/hackerearth.ts`
- [Devfolio scraper](https://github.com/marbeegit/hackathonscraper/blob/master/src/scrapers/devfolio.ts): `src/scrapers/devfolio.ts`

### Validation and storage

- [Scrape pipeline](https://github.com/marbeegit/hackathonscraper/blob/master/src/pipeline/scraper-pipeline.ts): `src/pipeline/scraper-pipeline.ts`
- [Canonical validation](https://github.com/marbeegit/hackathonscraper/blob/master/src/schemas/hackathon.schema.ts): `src/schemas/hackathon.schema.ts`
- [Cross-platform deduplication](https://github.com/marbeegit/hackathonscraper/blob/master/src/db/deduplication.ts): `src/db/deduplication.ts`
- [Data repository](https://github.com/marbeegit/hackathonscraper/blob/master/src/db/repository.ts): `src/db/repository.ts`
- [SQLite database](https://github.com/marbeegit/hackathonscraper/blob/master/src/db/index.ts): `src/db/index.ts`

### API service

- [Express server](https://github.com/marbeegit/hackathonscraper/blob/master/src/api/server.ts): `src/api/server.ts`
- [Hackathon routes](https://github.com/marbeegit/hackathonscraper/blob/master/src/api/routes/hackathons.ts): `src/api/routes/hackathons.ts`
- [Platform routes](https://github.com/marbeegit/hackathonscraper/blob/master/src/api/routes/platforms.ts): `src/api/routes/platforms.ts`
- [Admin scrape route](https://github.com/marbeegit/hackathonscraper/blob/master/src/api/routes/admin.ts): `src/api/routes/admin.ts`
- [Health route](https://github.com/marbeegit/hackathonscraper/blob/master/src/api/routes/health.ts): `src/api/routes/health.ts`

### Web interface

- [Hackathon listing](https://github.com/marbeegit/hackathonscraper/blob/master/app/hackathons/page.tsx): `app/hackathons/page.tsx`
- [Hackathon detail](https://github.com/marbeegit/hackathonscraper/blob/master/app/hackathons/%5Bid%5D/page.tsx): `app/hackathons/[id]/page.tsx`
- [Filter controls](https://github.com/marbeegit/hackathonscraper/blob/master/src/components/FilterBar.tsx): `src/components/FilterBar.tsx`
- [Hackathon card](https://github.com/marbeegit/hackathonscraper/blob/master/src/components/HackathonCard.tsx): `src/components/HackathonCard.tsx`
- [Detail view](https://github.com/marbeegit/hackathonscraper/blob/master/src/components/HackathonDetail.tsx): `src/components/HackathonDetail.tsx`
- [Freshness indicator](https://github.com/marbeegit/hackathonscraper/blob/master/src/components/FreshnessIndicator.tsx): `src/components/FreshnessIndicator.tsx`
- [Pagination](https://github.com/marbeegit/hackathonscraper/blob/master/src/components/Pagination.tsx): `src/components/Pagination.tsx`

### Other components

- **Hackathon platforms**
- **Web visitor**
- **Browser API client**

## Connections

- Scrape scheduler → Devpost scraper: dispatches (evidence: `src/scheduler/index.ts`)
- Scrape scheduler → Unstop scraper: dispatches (evidence: `src/scheduler/index.ts`)
- Scrape scheduler → HackerEarth scraper: dispatches (evidence: `src/scheduler/index.ts`)
- Scrape scheduler → Devfolio scraper: dispatches (evidence: `src/scheduler/index.ts`)
- Hackathon platforms → Devpost scraper: scrapes
- Hackathon platforms → Unstop scraper: scrapes
- Hackathon platforms → HackerEarth scraper: scrapes
- Hackathon platforms → Devfolio scraper: scrapes
- Scrape scheduler → Scrape pipeline: invokes (evidence: `src/scheduler/index.ts`)
- Scrape pipeline → Canonical validation: uses validated output (evidence: `src/pipeline/scraper-pipeline.ts`)
- Devpost scraper → Canonical validation: uses schema (evidence: `src/scrapers/devpost.ts`)
- Unstop scraper → Canonical validation: uses schema (evidence: `src/scrapers/unstop.ts`)
- HackerEarth scraper → Canonical validation: uses schema (evidence: `src/scrapers/hackerearth.ts`)
- Devfolio scraper → Canonical validation: uses schema (evidence: `src/scrapers/devfolio.ts`)
- Scrape pipeline → Data repository: writes records (evidence: `src/pipeline/scraper-pipeline.ts`)
- Data repository → SQLite database: queries and writes (evidence: `src/db/repository.ts`)
- Scrape pipeline → Cross-platform deduplication: deduplicates
- Express server → Hackathon routes: routes requests (evidence: `src/api/server.ts`)
- Express server → Platform routes: routes requests (evidence: `src/api/server.ts`)
- Express server → Admin scrape route: routes requests (evidence: `src/api/server.ts`)
- Express server → Health route: routes requests (evidence: `src/api/server.ts`)
- Express server → SQLite database: initializes (evidence: `src/api/server.ts`)
- Hackathon routes → Data repository: queries records (evidence: `src/api/routes/hackathons.ts`)
- Platform routes → Data repository: reads platforms (evidence: `src/api/routes/platforms.ts`)
- Admin scrape route → Scrape pipeline: triggers scrape (evidence: `src/api/routes/admin.ts`)
- Admin scrape route → Devpost scraper: uses scraper
- Web visitor → Hackathon listing: browses (evidence: `app/hackathons/page.tsx`)
- Web visitor → Hackathon detail: opens detail (evidence: `app/hackathons/[id]/page.tsx`)
- Hackathon listing → Filter controls: renders (evidence: `app/hackathons/page.tsx`)
- Hackathon listing → Hackathon card: renders (evidence: `app/hackathons/page.tsx`)
- Hackathon listing → Freshness indicator: renders (evidence: `app/hackathons/page.tsx`)
- Hackathon listing → Pagination: renders (evidence: `app/hackathons/page.tsx`)
- Hackathon detail → Detail view: renders (evidence: `app/hackathons/[id]/page.tsx`)
- Hackathon listing → Browser API client: fetches data
- Hackathon detail → Browser API client: fetches data
- Browser API client → Express server: requests API
