Project Finance Management Portal

A centralized, high-performance financial tracking and analytics platform.

What is this Application?

This software is a custom enterprise-grade financial hub designed to streamline client invoicing, organizational cash flow, cost allocations, and project profitability calculations in real-time. It completely replaces fragile tracking spreadsheets with centralized secure records, automated computations, and rich interactive KPIs.

What the App Stands For

Built with stability, speed, and modern styling at its core, this portal serves as a source of truth for financial health. Its pillars are:

Real-Time Insight
Instant computation of overall and project-specific net margins, outstandings, receivables, and categorical expense distributions.
Robust Security
Dual-layer token-based encryption incorporating both standard JWTs and customized RSA key pairs to lock client-server exchanges.
Categorical Management
Flexible cost/revenue category provisioning allowing dynamic categorization and tracking filters across all project boards.
Adaptive Branding
A dynamic branding settings module that allows businesses to personalize dashboard aesthetics, color schemes, and chart palettes.

Architecture Overview

The application is designed using a decoupled client-server model:

Getting Started

Follow these structured steps to clone, configure, and boot the application locally.

Prerequisites

Step-by-Step Setup

1. Clone the Project Files

Clone the open-source repository and navigate to the project directory.

Bash / Terminal
git clone https://github.com/your-username/project-finance-management-software.git
cd project-finance-management-software
2. Build the Backend Environment

Navigate to the server directory and pull all dependencies:

Terminal
cd backend
npm install

A. Generate the RSA Authentication Keys

The application utilizes high-security RSA key pairs for signing user interactions. Run these commands locally inside the backend/ folder to produce the standard 2048-bit keys:

OpenSSL Console
# Generate Private Key
openssl genpkey -algorithm RSA -out private_key.pem -pkeyopt rsa_keygen_bits:2048

# Generate Public Key from Private Key
openssl rsa -pubout -in private_key.pem -out public_key.pem
RSA Conversion Note:

The key strings saved in the files will span multiple lines. For `.env` compatibility, you must convert these file contents into a single line, converting line breaks to \n.

B. Configure Backend Variables

Create a file named .env in the backend/ folder:

backend/.env
PORT=3021
MONGO_URI=mongodb://localhost:27017/cost-management
JWT_SECRET=your_jwt_secret_phrase
ALLOWED_ORIGINS=http://localhost:5173

# Paste your \n formatted RSA keys here
RSA_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQ...\n-----END PRIVATE KEY-----\n"
RSA_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...\n-----END PUBLIC KEY-----\n"

C. Boot the Backend

Terminal
# Start in live-reloading Dev Mode
npm run dev

# Start in Standard Mode (Runs compiled script)
npm run start
3. Build the Frontend Environment

Open a secondary terminal tab, navigate to the frontend folder and install resources:

Terminal
cd ../frontend
npm install

A. Configure Frontend Variables

Create a .env file in the frontend/ folder. Make sure the Public Key matches the one set in the backend.

frontend/.env
VITE_API_URL=http://localhost:3021/api/v1
VITE_SECURE_STORAGE_KEY=your-secure-storage-key

# Paste the matching \n formatted RSA Public Key here
VITE_RSA_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...\n-----END PUBLIC KEY-----\n"

B. Start Frontend Development Server

Terminal
npm run dev

The application will launch. Open http://localhost:5173 in your web browser.

Technical Specifications

Comprehensive list of languages, libraries, frameworks and packages utilized across this application.

Frontend Stack

Core Framework & Engine

React (v19) Vite TypeScript
Modern SPA foundation designed for rapid client-side rendering and full TS compliance.

Routing & State

React Router DOM (v7) React Query (@tanstack) Axios
Efficient multi-page route orchestration, deep payload requests, and auto-caching hooks.

Design & Animation

Tailwind CSS Radix UI Primitives Framer Motion Recharts
Utility-first styles combined with unstyled accessible web components, hardware-accelerated animations, and responsive KPI widgets.

Utilities & Form Processing

React Hook Form Zod Crypto-JS Date-fns
Lightweight validation schemas, local browser-level secure key storage, and robust date computation.

Backend Stack

Core Server Environment

Node.js Express (v5) TypeScript
High-performance REST API routing framework built with TypeScript compilation pipelines.

Database & Storage

MongoDB Mongoose ODM
High-performance document storage modeling, indexing, and object validation layer.

Authentication & Protection

JsonWebToken (JWT) Bcrypt.js Helmet Express Rate Limit
Client sessions authentication, password encryption, secure HTTP response headers, and basic DDoS/brute-force request capping.

File Generation & Processing

Multer ExcelJS Nodemailer
Local client attachment uploading, robust binary Excel reporting build systems, and dynamic backend mail services.

Architecture & Core Modules

Technical breakdown of directories, modules, and execution procedures.

Project File Map

A comprehensive directory mapping outlining the complete layout of code files, configurations, schemas, and routes across both servers and user interfaces:

project-root/
├── backend/                             # REST API Backend Service
│   ├── src/                             # Source code folder
│   │   ├── config/                      # Server-level config setups
│   │   │   └── logger.ts                # Winston rotation logger settings
│   │   ├── constants/                   # System-wide static variables
│   │   ├── controllers/                 # Route controllers (holds core database handlers)
│   │   │   ├── AuthController.ts        # Client session registration & access checks
│   │   │   ├── CategoryController.ts    # Income and expense categorization logic
│   │   │   ├── CostController.ts        # Project expense ledger entries CRUD
│   │   │   ├── DashboardController.ts   # System-wide KPIs & aggregations computation
│   │   │   ├── ProjectController.ts     # Main client projects tracker logic
│   │   │   ├── SettingsController.ts    # Corporate style customization properties
│   │   │   └── income.controller.ts     # Cash inflow ledger entry controls
│   │   ├── middleware/                  # Route level Express validation checks
│   │   │   ├── authMiddleware.ts        # Custom JWT security checks & RSA token filters
│   │   │   ├── rateLimiters.ts          # Express API route rate limiting controls
│   │   │   ├── requestLogger.ts         # Server call tracking and winston logging
│   │   │   ├── upload.ts                # Multer local image storage settings
│   │   │   └── validator.ts             # Zod data validation schema wrapper
│   │   ├── models/                      # MongoDB models (Mongoose collections)
│   │   │   ├── Category.ts              # Categories database fields model
│   │   │   ├── Cost.ts                  # Cost entry database fields model
│   │   │   ├── OTP.ts                   # Single use verification security codes model
│   │   │   ├── Project.ts               # Project details & outstanding model
│   │   │   ├── Settings.ts              # Customizable brand styling variables model
│   │   │   ├── User.ts                  # User accounts and user levels model
│   │   │   └── income.model.ts          # Cash entries database fields model
│   │   ├── routes/                      # API endpoint mappings
│   │   │   ├── auth.routes.ts           # Authentication route collection
│   │   │   ├── category.routes.ts       # Category management route collection
│   │   │   ├── cost.routes.ts           # Cost tracking endpoints collection
│   │   │   ├── dashboard.routes.ts      # Analytical graphs aggregate collection
│   │   │   ├── income.routes.ts         # Cash entries endpoints collection
│   │   │   ├── project.routes.ts        # Project metrics endpoints collection
│   │   │   ├── settings.routes.ts       # Branding colors mapping collection
│   │   │   ├── upload.routes.ts         # Media assets linking collection
│   │   │   └── v1/
│   │   │       └── index.ts             # Central REST API registry (points to /api/v1)
│   │   ├── schemas/                     # Payload checks using Zod library
│   │   │   ├── auth.schema.ts           # Client credentials format tests
│   │   │   ├── category.schema.ts       # Ledger category labels layout checks
│   │   │   ├── cost.schema.ts           # Expense values layout checks
│   │   │   └── project.schema.ts        # New project data format tests
│   │   ├── scripts/                     # Local data migration runners
│   │   ├── services/                    # Shared operational services
│   │   │   └── EmailService.ts          # Nodemailer transaction emails setting
│   │   ├── utils/                       # Shared utility helpers
│   │   │   ├── encryption.ts            # RSA file signers & key conversion helpers
│   │   │   ├── logger.ts                # Winston log format helper functions
│   │   │   └── responseHandler.ts       # Unified API response builders
│   │   └── server.ts                    # Primary backend runtime entrance file
│   ├── scripts/                         # Command automation shell helpers
│   │   └── migrateCategories.js         # Script to normalize database category ids
│   ├── seed.ts                          # DB initial seeding routines
│   ├── tsconfig.json                    # Backend compiler specifications
│   ├── package.json                     # Main dependencies & runtime scripts
│   └── .env                             # Port rules, databases, and JWT/RSA keypairs
│
├── frontend/                            # Vite & React Single Page Application
│   ├── src/                             # Front-end UI code base
│   │   ├── components/                  # Global reusable UI modules
│   │   │   ├── ThemeProvider.tsx        # Responsive light/dark system toggle wrapper
│   │   │   ├── common/                  # General shared page controls
│   │   │   ├── layout/                  # Page frame visual layout wrappers
│   │   │   │   ├── AppLayout.tsx        # General shell framework container
│   │   │   │   └── Sidebar.tsx          # Dynamic slider drawer sidebar panel
│   │   │   └── ui/                      # Styled Radix & custom primitive parts
│   │   │       ├── DateRangePicker.tsx  # Dynamic multi-day range selector
│   │   │       ├── InfiniteSelect.tsx   # Scrolling database dynamic chooser
│   │   │       ├── LoadingSpinner.tsx   # Modern rotating loading indicator
│   │   │       ├── NoDataPlaceholder.tsx# Blank status container indicator
│   │   │       ├── alert-dialog.tsx     # Modern interactive alert popups
│   │   │       ├── avatar.tsx           # User initials badge generator
│   │   │       ├── badge.tsx            # Inline data highlight tags
│   │   │       ├── button.tsx           # Standard button with loading/disabled states
│   │   │       ├── card.tsx             # Rounded dashboard panel wrapper
│   │   │       ├── command.tsx          # Search lists selector overlay
│   │   │       ├── dialog.tsx           # Standard popup modal window
│   │   │       ├── input.tsx            # Form textbox with custom borders
│   │   │       ├── label.tsx            # Floating textbox title element
│   │   │       ├── pagination.tsx       # Record page controllers
│   │   │       ├── popover.tsx          # Hover tooltip popover box
│   │   │       ├── select.tsx           # Dropdown list custom box
│   │   │       ├── separator.tsx        # Visual styling border line
│   │   │       ├── sheet.tsx            # Slide-out sidebar sheet drawers
│   │   │       └── tabs.tsx             # Responsive dashboard tabs controller
│   │   ├── hooks/                       # Tannstack query caching functions
│   │   ├── lib/                         # Front-end configuration clients
│   │   │   ├── api.ts                   # Axios client containing interceptors & tokens
│   │   │   ├── auth.ts                  # Secure RSA decryption & session tools
│   │   │   ├── toast.tsx                # Sonner toast visual notify wrappers
│   │   │   └── utils.ts                 # Dynamic tailwind classes assembler
│   │   ├── pages/                       # Multi-view pages structures
│   │   │   ├── auth/                    # Client login, PIN entry & verify views
│   │   │   ├── categories/              # Category CRUD boards & tables
│   │   │   ├── costs/                   # Cost tracking registers & modals
│   │   │   ├── dashboard/               # Main analytical graphs, metrics & charts
│   │   │   ├── entries/                 # Shared financial ledger view list
│   │   │   ├── income/                  # Income entries & tracking boards
│   │   │   ├── projects/                # Projects list, details & invoices
│   │   │   └── settings/                # Corporate customization, themes & logos
│   │   ├── App.tsx                      # App router config & layout registry
│   │   ├── index.css                    # Tailwind rulesets & animations CSS
│   │   └── main.tsx                     # React client bootstrap mount script
│   ├── public/                          # Static assets and browser icon resources
│   ├── .env                             # Frontend environment setup variables
│   ├── .gitignore                       # Standard version control exclusions
│   ├── eslint.config.js                 # Frontend static analysis & linting parameters
│   ├── index.html                       # HTML page mount skeleton for Vite compile
│   ├── postcss.config.js                # Style preprocessor runner configurations
│   ├── tailwind.config.js               # Theme style token matching files
│   ├── tsconfig.json                    # Bundler TypeScript compilation specs
│   ├── tsconfig.app.json                # React App TypeScript parameters
│   ├── tsconfig.node.json               # Node process TypeScript context
│   ├── vite.config.ts                   # Vite bundler, proxy & packaging rules
│   └── package.json                     # Frontend dependencies & run scripts
│
├── docs/                                # Documentation and guides
│   └── developer-guide.html             # Premium interactive developer handbook
│
├── postman_collection.json              # Complete Postman REST API endpoints package
└── README.md                            # Comprehensive user manual

Project Root Directory & File Dictionary

The system is highly organized and decoupled. Below is an exhaustive breakdown explaining the purpose, tech stack, and significance of every single entry in the project root directory:

/backend (Directory)
Role: Secure RESTful API Service
Tech: Node.js, Express 5, Mongoose ODM, MongoDB, Winston Logger, JWT/RSA Security.

Purpose: Serves as the database interface, managing cost ledgers, client projects, custom categorizations, and settings modifications. Enforces strict backend protection like CORS policies, request limiters, and logs rotations.
/frontend (Directory)
Role: Client Portal Web Interface
Tech: React 19, Vite, TypeScript, Tailwind CSS, Radix UI Primitives, Framer Motion, Recharts.

Purpose: The visual interface for administrators. It processes real-time margin changes, graphs cost categories, updates custom corporate colors, and decrypts secure packets locally using matching RSA parameters.
README.md (File)
Role: Project Guide & Operational Handbook
Tech: GitHub Flavored Markdown

Purpose: The universal entry point for users and developers. It reviews system properties, outlines configuration files, documents primary and secondary dependencies, provides copy-paste ready installation CLI actions, and clarifies deployment methodologies.

Primary Modules & Usage

1. Dashboard & Analytical Processing

Consolidates database financial inputs. It processes the net cash margins by fetching accumulated cost categories, and returns visual distributions via the Recharts components. It automatically monitors and warns developers about outstanding invoice limits.

2. Secure Ledger Entry (Income & Expense)

All items in the project's financial history are saved as sub-entries associated with a specific project id. The database models track category relationships to maintain accurate, query-optimized summaries.

3. Report Generation System

Using ExcelJS on the server-side, the project offers custom report exports. The system parses document database properties, converts them into standard tabular formats, and streams binary Excel spreadsheets directly to the client browser.

Development Safe Practices:

Do not disable rate limiters (`express-rate-limit`) or security headers (`helmet`) in production configurations, as the authentication pipeline requires these layers to maintain stability and prevent abuse.

User Guide


Introduction

Welcome to the Project Finance Management Software User Guide.

This solution is designed to help businesses efficiently manage:

The platform provides a centralized dashboard to monitor the financial health of all projects while allowing users to manage individual project records with ease.

This documentation explains every module and feature in detail so that first-time users can easily understand and use the software.


1. Getting Started

Main Navigation Menu

The left sidebar contains the primary navigation:

Module Purpose
Dashboard View overall financial KPIs and analytics
Projects Manage all projects and view project-level reports
Costs Add and manage expense entries
Income Add and manage income entries
Categories Create and manage reusable categories
Settings Configure company identity and visual branding
Log Out Exit the system securely

2. Dashboard Module

The Dashboard provides a complete financial overview of all projects.

It helps users quickly understand:


Dashboard KPIs

2.1 All Projects Receivable

Displays the total expected revenue across all projects.

Example:
₹16,20,000 Total Portfolio Budget

Purpose:


2.2 Total Outstanding

Shows pending payments that are yet to be received.

Example:
₹4,50,000 Pending Payments

Purpose:


2.3 Total Received

Displays all recorded income received across projects.

Example:
₹11,70,000 Actual Cash Inflow

Purpose:


2.4 Total Projects

Displays the total number of active projects.

Example:
7 Active Engagements

Purpose:


2.5 Total Expenditure

Displays the total expenses recorded.

Example:
₹45,000 Total Expenditure

Purpose:


Dashboard Analytics

2.6 Project Distribution Chart

This pie chart shows the revenue distribution across projects.

Purpose:


2.7 Outstanding by Project

Displays pending receivables project-wise.

Purpose:


2.8 Cost Distribution Chart

Displays expense distribution across categories.

Purpose:


Creating a New Project from Dashboard

Steps

Step 1

Click the Create New Project button.

Step 2

A popup window will appear.

Step 3

Enter the following details:

Field Description
Project Name Name of the project
Project Value (Budget) Total project receivable amount
Status Current project status
Step 4

Click Create Project.

The new project will now be available in the Projects module.


3. Project Management Module

The Projects module provides detailed financial management for:


Projects Overview Screen

This screen displays portfolio-wide KPIs.

Available KPIs

KPI Description
All Projects Receivable Total expected revenue
Total Received Total collected amount
All Projects Outstanding Pending payments
Total Project Cost Total expenses
Portfolio Profit Overall profit margin

Analytics in Projects Module

Profit vs Cost Chart

Displays profitability compared with project costs.

Purpose:


Category Cost Breakdown

Shows how expenses are distributed across categories.

Purpose:


Top 5 Profitable Projects

Displays projects generating the highest profit.

Purpose:


4. Individual Project Overview

When a user opens a specific project, they can view detailed financial insights for that project.


Available Information

Project Header

The top section displays:

Example:


Project-Level KPIs

Total Receivable

Displays total expected project revenue.

Total Received

Displays income already recorded.

Total Outstanding

Displays remaining unpaid amount.

Total Expenses

Displays total project cost.

Net Profitability

Displays overall project profit margin.

Purpose:


Project Charts

Profit vs Cost Distribution

Visual representation of:


Category Cost Split

Displays expense distribution by categories.


Project Actions

The following action buttons are available:

Button Purpose
Add Expense Entry Add new project cost
Add Income Entry Add new project income
Download Report Export project report

5. Adding Expense Entries

The Costs module is used to record all project expenses.

Examples


How to Add a Cost Entry

Step 1 – Open Costs Module

Navigate to:

Sidebar → Costs

Step 2 – Fill Expense Information

Complete the following fields:

Field Description
Project Select the project
Expense Category Select category
Description / Title Expense description
Cost Amount Enter amount
Entry Date Select expense date
Step 3 – Create New Category (Optional)

If the required category does not exist:

  • Click + New Category
  • Create the category
  • Return and select it
Step 4 – Save Entry

Click:

Record Cost

The expense will automatically:

  • Update project expenses
  • Update dashboard KPIs
  • Update charts and analytics
  • Affect profitability calculations

6. Adding Income Entries

The Income module is used to record project revenue or received payments.

Examples


How to Add an Income Entry

Step 1 – Open Income Module

Navigate to:

Sidebar → Income

Step 2 – Fill Income Details

Enter the following:

Field Description
Project Select project
Income Category Select income category
Description / Title Payment description
Income Amount Enter received amount
Inflow Date Select payment date
Step 3 – Add Category if Required

Click:

+ New Category

Create the category and return.

Step 4 – Save Income Entry

Click:

Record Income

The system will automatically:

  • Update total received amount
  • Reduce outstanding balance
  • Update profitability metrics
  • Refresh charts and analytics

7. Category Management

The Categories module allows users to create reusable categories for:

Categories help maintain consistency in reporting and analytics.


Category Dashboard

This screen displays:

Metric Description
Total Categories Total number of categories
Active Usage Number of projects using categories
Most Frequent Most commonly used category

Creating a New Category

Step 1 – Open Categories Module

Navigate to:

Sidebar → Categories

Step 2 – Enter Category Information

Fill the following fields:

Field Description
Category Name Name of category
Category Type Cost or Income
Description Optional notes
Step 3 – Add Category

Click:

Add Category

The category will now be available in:

  • Costs module
  • Income module
  • Analytics
  • Reporting

Existing Categories Table

The table displays:

Column Description
Name Category name
Type Cost or Income
Description Category details
Usage Number of projects using it
Status Active/Inactive
Actions Edit category

Search & Filter Features

Users can:

Purpose:


8. Downloading Project Reports

Users can export reports for analysis or sharing.


How to Download Reports

Step 1 – Open Any Project

Navigate to:

Projects → Select Project

Step 2 – Click Download Report

A popup window will appear.

Step 3 – Choose Report Type

Available options:

Report Type Includes
All Records Costs + Income + KPIs
Cost Entries Only Expenses + Cost KPIs
Income Entries Only Revenue + Income KPIs
Step 4 – Export Report

Select the required option and export the report.


9. Settings Module

The Settings module allows administrators to customize:


Branding Section

Features Available

Setting Purpose
Company Logo Upload organization logo
Organization Name Set company name

Supported Formats


How to Update Branding

Step 1 – Open Settings

Navigate to:

Sidebar → Settings

Step 2 – Upload Logo

Upload the organization logo.

Step 3 – Enter Organization Name

Type the company name.

Step 4 – Save Changes

Click:

Save Branding Identity

The updated branding will reflect across the application.


10. Visual Theme System

The platform allows users to customize interface colors.

Available Customization Areas

Theme Element Purpose
Primary Accent Sidebar & primary actions
Primary Hover Hover interaction color
Secondary Base Card backgrounds
Title Emphasis Headings and labels
Sub-text Color Secondary descriptions
Action Button CTA button color
Button Hover Hover state for buttons

Chart Palette

Users can configure colors used in:


Reset Theme

Click:

Reset Defaults

to restore the default color palette.


11. Recommended Workflow

For best results, follow this sequence:

Step 1 – Create Categories

Examples

  • Employee Salary
  • Hosting
  • Marketing
  • Client Payment
  • Milestone Payment
Step 2 – Create Projects

Add:

  • Project name
  • Budget value
  • Status
Step 3 – Add Cost Entries

Record all project expenses.

Step 4 – Add Income Entries

Record received payments.

Step 5 – Monitor Dashboard

Track:

  • Profitability
  • Outstanding balances
  • Revenue
  • Expenditure
  • Analytics
Step 6 – Export Reports

Download reports whenever required.


12. Understanding Key Financial Terms

Term Meaning
Receivable Amount expected from clients
Outstanding Pending unpaid amount
Received Amount already collected
Expense Money spent on project
Profitability Revenue after deducting expenses
Category Classification of income or expense

13. Best Practices

Keep Categories Consistent

Avoid creating duplicate categories.

Example

Use “Employee Salary” consistently instead of:


Update Entries Regularly

Add costs and income immediately after transactions.

Benefits


Monitor Outstanding Payments

Review the dashboard regularly to:


Export Reports Frequently

Maintain periodic backups and reporting records.

Recommended