How prathamesh3245/venturepulse works
1. Repo shape: a hybrid monorepo
This repository combines three distinct layers: a React frontend, a Node/Express backend for authentication and API handling, and a Python/modeling layer for financial prediction and analysis. The persistent store is MongoDB, and the runtime boundaries are clearly split between browser UI, API server, and ML code.
2. Primary user interface: frontend/
The main product UI is a Vite-based React SPA. frontend/src contains the app shell, auth flows, landing page, dashboards, startup detail views, due diligence screens, financial upload, predictive insights, and investment tracking components. AuthContext.jsx is the main client-side state boundary for authenticated user session data.
3. Frontend data flow
The React app is the entry point for users. It collects credentials, sends them to backend auth endpoints, stores/uses the JWT session, and then routes users into role-specific dashboards. Feature screens such as PredictiveInsights, FinancialUpload, and DueDiligencePipeline act as UI clients to backend APIs rather than holding business logic themselves.
4. Authentication and authorization subsystem
The README describes a role-based auth model with two user types: investment_banker and startup. Registration is split into separate endpoints, login is shared, and GET /api/auth/me exposes the current user. Authorization is enforced through JWTs and by checking role-specific verification fields such as SEBI registration or startup platform IDs.
5. Core backend API
The backend is a Node/Express service at the repository root, backed by MongoDB via Mongoose and secured with bcrypt and JWT. The API exposes auth routes, protected dashboard routes, and the /getPredict prediction endpoint. Environment variables define the MongoDB URI, JWT secret, and server port, so the backend is the main trust and access-control boundary.
6. Domain-specific verification rules
Investment bankers must provide a SEBI registration number, while startups must provide a government startup ID. The README shows placeholder verification endpoints for SEBI and startup registry checks; in the current repo these appear to be validation and status-tracking hooks, with real external verification still planned.
7. Python / ML subsystem
The Python files and notebooks form the model-development and experimentation layer. simple_xgb_regressor.py, banker_app.py, and notebooks like XGBoost.ipynb, venture_pulse_preprocessing.ipynb, and financial_metrics.ipynb suggest a workflow for preprocessing financial data, training an XGBoost-style model, and evaluating metrics. This layer is separate from the frontend and auth stack and likely feeds the prediction API.
8. Prediction pipeline boundary
The /getPredict endpoint is the main integration point between the web backend and ML logic. Requests carry numeric feature vectors, the backend authenticates the caller, and the model layer produces a prediction response. In architecture terms, this is the key synchronous business workflow after login.
9. Legacy Express app under app/
There is also an older Express-generator-style application in app/ with Jade views, public JS/CSS, and route files. It looks like a server-rendered scaffold that may be legacy, auxiliary, or an earlier iteration of the product. For diagramming, treat it as a secondary UI/backend shell unless you confirm it is still mounted in production.
10. Data assets and offline analysis
The Excel files in the repo root and the startup datasets under frontend/src/data are inputs for analysis, UI listing, and model experimentation. These are not runtime services; they support preprocessing, feature engineering, and sample data presentation. The notebooks and dataset files are part of the offline analytics pipeline rather than the live application path.
Main entry points: main.jsx React app · routes/index.js Auth routes · users.js Protected APIs · index.js API server
Components 17
Frontend SPA
React/Vite client application and UI state
- React app · Main browser application shell and route entrypoint.
frontend/src/main.jsx - Auth context · Holds authenticated session state and user identity in the browser.
frontend/src/context/AuthContext.jsx - Login & register · Client-side screens for registration and sign-in.
frontend/src/Components/Auth/Login.jsx - Dashboards · Role-specific banker and startup dashboard screens.
frontend/src/Components/dashboards/BankerDashboard.jsx - Feature screens · Due diligence, financial upload, predictive insights, and investment tracking UI surfaces.
frontend/src/Components/PredictiveInsights.jsx - Startup views · Startup listing and detail pages used for browsing and inspection.
frontend/src/Components/Startupdetailpage.jsx
API Backend
Node/Express trust boundary for auth, dashboards, and prediction access
- API server · Main Node/Express service coordinating auth, protected routes, and prediction requests.
index.js - Auth routes · Registration, login, me, and role-based verification endpoints.
app/routes/index.js - Protected APIs · Authenticated backend endpoints for dashboard and user-specific data access.
app/routes/users.js - Predict endpoint · Synchronous prediction entrypoint for feature vectors from the UI.
index.js - Mongo layer · Database connection and persistence boundary for users and app data.
config/database.js
Legacy App
Older Express-generator style server-rendered app
- Legacy app · Older Express-generator style application with Jade views and public assets.
app/bin/www - Legacy routes · Older server-side route handlers and scaffolded page responses.
app/routes/index.js
ML Layer
Python modeling, preprocessing, and experimentation
- XGBoost model · Training and inference code for financial prediction experiments.
simple_xgb_regressor.py - Preprocessing · Notebook-based cleaning, feature engineering, and metric exploration.
venture_pulse_preprocessing.ipynb - ML apps · Auxiliary Python application and experimentation scripts.
banker_app.py
Data Assets
Offline spreadsheets and startup datasets used for analysis and modeling
- Datasets · Financial workbook inputs and sample startup data used offline for analysis and modeling.
Final_Financial_Dataset_Practical.xlsx
Connections 21
- React app → Auth context: session · App shell reads and updates authenticated user state.
- React app → Login & register: auth UI · Routes users into registration and login flows.
- React app → Dashboards: role views · Opens banker or startup dashboard after authentication.
- React app → Feature screens: feature routes · Navigates to due diligence, uploads, predictions, and tracking screens.
- React app → Startup views: browse · Shows startup lists and detail pages.
- Login & register → Auth routes: credentials · Submits registration and login requests to auth endpoints.
- Auth context → Auth routes: JWT · Uses token-backed session to call current-user and verification APIs.
- Feature screens → Protected APIs: api calls · Feature screens consume protected backend data and workflow endpoints.
- Feature screens → Predict endpoint: predict · Uploads numeric inputs for prediction requests.
- Dashboards → Protected APIs: dashboard data · Loads role-specific data behind authentication.
- API server → Auth routes: mounts · Hosts authentication and registration route handlers.
- API server → Protected APIs: mounts · Hosts protected dashboard and user endpoints.
- API server → Predict endpoint: serves · Exposes the prediction API as part of the main backend.
- Auth routes → Mongo layer: persist · Stores users, roles, and verification state in MongoDB.
- Protected APIs → Mongo layer: read/write · Reads authenticated application data from the database layer.
- Predict endpoint → XGBoost model: inference · Delegates prediction work to the modeling layer.
- XGBoost model → Preprocessing: trained from · Model development depends on preprocessing and metric notebooks.
- Preprocessing → Datasets: inputs · Notebook workflows consume workbook and startup dataset files.
- ML apps → XGBoost model: experiments · Auxiliary Python app code and scripts support model experimentation.
- Legacy app → Legacy routes: routes · Legacy server renders pages through older route handlers.
- Legacy routes → Mongo layer: shared store · Legacy scaffold can also persist through the common database boundary.