# rafeeq18/sih-internal-hackathon-2026 architecture

> Architecture diagram of the GitHub repository rafeeq18/sih-internal-hackathon-2026, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rafeeq18/sih-internal-hackathon-2026
- Repository: https://github.com/rafeeq18/sih-internal-hackathon-2026

## Overview

#### Purpose and Runtime
This is a small Next.js application for browsing hackathon problem statements, apparently sourced from the included SIH problem-sheet PDF. It runs as a TypeScript React application using the Next.js App Router. Primary runtime configuration is in `package.json`, `next.config.ts`, and `src/app/layout.tsx`.

#### Application Entry and Shell
The root route is implemented by `src/app/page.tsx` and is wrapped by the shared App Router layout in `src/app/layout.tsx`. Global styling enters through `src/app/globals.css`. The reusable top-level navigation/header is isolated in `src/components/Header.tsx`, establishing a shared presentation boundary rather than duplicating navigation per route.

#### Problem Catalog Flow
The problem-listing experience is served by `src/app/problems/page.tsx`. It consumes the local problem-statement dataset from `src/data/problemStatements.ts`, turning static structured data into navigable catalog content. There is no indicated API, database, authentication layer, or server-side external service boundary.

#### Problem Detail Routing
Individual problem pages use the dynamic App Router segment at `src/app/problems/[id]/page.tsx`. The route parameter selects a matching item from `src/data/problemStatements.ts`; this is the key control-flow boundary between catalog navigation and per-problem rendering. Invalid or unmatched IDs must be handled within this route layer or through Next.js route behavior.

#### Data and Source Material
`src/data/problemStatements.ts` is the application’s central domain-data source and likely defines the identifiers used by both list and detail routes. The original reference material is retained as PDFs at `public/SIH INTERNAL HACKATHON PS-26 - Sheet1.pdf` and `reference/SIH INTERNAL HACKATHON PS-26 - Sheet1.pdf`; the `public/` copy is directly web-accessible through Next.js static asset serving.

#### Rendering and Deployment Boundary
Pages and components are React/TSX modules rendered by Next.js, with route structure defined entirely under `src/app/`. Styling is CSS-based via `src/app/globals.css` and the PostCSS configuration. The repository shows a static/local-data architecture: client navigation and route rendering are the primary application flow, while the PDF is an exposed static artifact rather than a parsed or externally fetched data source.

Main entry points: [`src/app/layout.tsx`](https://github.com/rafeeq18/sih-internal-hackathon-2026/blob/main/src/app/layout.tsx) (Root layout), [`src/app/problems/page.tsx`](https://github.com/rafeeq18/sih-internal-hackathon-2026/blob/main/src/app/problems/page.tsx) (Problem catalog), [`src/app/problems/[id]/page.tsx`](https://github.com/rafeeq18/sih-internal-hackathon-2026/blob/main/src/app/problems/%5Bid%5D/page.tsx) (Problem detail), [`src/data/problemStatements.ts`](https://github.com/rafeeq18/sih-internal-hackathon-2026/blob/main/src/data/problemStatements.ts) (Problem statements)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Next.js App"]
  node_next{{"Next.js runtime<br/>framework<br/>[next.config.ts]"}}
  node_layout["Root layout<br/>App Router layout<br/>[layout.tsx]"]
  node_home["Home route<br/>route page<br/>[page.tsx]"]
  node_header["Header<br/>shared component<br/>[Header.tsx]"]
  node_catalog["Problem catalog<br/>route page<br/>[page.tsx]"]
  node_detail["Problem detail<br/>dynamic route page<br/>[page.tsx]"]
  node_styles["Global styles<br/>CSS<br/>[globals.css]"]
end

subgraph group_data["Local Content"]
  node_statements[("Problem statements<br/>local dataset")]
  node_public_pdf["Public problem-sheet PDF<br/>static asset"]
  node_reference_pdf["Reference problem-sheet PDF<br/>reference artifact"]
end

node_next -->|"renders"| node_layout
node_layout -->|"wraps"| node_home
node_layout -->|"wraps"| node_catalog
node_layout -->|"wraps"| node_detail
node_layout -->|"includes"| node_header
node_layout -->|"loads"| node_styles
node_catalog -->|"reads"| node_statements
node_catalog -->|"navigates by ID"| node_detail
node_detail -->|"matches route ID"| node_statements
node_next -->|"serves"| node_public_pdf
node_reference_pdf -.->|"source material"| node_statements

click node_next "https://github.com/rafeeq18/sih-internal-hackathon-2026/blob/main/next.config.ts"
click node_layout "https://github.com/rafeeq18/sih-internal-hackathon-2026/blob/main/src/app/layout.tsx"
click node_home "https://github.com/rafeeq18/sih-internal-hackathon-2026/blob/main/src/app/page.tsx"
click node_header "https://github.com/rafeeq18/sih-internal-hackathon-2026/blob/main/src/components/Header.tsx"
click node_catalog "https://github.com/rafeeq18/sih-internal-hackathon-2026/blob/main/src/app/problems/page.tsx"
click node_detail "https://github.com/rafeeq18/sih-internal-hackathon-2026/blob/main/src/app/problems/%5Bid%5D/page.tsx"
click node_styles "https://github.com/rafeeq18/sih-internal-hackathon-2026/blob/main/src/app/globals.css"
click node_statements "https://github.com/rafeeq18/sih-internal-hackathon-2026/blob/main/src/data/problemStatements.ts"
click node_public_pdf "https://github.com/rafeeq18/sih-internal-hackathon-2026/blob/main/public/SIH%20INTERNAL%20HACKATHON%20PS-26%20-%20Sheet1.pdf"
click node_reference_pdf "https://github.com/rafeeq18/sih-internal-hackathon-2026/blob/main/reference/SIH%20INTERNAL%20HACKATHON%20PS-26%20-%20Sheet1.pdf"

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_next,node_layout,node_home,node_header,node_catalog,node_detail,node_styles toneBlue
class node_statements,node_public_pdf,node_reference_pdf toneAmber
```

## Components

### Next.js App

App Router pages and shared UI.

- [Next.js runtime](https://github.com/rafeeq18/sih-internal-hackathon-2026/blob/main/next.config.ts): framework · Renders App Router routes and serves public assets. · `next.config.ts`
- [Root layout](https://github.com/rafeeq18/sih-internal-hackathon-2026/blob/main/src/app/layout.tsx): App Router layout · Shared shell for all routes. · `src/app/layout.tsx`
- [Home route](https://github.com/rafeeq18/sih-internal-hackathon-2026/blob/main/src/app/page.tsx): route page · `src/app/page.tsx`
- [Header](https://github.com/rafeeq18/sih-internal-hackathon-2026/blob/main/src/components/Header.tsx): shared component · Reusable top-level navigation. · `src/components/Header.tsx`
- [Problem catalog](https://github.com/rafeeq18/sih-internal-hackathon-2026/blob/main/src/app/problems/page.tsx): route page · Lists navigable problem statements. · `src/app/problems/page.tsx`
- [Problem detail](https://github.com/rafeeq18/sih-internal-hackathon-2026/blob/main/src/app/problems/%5Bid%5D/page.tsx): dynamic route page · Resolves a problem by its route ID. · `src/app/problems/[id]/page.tsx`
- [Global styles](https://github.com/rafeeq18/sih-internal-hackathon-2026/blob/main/src/app/globals.css): CSS · `src/app/globals.css`

### Local Content

Static problem data and source material.

- [Problem statements](https://github.com/rafeeq18/sih-internal-hackathon-2026/blob/main/src/data/problemStatements.ts): local dataset · Canonical IDs and structured problem content. · `src/data/problemStatements.ts`
- [Public problem-sheet PDF](https://github.com/rafeeq18/sih-internal-hackathon-2026/blob/main/public/SIH%20INTERNAL%20HACKATHON%20PS-26%20-%20Sheet1.pdf): static asset · Web-accessible reference artifact. · `public/SIH INTERNAL HACKATHON PS-26 - Sheet1.pdf`
- [Reference problem-sheet PDF](https://github.com/rafeeq18/sih-internal-hackathon-2026/blob/main/reference/SIH%20INTERNAL%20HACKATHON%20PS-26%20-%20Sheet1.pdf): reference artifact · `reference/SIH INTERNAL HACKATHON PS-26 - Sheet1.pdf`

## Connections

- Next.js runtime → Root layout: renders
- Root layout → Home route: wraps
- Root layout → Problem catalog: wraps
- Root layout → Problem detail: wraps
- Root layout → Header: includes
- Root layout → Global styles: loads
- Problem catalog → Problem statements: reads
- Problem catalog → Problem detail: navigates by ID
- Problem detail → Problem statements: matches route ID
- Next.js runtime → Public problem-sheet PDF: serves
- Reference problem-sheet PDF → Problem statements: source material
