# adarsh-basantwani/e-network architecture

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

- Interactive diagram: https://gitdiagram.com/adarsh-basantwani/e-network
- Repository: https://github.com/adarsh-basantwani/e-network

## Overview

##### Project type & purpose (from file tree + README)
This is a **classic ASP.NET Web Forms** application (circa 2015) named **E-Network**, which appears to be a **social-network-style web app**:
- Web Forms pages: `*.aspx` with code-behind `*.aspx.cs`
- Shared layout: `MasterPage.master` + `MasterPage.master.cs`
- Styling/themes: `App_Themes/*`, `StyleSheet.css`
- Local SQL Server databases: `App_Data/Database.mdf` and `App_Data/ASPNETDB.MDF` (plus log files)
- User-content storage: `profilephotos/` (and likely uploads via `UploadContents.aspx`)
- Features indicated by page names: friends, friend requests, messages, profile editing, content upload/search, session expiration.

For diagramming: treat it as a **server-rendered web application** running on **IIS + ASP.NET**, backed by **SQL Server (MDF)**, with some **file-system storage** for images/uploads.

##### Application logic
In Web Forms, most app logic is usually inside the **code-behind** (`.aspx.cs`) and potentially in helper classes (none are visible in the tree, so assume “page-centric” logic).

##### Data / persistence
- `App_Data/Database.mdf`: likely domain data (users, friends, messages, contents)
- `App_Data/ASPNETDB.MDF`: typical **ASP.NET Membership/Role provider** DB for authentication/authorization (or a similar identity store)
- `web.config`: connection strings, membership provider configuration, session/auth settings

##### Static & file storage
- `profilephotos/`: stored profile images (on web server disk)
- `images/`: static site images

##### What to extract from README (and what’s missing)
- Whether auth uses ASP.NET Membership (`ASPNETDB.MDF`) and Forms Authentication
- Whether data access is ADO.NET inline SQL, or some DAL classes (not visible)
- Whether file uploads store metadata in `Database.mdf` and binaries in `profilephotos/` (or elsewhere)

##### Client
- Web Browser (end users)

##### Web Server / Host
- IIS (or IIS Express) hosting the ASP.NET app
- ASP.NET Web Forms Runtime

##### Application (E-Network Web App)
- **Page Controllers (Code-behind)**: one component per major page group
Examples:
- Auth/session flows: `Default.aspx(.cs)`, `Logout.aspx(.cs)`, `SessionExp.aspx(.cs)`
- Profile: `EditProfile`, `ChangePwd`, `ChangePhoto`
- Friends: `AddasFriend`, `ConfirmRequest`, `IgnoreRequest`, `myfriends`, `SearchFriends`
- Messaging: `Messages`
- Content: `UploadContents`, `LatestContents`, `SearchContents`
- **UI Composition**
- `MasterPage.master` (layout shell)
- Themes/CSS (`App_Themes/*`, `StyleSheet.css`)
- **AuthN/AuthZ subsystem**
- Membership provider / Forms Auth (configured via `web.config`)
- **Session State**
- InProc session (most likely) unless `web.config` says otherwise
- **Data Access**
- Even if it’s embedded in code-behind, show a “Data Access (ADO.NET)” component to make DB boundaries explicit.

##### Datastores
- **ASPNETDB.MDF** (Identity/Membership DB)
- **Database.mdf** (Domain DB: friends, messages, content, etc.)

##### File Storage
- `profilephotos/` (profile image binaries)
- Potential “Uploaded Content Files” location (if any; start by showing `profilephotos/` since it’s explicit)

- Browser → IIS/ASP.NET: **HTTPS/HTTP**
- IIS/ASP.NET → Web Forms Pages: **Server-side routing to .aspx + page lifecycle**
- Page Code-behind → Membership DB (`ASPNETDB.MDF`): **Auth queries / user validation**
- Page Code-behind → Domain DB (`Database.mdf`): **CRUD for friends/messages/contents**
- ChangePhoto/UploadContents → File Storage: **Write image/content files**
- Home/LatestContents → File Storage: **Read images/content** (if rendered from disk paths)
- SessionExp / any authenticated page → Session State: **read/write session variables**

##### Architectural patterns present
- **Monolithic Web Forms app** (all features in one deployable)
- **Page-centric architecture** (each `.aspx` is a unit of UI + logic)
- **Server-rendered HTML** (no SPA frontend implied)
- **Two-database split**: Identity (ASPNETDB) vs Domain (Database.mdf)
- **Mixed persistence**: relational DB + server file system for images

##### Technologies in labels
- “ASP.NET Web Forms (.aspx + code-behind C#)”
- “IIS”
- “SQL Server Express / LocalDB MDF”
- “ASP.NET Membership Provider”
- “File System Storage (profilephotos/)”
- “Themes (App_Themes) + CSS”

##### Labels
- Use exact names where helpful (e.g., `UploadContents.aspx`, `Messages.aspx`)
- Use grouped labels to reduce clutter:
- “Friends Module: AddasFriend/ConfirmRequest/IgnoreRequest/myfriends/SearchFriends”
- “Profile Module: EditProfile/ChangePwd/ChangePhoto”

Examples:
- “Authenticate user”
- “Query friends list”
- “Create friend request”
- “Store profile photo”
- “Render latest content feed”
- “Search contents”

##### “Don’t overthink it”: separate into many components (recommended breakdown)
To be maximally detailed, split the application into these components (even if implemented as code-behind today):

- **Auth & Session**
- Default/Login (assumption), Logout, SessionExp
- Membership Provider integration (web.config)
- **Profile Management**
- EditProfile, ChangePwd, ChangePhoto
- Profile photo storage (profilephotos/)
- **Friends / Social Graph**
- SearchFriends, AddasFriend, ConfirmRequest, IgnoreRequest, myfriends
- **Messaging**
- Messages
- **Content**
- UploadContents, LatestContents, SearchContents
- **UI Shell**
- MasterPage + Themes/CSS

Component to:
- Domain DB (`Database.mdf`) as needed
- Membership DB (`ASPNETDB.MDF`) as needed
- File system where needed

## Diagram (Mermaid)

```mermaid
flowchart TD
    %%========================
    %% System Context
    %%========================
    U["End User<br/>(Web Browser)"]:::external

    subgraph "Hosting Environment"
        IIS["IIS Web Server"]:::compute
        ASPNET["ASP.NET Web Forms Runtime<br/>(.NET Framework)"]:::compute
        IIS -->|"hosts"| ASPNET
    end

    subgraph "E-Network (Monolithic Web Forms App)"
        APPROOT["E-Network Web Application"]:::app

        subgraph "UI Composition"
            MASTER["Master Page<br/>MasterPage.master + code-behind"]:::ui
            THEMES["Themes / Skins<br/>App_Themes (cool, hot)"]:::static
            CSS["Global CSS<br/>StyleSheet.css"]:::static
        end

        subgraph "Configuration"
            CONFIG["web.config<br/>(Auth/Membership/Session/ConnectionStrings)"]:::config
        end

        subgraph "Auth & Session"
            LOGIN["Default.aspx<br/>(Login / Entry)"]:::page
            LOGOUT["Logout.aspx"]:::page
            SESSXP["SessionExp.aspx"]:::page
            MEMBERSHIP["ASP.NET Membership Provider<br/>(AuthN/AuthZ)"]:::service
            SESSION["Session State<br/>(InProc - assumed)"]:::service
        end

        subgraph "Profile Management"
            EDITPROFILE["EditProfile.aspx"]:::page
            CHANGEPWD["ChangePwd.aspx"]:::page
            CHANGEPHOTO["ChangePhoto.aspx"]:::page
        end

        subgraph "Friends / Social Graph"
            SEARCHFRIENDS["SearchFriends.aspx"]:::page
            ADDASF["AddasFriend.aspx"]:::page
            CONFIRMREQ["ConfirmRequest.aspx"]:::page
            IGNOREREQ["IgnoreRequest.aspx"]:::page
            MYFRIENDS["myfriends.aspx"]:::page
        end

        subgraph "Messaging"
            MESSAGES["Messages.aspx"]:::page
        end

        subgraph "Content"
            UPLOAD["UploadContents.aspx"]:::page
            LATEST["LatestContents.aspx"]:::page
            SEARCHCONT["SearchContents.aspx"]:::page
        end

        DAL["Data Access<br/>(ADO.NET / inline SQL assumed)"]:::service

        APPROOT -->|"composes UI"| MASTER
        APPROOT -->|"applies theme"| THEMES
        APPROOT -->|"loads styles"| CSS
        APPROOT -->|"reads settings"| CONFIG
    end

    subgraph "Datastores (SQL Server Express / LocalDB MDF)"
        DOMAINDB[("Database.mdf<br/>(Domain: friends/messages/contents)")]:::db
        IDDB[("ASPNETDB.MDF<br/>(Identity/Membership)")]:::db
    end

    subgraph "File System Storage (Web Server Disk)"
        PROFILEPHOTOS["profilephotos/<br/>(Profile image binaries)"]:::filestore
        IMAGES["images/<br/>(Static site images)"]:::filestore
        DOCS["documents/<br/>(Static docs: PDF/HTML)"]:::filestore
    end

    %%========================
    %% Request/Response Flow
    %%========================
    U -->|"HTTP/HTTPS request"| IIS
    IIS -->|"ASP.NET pipeline"| ASPNET
    ASPNET -->|"routes to .aspx (page lifecycle)"| APPROOT
    APPROOT -->|"render HTML"| ASPNET
    ASPNET -->|"HTTP/HTTPS response"| U

    %%========================
    %% Internal Wiring (Vertical, page-centric)
    %%========================
    CONFIG -->|"configures"| MEMBERSHIP
    CONFIG -->|"configures"| SESSION
    CONFIG -->|"provides conn strings"| DAL

    LOGIN -->|"authenticate user"| MEMBERSHIP
    LOGOUT -->|"clear auth cookie/session"| SESSION
    SESSXP -->|"read session state"| SESSION

    MEMBERSHIP -->|"queries/updates"| IDDB

    %% Pages -> Session
    EDITPROFILE -->|"read/write session vars"| SESSION
    CHANGEPWD -->|"read/write session vars"| SESSION
    CHANGEPHOTO -->|"read/write session vars"| SESSION
    SEARCHFRIENDS -->|"read/write session vars"| SESSION
    ADDASF -->|"read/write session vars"| SESSION
    CONFIRMREQ -->|"read/write session vars"| SESSION
    IGNOREREQ -->|"read/write session vars"| SESSION
    MYFRIENDS -->|"read/write session vars"| SESSION
    MESSAGES -->|"read/write session vars"| SESSION
    UPLOAD -->|"read/write session vars"| SESSION
    LATEST -->|"read/write session vars"| SESSION
    SEARCHCONT -->|"read/write session vars"| SESSION

    %% Pages -> DAL -> Domain DB
    EDITPROFILE -->|"CRUD profile"| DAL
    CHANGEPWD -->|"update password metadata (domain)"| DAL
    SEARCHFRIENDS -->|"search users/friends"| DAL
    ADDASF -->|"create friend request"| DAL
    CONFIRMREQ -->|"confirm friend request"| DAL
    IGNOREREQ -->|"ignore friend request"| DAL
    MYFRIENDS -->|"query friends list"| DAL
    MESSAGES -->|"send/read messages"| DAL
    UPLOAD -->|"store content metadata"| DAL
    LATEST -->|"query latest feed"| DAL
    SEARCHCONT -->|"search content metadata"| DAL

    DAL -->|"CRUD"| DOMAINDB

    %% File storage interactions
    CHANGEPHOTO -->|"write profile image"| PROFILEPHOTOS
    EDITPROFILE -->|"read profile image path"| PROFILEPHOTOS
    LATEST -->|"read images/files for feed"| PROFILEPHOTOS
    UPLOAD -->|"write uploaded files (assumed) / refs"| PROFILEPHOTOS

    APPROOT -->|"serve static assets"| IMAGES
    APPROOT -->|"serve static docs"| DOCS

    %%========================
    %% Notes / Annotations
    %%========================
    NOTE1["Notes:<br/>• Monolithic Web Forms app (UI + backend)<br/>• Page-centric controllers (.aspx + code-behind)<br/>• Mixed persistence: Domain DB + Membership DB + File system<br/>• Session State assumed InProc (verify web.config)"]:::note
    APPROOT -->|"architecture"| NOTE1

    %%========================
    %% Click Events (from component_mapping)
    %%========================
    click APPROOT "https://github.com/adarsh-basantwani/e-network/tree/master/eNet2015/"
    click LOGIN "https://github.com/adarsh-basantwani/e-network/blob/master/eNet2015/Default.aspx"
    click LOGOUT "https://github.com/adarsh-basantwani/e-network/blob/master/eNet2015/Logout.aspx"
    click SESSXP "https://github.com/adarsh-basantwani/e-network/blob/master/eNet2015/SessionExp.aspx"
    click EDITPROFILE "https://github.com/adarsh-basantwani/e-network/blob/master/eNet2015/EditProfile.aspx"
    click CHANGEPWD "https://github.com/adarsh-basantwani/e-network/blob/master/eNet2015/ChangePwd.aspx"
    click CHANGEPHOTO "https://github.com/adarsh-basantwani/e-network/blob/master/eNet2015/ChangePhoto.aspx"
    click SEARCHFRIENDS "https://github.com/adarsh-basantwani/e-network/blob/master/eNet2015/SearchFriends.aspx"
    click ADDASF "https://github.com/adarsh-basantwani/e-network/blob/master/eNet2015/AddasFriend.aspx"
    click CONFIRMREQ "https://github.com/adarsh-basantwani/e-network/blob/master/eNet2015/ConfirmRequest.aspx"
    click IGNOREREQ "https://github.com/adarsh-basantwani/e-network/blob/master/eNet2015/IgnoreRequest.aspx"
    click MYFRIENDS "https://github.com/adarsh-basantwani/e-network/blob/master/eNet2015/myfriends.aspx"
    click MESSAGES "https://github.com/adarsh-basantwani/e-network/blob/master/eNet2015/Messages.aspx"
    click UPLOAD "https://github.com/adarsh-basantwani/e-network/blob/master/eNet2015/UploadContents.aspx"
    click LATEST "https://github.com/adarsh-basantwani/e-network/blob/master/eNet2015/LatestContents.aspx"
    click SEARCHCONT "https://github.com/adarsh-basantwani/e-network/blob/master/eNet2015/SearchContents.aspx"
    click MASTER "https://github.com/adarsh-basantwani/e-network/blob/master/eNet2015/MasterPage.master"
    click THEMES "https://github.com/adarsh-basantwani/e-network/tree/master/eNet2015/App_Themes/"
    click CSS "https://github.com/adarsh-basantwani/e-network/blob/master/eNet2015/StyleSheet.css"
    click CONFIG "https://github.com/adarsh-basantwani/e-network/blob/master/eNet2015/web.config"
    click DOMAINDB "https://github.com/adarsh-basantwani/e-network/blob/master/eNet2015/App_Data/Database.mdf"
    click IDDB "https://github.com/adarsh-basantwani/e-network/blob/master/eNet2015/App_Data/ASPNETDB.MDF"
    click PROFILEPHOTOS "https://github.com/adarsh-basantwani/e-network/tree/master/eNet2015/profilephotos/"
    click IMAGES "https://github.com/adarsh-basantwani/e-network/tree/master/eNet2015/images/"
    click DOCS "https://github.com/adarsh-basantwani/e-network/tree/master/eNet2015/documents/"

    %% Code-behind paths (mapped as a set; link representative node)
    click DAL "https://github.com/adarsh-basantwani/e-network/blob/master/eNet2015/*.aspx.cs"

    %%========================
    %% Styles
    %%========================
    classDef external fill:#E8F1FF,stroke:#2B5DB3,stroke-width:1px,color:#0B1B3A
    classDef compute fill:#D6ECFF,stroke:#1F6FB2,stroke-width:1px,color:#0B1B3A
    classDef app fill:#CFF7E6,stroke:#1C8B5A,stroke-width:1px,color:#06301F
    classDef page fill:#BFF2D9,stroke:#1C8B5A,stroke-width:1px,color:#06301F
    classDef ui fill:#B7F0E6,stroke:#138A7B,stroke-width:1px,color:#05302B
    classDef service fill:#BFEBD0,stroke:#208A4B,stroke-width:1px,color:#062412
    classDef config fill:#E7F5C9,stroke:#6E8C1E,stroke-width:1px,color:#233006
    classDef db fill:#FFE0B2,stroke:#C77700,stroke-width:1px,color:#3A2200
    classDef filestore fill:#E6E6E6,stroke:#666666,stroke-width:1px,color:#1B1B1B
    classDef static fill:#F1F1F1,stroke:#7A7A7A,stroke-width:1px,color:#1B1B1B
    classDef note fill:#FFF7C2,stroke:#B59B00,stroke-width:1px,color:#3A3200,stroke-dasharray: 3 3
```
