# fossuchennai/communities architecture

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

- Interactive diagram: https://gitdiagram.com/fossuchennai/communities
- Repository: https://github.com/fossuchennai/communities

## Overview

Tamilnadu.tech is a Tamil Nadu technology-event and community hub. Users discover current events and communities, inspect archived events, add events to calendars, consume RSS feeds, and optionally receive push notifications. The sampled code clearly supports browser subscription management, GitHub-backed subscription dispatch, service-worker notification handling, and RSS generation with GitHub fallback. Event and community JSON files are referenced by source but are absent from the supplied tree, so they are represented through their consuming components rather than as storage nodes.

Main entry points: [`src/components/PushSubscribe.tsx`](https://github.com/fossuchennai/communities/blob/main/src/components/PushSubscribe.tsx) (Push Subscribe), [`public/sw.js`](https://github.com/fossuchennai/communities/blob/main/public/sw.js) (Push Service Worker), [`src/app/page.tsx`](https://github.com/fossuchennai/communities/blob/main/src/app/page.tsx) (Home Page), [`src/components/pages/home/events.tsx`](https://github.com/fossuchennai/communities/blob/main/src/components/pages/home/events.tsx) (Event Listings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Discovery Experience"]
  node_home["Home Page<br/>[page.tsx]"]
  node_event_listings["Event Listings<br/>[events.tsx]"]
  node_community_directory["Community Directory<br/>[page.tsx]"]
  node_community_view["Community View<br/>[Community.tsx]"]
  node_archive["Event Archive<br/>[archive.tsx]"]
  node_calendar["Calendar Action<br/>[AddToCalendar.tsx]"]
end

subgraph group_syndication["Event Syndication"]
  node_public_rss["Public RSS<br/>[route.ts]"]
  node_api_rss["API RSS<br/>[route.ts]"]
end

subgraph group_notifications["Push Notifications"]
  node_push_ui["Push Subscribe<br/>[PushSubscribe.tsx]"]
  node_service_worker["Push Service Worker<br/>[sw.js]"]
  node_save_subscription["Save Subscription<br/>[route.ts]"]
  node_remove_subscription["Remove Subscription<br/>[route.ts]"]
  node_webpush["Web Push Utility<br/>[webpush.ts]"]
end

subgraph group_platform["Platform Routes"]
  node_health_route["Health Endpoint<br/>[route.ts]"]
end

node_user(("Visitor"))
node_github["GitHub API"]
node_push_network["Push Network"]

node_user -->|"opens"| node_home
node_user -->|"browses"| node_community_directory
node_user -->|"reviews past"| node_archive
node_home -->|"renders"| node_event_listings
node_community_directory -->|"renders"| node_community_view
node_event_listings -->|"offers dates"| node_calendar
node_user -->|"requests feed"| node_public_rss
node_user -->|"requests feed"| node_api_rss
node_api_rss -.->|"fetches events"| node_github
node_user -->|"enables alerts"| node_push_ui
node_push_ui -->|"registers"| node_service_worker
node_push_ui -->|"saves subscription"| node_save_subscription
node_push_ui -->|"removes subscription"| node_remove_subscription
node_save_subscription -.->|"dispatches save"| node_github
node_remove_subscription -.->|"dispatches removal"| node_github
node_webpush -.->|"sends notifications"| node_push_network
node_push_network -.->|"delivers push"| node_service_worker
node_service_worker -->|"shows alert"| node_user
node_user -->|"checks status"| node_health_route

click node_home "https://github.com/fossuchennai/communities/blob/main/src/app/page.tsx"
click node_event_listings "https://github.com/fossuchennai/communities/blob/main/src/components/pages/home/events.tsx"
click node_community_directory "https://github.com/fossuchennai/communities/blob/main/src/app/communities/page.tsx"
click node_community_view "https://github.com/fossuchennai/communities/blob/main/src/components/pages/Communities/Community.tsx"
click node_archive "https://github.com/fossuchennai/communities/blob/main/src/components/pages/Archive/archive.tsx"
click node_calendar "https://github.com/fossuchennai/communities/blob/main/src/components/AddToCalendar.tsx"
click node_public_rss "https://github.com/fossuchennai/communities/blob/main/src/app/rss/route.ts"
click node_api_rss "https://github.com/fossuchennai/communities/blob/main/src/app/api/rss/route.ts"
click node_push_ui "https://github.com/fossuchennai/communities/blob/main/src/components/PushSubscribe.tsx"
click node_service_worker "https://github.com/fossuchennai/communities/blob/main/public/sw.js"
click node_save_subscription "https://github.com/fossuchennai/communities/blob/main/src/app/api/save-subscription/route.ts"
click node_remove_subscription "https://github.com/fossuchennai/communities/blob/main/src/app/api/remove-subscription/route.ts"
click node_webpush "https://github.com/fossuchennai/communities/blob/main/src/lib/webpush.ts"
click node_health_route "https://github.com/fossuchennai/communities/blob/main/src/app/api/route.ts"

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_home,node_event_listings,node_community_directory,node_community_view,node_archive,node_calendar toneBlue
class node_public_rss,node_api_rss toneAmber
class node_push_ui,node_service_worker,node_save_subscription,node_remove_subscription,node_webpush,node_github toneMint
class node_health_route toneRose
class node_user,node_push_network toneIndigo
```

## Components

### Discovery Experience

- [Home Page](https://github.com/fossuchennai/communities/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Event Listings](https://github.com/fossuchennai/communities/blob/main/src/components/pages/home/events.tsx): `src/components/pages/home/events.tsx`
- [Community Directory](https://github.com/fossuchennai/communities/blob/main/src/app/communities/page.tsx): `src/app/communities/page.tsx`
- [Community View](https://github.com/fossuchennai/communities/blob/main/src/components/pages/Communities/Community.tsx): `src/components/pages/Communities/Community.tsx`
- [Event Archive](https://github.com/fossuchennai/communities/blob/main/src/components/pages/Archive/archive.tsx): `src/components/pages/Archive/archive.tsx`
- [Calendar Action](https://github.com/fossuchennai/communities/blob/main/src/components/AddToCalendar.tsx): `src/components/AddToCalendar.tsx`

### Event Syndication

- [Public RSS](https://github.com/fossuchennai/communities/blob/main/src/app/rss/route.ts): `src/app/rss/route.ts`
- [API RSS](https://github.com/fossuchennai/communities/blob/main/src/app/api/rss/route.ts): `src/app/api/rss/route.ts`

### Push Notifications

- [Push Subscribe](https://github.com/fossuchennai/communities/blob/main/src/components/PushSubscribe.tsx): `src/components/PushSubscribe.tsx`
- [Push Service Worker](https://github.com/fossuchennai/communities/blob/main/public/sw.js): `public/sw.js`
- [Save Subscription](https://github.com/fossuchennai/communities/blob/main/src/app/api/save-subscription/route.ts): `src/app/api/save-subscription/route.ts`
- [Remove Subscription](https://github.com/fossuchennai/communities/blob/main/src/app/api/remove-subscription/route.ts): `src/app/api/remove-subscription/route.ts`
- [Web Push Utility](https://github.com/fossuchennai/communities/blob/main/src/lib/webpush.ts): `src/lib/webpush.ts`

### Platform Routes

- [Health Endpoint](https://github.com/fossuchennai/communities/blob/main/src/app/api/route.ts): `src/app/api/route.ts`

### Other components

- **Visitor**
- **GitHub API**
- **Push Network**

## Connections

- Visitor → Home Page: opens
- Visitor → Community Directory: browses
- Visitor → Event Archive: reviews past
- Home Page → Event Listings: renders
- Community Directory → Community View: renders
- Event Listings → Calendar Action: offers dates
- Visitor → Public RSS: requests feed
- Visitor → API RSS: requests feed
- API RSS → GitHub API: fetches events
- Visitor → Push Subscribe: enables alerts
- Push Subscribe → Push Service Worker: registers
- Push Subscribe → Save Subscription: saves subscription
- Push Subscribe → Remove Subscription: removes subscription
- Save Subscription → GitHub API: dispatches save
- Remove Subscription → GitHub API: dispatches removal
- Web Push Utility → Push Network: sends notifications
- Push Network → Push Service Worker: delivers push
- Push Service Worker → Visitor: shows alert
- Visitor → Health Endpoint: checks status
