Skip to content

A comprehensive web-based project appraisal and feasibility analysis tool similar to UNIDO's COMFAR. Built with React, TypeScript, Node.js, and PostgreSQL.

License

Notifications You must be signed in to change notification settings

fsbuilder/fsbuilder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FS Builder - Project Feasibility Analysis Tool

A comprehensive web-based project appraisal and feasibility analysis tool similar to UNIDO's COMFAR. Built with React, TypeScript, Node.js, and PostgreSQL.

Features

Core Modules

  • Project Setup: Define project parameters, timeline, and financial assumptions
  • Investment Planning: Track fixed assets, pre-production costs, working capital with depreciation
  • Production & Revenue: Capacity planning, product pricing, and sales projections
  • Operating Costs: Fixed and variable cost tracking with escalation
  • Financing: Equity, loans with amortization schedules, and grants

Financial Analysis

  • Cash Flow Projections: Operating, investing, and financing activities
  • Financial Statements: Income Statement and Balance Sheet generation
  • Profitability Indicators:
    • Net Present Value (NPV)
    • Internal Rate of Return (IRR)
    • Modified IRR (MIRR)
    • Payback Period (simple and discounted)
    • Return on Investment (ROI)
    • Benefit-Cost Ratio
  • Break-Even Analysis: Units and revenue calculation with visualization
  • Sensitivity Analysis: Variable impact analysis with tornado charts
  • Scenario Analysis: Best/base/worst case comparisons

Reporting

  • PDF Reports: Professional formatted reports with charts
  • Excel Export: Multi-sheet workbooks with formulas preserved

Tech Stack

Layer Technology
Frontend React 18, TypeScript, Tailwind CSS, Recharts
State Management Zustand
Backend Node.js, Express, TypeScript
Database PostgreSQL with Prisma ORM
Authentication JWT + bcrypt
Reports PDFKit, ExcelJS

Prerequisites

  • Node.js 18+
  • PostgreSQL 14+
  • npm or yarn

Installation

  1. Clone the repository

    git clone <repository-url>
    cd fs-builder
  2. Install dependencies

    npm install
  3. Configure environment

    cp .env.example .env
    # Edit .env with your database credentials
  4. Set up the database

    npm run db:generate
    npm run db:migrate
  5. Start development servers

    npm run dev

    This will start:

Project Structure

fs-builder/
β”œβ”€β”€ client/                    # React frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/        # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ features/          # Feature modules
β”‚   β”‚   β”‚   β”œβ”€β”€ investment/
β”‚   β”‚   β”‚   β”œβ”€β”€ production/
β”‚   β”‚   β”‚   β”œβ”€β”€ costs/
β”‚   β”‚   β”‚   β”œβ”€β”€ financing/
β”‚   β”‚   β”‚   β”œβ”€β”€ analysis/
β”‚   β”‚   β”‚   └── reports/
β”‚   β”‚   β”œβ”€β”€ hooks/             # Custom hooks & stores
β”‚   β”‚   β”œβ”€β”€ pages/             # Route pages
β”‚   β”‚   β”œβ”€β”€ services/          # API client
β”‚   β”‚   β”œβ”€β”€ types/             # TypeScript types
β”‚   β”‚   └── utils/             # Helpers
β”‚   └── package.json
β”œβ”€β”€ server/                    # Node.js backend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ routes/            # API routes
β”‚   β”‚   β”œβ”€β”€ middleware/        # Auth, error handling
β”‚   β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”‚   β”œβ”€β”€ calculations/  # Financial calculation engine
β”‚   β”‚   β”‚   └── reports/       # Report generators
β”‚   β”‚   └── types/
β”‚   └── package.json
β”œβ”€β”€ prisma/                    # Database schema
β”‚   └── schema.prisma
└── package.json               # Root package.json

API Endpoints

Authentication

  • POST /api/auth/register - Register new user
  • POST /api/auth/login - Login
  • GET /api/auth/me - Get current user

Projects

  • GET /api/projects - List projects
  • POST /api/projects - Create project
  • GET /api/projects/:id - Get project
  • PUT /api/projects/:id - Update project
  • DELETE /api/projects/:id - Delete project
  • POST /api/projects/:id/duplicate - Duplicate project

Project Data (for each project)

  • /api/projects/:id/investments - Investment CRUD
  • /api/projects/:id/products - Products CRUD
  • /api/projects/:id/costs - Operating costs CRUD
  • /api/projects/:id/financing - Financing CRUD

Analysis

  • GET /api/projects/:id/analysis/indicators - Financial indicators
  • GET /api/projects/:id/analysis/cashflow - Cash flow projections
  • GET /api/projects/:id/analysis/income-statement - Income statements
  • GET /api/projects/:id/analysis/balance-sheet - Balance sheets
  • POST /api/projects/:id/analysis/sensitivity - Sensitivity analysis
  • GET /api/projects/:id/analysis/break-even - Break-even analysis

Reports

  • POST /api/projects/:id/reports/pdf - Generate PDF report
  • POST /api/projects/:id/reports/excel - Generate Excel report

Financial Formulas

Net Present Value (NPV)

NPV = Ξ£ (CFt / (1 + r)^t)

Where CFt = cash flow at time t, r = discount rate

Internal Rate of Return (IRR)

Rate r where NPV = 0 (calculated using Newton-Raphson method)

Payback Period

Year when cumulative cash flow turns positive

Break-Even Point

Break-Even Units = Fixed Costs / (Price - Variable Cost per Unit)

Development

Run tests

npm run test

Build for production

npm run build

Database commands

npm run db:generate  # Generate Prisma client
npm run db:migrate   # Run migrations
npm run db:push      # Push schema changes (dev only)

License

MIT License

Acknowledgments

Inspired by UNIDO's COMFAR (Computer Model for Feasibility Analysis and Reporting) software for investment project analysis.

About

A comprehensive web-based project appraisal and feasibility analysis tool similar to UNIDO's COMFAR. Built with React, TypeScript, Node.js, and PostgreSQL.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages