# keerthivasan-skv/bluestock_intern architecture

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

- Interactive diagram: https://gitdiagram.com/keerthivasan-skv/bluestock_intern
- Repository: https://github.com/keerthivasan-skv/bluestock_intern

## Overview

#### Purpose and Topology
BlueStock is a full-stack IPO-management platform: public users browse IPOs, analytics, broker comparisons, content, and community pages; authenticated staff manage IPO records, companies, documents, and applications. It is a React/Vite SPA backed by a Django REST API and Django admin. The application is nested under `IPO-Web-App-main/IPO-Web-App-main/`.

#### Runtime Entry Points
- Frontend bootstraps React from `IPO-Web-App-main/IPO-Web-App-main/frontend/src/main.jsx`; application composition and routing reside in `IPO-Web-App-main/IPO-Web-App-main/frontend/src/App.jsx`.
- Django is run through `IPO-Web-App-main/IPO-Web-App-main/ipo_backend/manage.py`; HTTP deployment entry points are `ipo_backend/ipo_backend/wsgi.py` and `ipo_backend/ipo_backend/asgi.py`.
- The backend exposes API routes under `/api/v1/`, token routes, and Django admin through `IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo_backend/urls.py`.

#### Frontend Shell, Navigation, and Identity
The SPA uses React, React Router, Axios, Styled Components, Tailwind configuration, and Framer Motion. `AuthProvider` owns client-side authentication state; JWTs are stored in browser localStorage. Shared navigation directs users to public feature areas and administration.
- `IPO-Web-App-main/IPO-Web-App-main/frontend/src/AuthProvider.jsx`
- `IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/Navabr.jsx`
- `IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/Authontiction/Login.jsx`

#### Public IPO Experience
IPO discovery and analysis are page-oriented UI modules. The IPO section presents listing information; analysis/analytics present market or performance views. Supporting public modules include brokers, blogs, community, sectors, and educational/product pages. These are frontend boundaries; authoritative IPO data should come from the backend API rather than UI state.
- `IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/IPO/ipo.jsx`
- `IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/Analysis/Analysis.jsx`
- `IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/Broker/Broker.jsx`

#### Administrative Management Flow
Staff sign in to obtain JWTs, then use administration pages to register, manage, edit, or remove IPO records. The server is the authorization boundary: read operations are public, while mutation requires a valid JWT and `is_staff`. Django admin is a separate operational interface over the same domain models.
- `IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/Admin-View/Admin.jsx`
- `IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/Admin-View/ManageIpo.jsx`
- `IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo/admin.py`

#### API and Domain Layer
The Django `ipo` app defines persistent IPO-domain entities, serializers that shape JSON responses, views that implement REST operations, and app-local URL mappings. Key resources include users/registration, companies, IPOs, documents, applications, and stock data. This layer separates browser clients from database and external-market integration.
- `IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo/models.py`
- `IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo/serializers.py`
- `IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo/views.py`
- `IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo/urls.py`

#### Persistence, External Data, and Deployment Boundaries
Django migrations establish the IPO schema and application/user evolution. SQLite is the default local persistence option, with settings intended to support configurable MySQL or PostgreSQL. Backend dependencies include Django REST Framework, JWT authentication, `nselib` for NSE market data, and pandas for processing. CORS, secret key, database connection, hosts, and debug mode are deployment configuration concerns.
- `IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo/migrations/0001_initial.py`
- `IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo_backend/settings.py`
- `IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo_backend/.env.example`

Main entry points: [`IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo_backend/urls.py`](https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo_backend/urls.py) (API, token & admin routes), [`IPO-Web-App-main/IPO-Web-App-main/frontend/src/App.jsx`](https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/frontend/src/App.jsx) (App routing), [`IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/Navabr.jsx`](https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/Navabr.jsx) (Shared navigation), [`IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo/views.py`](https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo/views.py) (REST operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["React SPA"]
  node_spa_entry["React bootstrap<br/>Vite entry<br/>[main.jsx]"]
  node_app_router["App routing<br/>React shell<br/>[App.jsx]"]
  node_auth_provider["Auth state<br/>React provider<br/>[AuthProvider.jsx]"]
  node_navigation["Shared navigation<br/>UI navigation<br/>[Navabr.jsx]"]
  node_public_ipo["IPO discovery<br/>public UI<br/>[ipo.jsx]"]
  node_analytics["Analysis<br/>public UI<br/>[Analysis.jsx]"]
  node_brokers["Broker comparison<br/>public UI<br/>[Broker.jsx]"]
  node_login["Staff login<br/>auth UI<br/>[Login.jsx]"]
  node_staff_management["IPO management<br/>staff UI<br/>[ManageIpo.jsx]"]
end

subgraph group_backend["Django Backend"]
  node_django_runtime["Django runtime<br/>Django entry<br/>[manage.py]"]
  node_root_routes["API, token &amp; admin routes<br/>Django URL router<br/>[urls.py]"]
  node_django_admin["Django admin<br/>operations UI<br/>[admin.py]"]
end

subgraph group_domain["IPO Domain"]
  node_api_views["REST operations<br/>DRF views<br/>[views.py]"]
  node_resource_routes["IPO resource routes<br/>Django URL router<br/>[urls.py]"]
  node_serializers["JSON serializers<br/>DRF serializers<br/>[serializers.py]"]
  node_ipo_models[("IPO domain models<br/>Django models<br/>[models.py]")]
end

subgraph group_platform["Data &amp; Deployment"]
  node_database[("Database<br/>SQLite / configurable SQL<br/>[0001_initial.py]")]
  node_market_data["NSE market data<br/>external data"]
  node_settings["Deployment settings<br/>Django configuration<br/>[settings.py]"]
end

node_browser(("Browser users<br/>client"))

node_browser -->|"loads SPA"| node_spa_entry
node_spa_entry -->|"mounts"| node_app_router
node_app_router -->|"uses"| node_auth_provider
node_app_router -->|"renders"| node_navigation
node_navigation -->|"navigates"| node_public_ipo
node_navigation -->|"navigates"| node_analytics
node_navigation -->|"navigates"| node_brokers
node_app_router -->|"routes staff"| node_login
node_app_router -->|"routes staff"| node_staff_management
node_login -->|"sets JWT"| node_auth_provider
node_public_ipo -->|"public API requests"| node_root_routes
node_analytics -->|"public API requests"| node_root_routes
node_brokers -->|"public API requests"| node_root_routes
node_login -->|"token request"| node_root_routes
node_staff_management -->|"JWT mutation requests"| node_root_routes
node_django_runtime -->|"serves"| node_root_routes
node_root_routes -->|"/api/v1/"| node_resource_routes
node_resource_routes -->|"dispatches"| node_api_views
node_api_views -->|"serializes"| node_serializers
node_api_views -->|"reads and mutates"| node_ipo_models
node_ipo_models -->|"persists"| node_database
node_api_views -->|"retrieves market data"| node_market_data
node_django_admin -->|"manages"| node_ipo_models
node_settings -.->|"configures"| node_django_runtime

click node_spa_entry "https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/frontend/src/main.jsx"
click node_app_router "https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/frontend/src/App.jsx"
click node_auth_provider "https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/frontend/src/AuthProvider.jsx"
click node_navigation "https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/Navabr.jsx"
click node_public_ipo "https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/IPO/ipo.jsx"
click node_analytics "https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/Analysis/Analysis.jsx"
click node_brokers "https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/Broker/Broker.jsx"
click node_login "https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/Authontiction/Login.jsx"
click node_staff_management "https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/Admin-View/ManageIpo.jsx"
click node_django_runtime "https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/ipo_backend/manage.py"
click node_root_routes "https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo_backend/urls.py"
click node_api_views "https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo/views.py"
click node_resource_routes "https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo/urls.py"
click node_serializers "https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo/serializers.py"
click node_ipo_models "https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo/models.py"
click node_django_admin "https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo/admin.py"
click node_database "https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo/migrations/0001_initial.py"
click node_settings "https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo_backend/settings.py"

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_spa_entry,node_app_router,node_auth_provider,node_navigation,node_public_ipo,node_analytics,node_brokers,node_login,node_staff_management toneBlue
class node_django_runtime,node_root_routes,node_django_admin toneAmber
class node_api_views,node_resource_routes,node_serializers,node_ipo_models toneMint
class node_database,node_market_data,node_settings toneRose
class node_browser toneNeutral
```

## Components

### React SPA

Browser-facing public and staff experience.

- [React bootstrap](https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/frontend/src/main.jsx): Vite entry · `IPO-Web-App-main/IPO-Web-App-main/frontend/src/main.jsx`
- [App routing](https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/frontend/src/App.jsx): React shell · `IPO-Web-App-main/IPO-Web-App-main/frontend/src/App.jsx`
- [Auth state](https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/frontend/src/AuthProvider.jsx): React provider · Stores JWTs in browser localStorage. · `IPO-Web-App-main/IPO-Web-App-main/frontend/src/AuthProvider.jsx`
- [Shared navigation](https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/Navabr.jsx): UI navigation · `IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/Navabr.jsx`
- [IPO discovery](https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/IPO/ipo.jsx): public UI · `IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/IPO/ipo.jsx`
- [Analysis](https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/Analysis/Analysis.jsx): public UI · `IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/Analysis/Analysis.jsx`
- [Broker comparison](https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/Broker/Broker.jsx): public UI · `IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/Broker/Broker.jsx`
- [Staff login](https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/Authontiction/Login.jsx): auth UI · `IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/Authontiction/Login.jsx`
- [IPO management](https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/Admin-View/ManageIpo.jsx): staff UI · `IPO-Web-App-main/IPO-Web-App-main/frontend/src/pages/Admin-View/ManageIpo.jsx`

### Django Backend

REST API, authorization, and operations.

- [Django runtime](https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/ipo_backend/manage.py): Django entry · Served through management, WSGI, or ASGI entry points. · `IPO-Web-App-main/IPO-Web-App-main/ipo_backend/manage.py`
- [API, token & admin routes](https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo_backend/urls.py): Django URL router · Exposes /api/v1/, token routes, and Django admin. · `IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo_backend/urls.py`
- [Django admin](https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo/admin.py): operations UI · Separate operational interface over the domain models. · `IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo/admin.py`

### IPO Domain

IPO resources and persistence mapping.

- [REST operations](https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo/views.py): DRF views · Public reads; staff JWT required for mutations. · `IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo/views.py`
- [IPO resource routes](https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo/urls.py): Django URL router · `IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo/urls.py`
- [JSON serializers](https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo/serializers.py): DRF serializers · `IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo/serializers.py`
- [IPO domain models](https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo/models.py): Django models · Users, companies, IPOs, documents, applications, and stock data. · `IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo/models.py`

### Data & Deployment

Storage, market integration, and runtime configuration.

- [Database](https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo/migrations/0001_initial.py): SQLite / configurable SQL · SQLite locally; settings support MySQL or PostgreSQL. · `IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo/migrations/0001_initial.py`
- **NSE market data**: external data · nselib data is processed with pandas.
- [Deployment settings](https://github.com/keerthivasan-skv/bluestock_intern/blob/main/IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo_backend/settings.py): Django configuration · CORS, secrets, hosts, debug mode, and database connection. · `IPO-Web-App-main/IPO-Web-App-main/ipo_backend/ipo_backend/settings.py`

### Other components

- **Browser users**: client

## Connections

- Browser users → React bootstrap: loads SPA
- React bootstrap → App routing: mounts
- App routing → Auth state: uses
- App routing → Shared navigation: renders
- Shared navigation → IPO discovery: navigates
- Shared navigation → Analysis: navigates
- Shared navigation → Broker comparison: navigates
- App routing → Staff login: routes staff
- App routing → IPO management: routes staff
- Staff login → Auth state: sets JWT
- IPO discovery → API, token & admin routes: public API requests
- Analysis → API, token & admin routes: public API requests
- Broker comparison → API, token & admin routes: public API requests
- Staff login → API, token & admin routes: token request
- IPO management → API, token & admin routes: JWT mutation requests
- Django runtime → API, token & admin routes: serves
- API, token & admin routes → IPO resource routes: /api/v1/
- IPO resource routes → REST operations: dispatches
- REST operations → JSON serializers: serializes
- REST operations → IPO domain models: reads and mutates
- IPO domain models → Database: persists
- REST operations → NSE market data: retrieves market data
- Django admin → IPO domain models: manages
- Deployment settings → Django runtime: configures
