Skip to content

sakshinikam05/CapZen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

21 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

CapZen

๐Ÿ“Š Cap Table & Equity Management Platform for Indian Startups ๐Ÿ“Š

โœจ Real-time Cap Tables ย |ย  ๐Ÿค– AI Equity Advisor ย |ย  ๐Ÿ‡ฎ๐Ÿ‡ณ 100% INR Native


Typing SVG


๐Ÿ“‹ Table of Contents

# Section
1 โœจ Overview
2 ๐ŸŽฏ Features
3 ๐Ÿง  Tech Stack
4 ๐Ÿ“‚ Project Structure
5 ๐Ÿš€ Getting Started
6 ๐Ÿ”ง Environment Variables
7 โ–ถ๏ธ Running the App
8 ๐Ÿ”Œ API Reference
9 ๐Ÿ—„๏ธ Database Schema
10 ๐Ÿ” Security
11 โค๏ธ Contributors

โœจ Overview

CapZen is a full-stack SaaS application that gives Indian startups a single source of truth for all things equity. Built on React + Vite (frontend) and Node.js + Express + SQLite (backend), with optional OpenAI GPT-4 integration for the AI Equity Advisor.

Key design decisions:

  • All monetary values are in INR (โ‚น) โ€” no USD ever.
  • All data is auto-saved per user to a SQLite database on every change.
  • A race-condition-safe isDataLoaded flag ensures saved data is never overwritten by an empty session on login.
  • Fully self-hostable โ€” no cloud dependencies required.

๐ŸŽฏ Features

Feature Description
๐Ÿ“Š Cap Table Management Real-time ownership percentages across all share classes
๐Ÿ‘ฅ Shareholder Registry Founders, investors, employees, advisors โ€” all in one place
๐Ÿ’ฐ Investment Rounds Log Seed, Series A/B/C, and Bridge rounds with full term details
๐Ÿ“‰ Dilution Modeling Simulate future rounds and see ownership impact instantly
๐Ÿ“„ Convertible Instruments Track SAFEs and convertible notes with cap & discount logic
๐ŸŽ ESOP & Stock Grants Manage employee option pools with vesting schedules
๐ŸŒŠ Waterfall Analysis Model exit scenarios โ€” acquisition, IPO, or liquidation
๐Ÿค– AI Equity Advisor Plain-English equity Q&A powered by OpenAI GPT-4
๐Ÿ“ฅ XLSX Export One-click export of board-ready cap table reports
๐Ÿ”‘ Secure Auth Signup/login with PBKDF2-SHA512 password hashing

๐Ÿง  Tech Stack

๐ŸŽจ Frontend

Technology Version Purpose
React 18.3 UI framework
TypeScript 5.5 Type safety
Vite 5.4 Build tool & dev server
Tailwind CSS 3.4 Utility-first styling
Radix UI Various Accessible component primitives
React Router DOM 6.26 Client-side routing
Recharts 2.12 Equity visualizations
xlsx 0.18 Excel export

โš™๏ธ Backend

Technology Purpose
Node.js + Express REST API server
better-sqlite3 Lightweight, fast SQLite driver
OpenAI SDK AI Equity Advisor integration
crypto (built-in) PBKDF2-SHA512 password hashing
dotenv Environment variable management

๐Ÿ“‚ Project Structure

CapZen/
โ”œโ”€โ”€ server/
โ”‚   โ””โ”€โ”€ index.js                   โ† Express API (auth, data save/load, AI)
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ AIEquityCalculator.tsx  โ† AI Advisor UI
โ”‚   โ”‚   โ”œโ”€โ”€ CapTableDisplay.tsx     โ† Ownership table + chart
โ”‚   โ”‚   โ”œโ”€โ”€ CompanyInfo.tsx         โ† Company setup form
โ”‚   โ”‚   โ”œโ”€โ”€ ConvertibleInstruments.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ InvestmentRounds.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ ShareholderManagement.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ StockGrants.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ WaterfallAnalysis.tsx
โ”‚   โ”‚   โ””โ”€โ”€ Logo.tsx / Footer.tsx
โ”‚   โ”œโ”€โ”€ contexts/
โ”‚   โ”‚   โ””โ”€โ”€ AuthContext.tsx         โ† Auth state + API helpers
โ”‚   โ”œโ”€โ”€ pages/
โ”‚   โ”‚   โ”œโ”€โ”€ Landing.tsx             โ† Marketing landing page
โ”‚   โ”‚   โ”œโ”€โ”€ Login.tsx / Signup.tsx
โ”‚   โ”‚   โ””โ”€โ”€ Index.tsx               โ† Main dashboard
โ”‚   โ”œโ”€โ”€ types/index.ts              โ† TypeScript interfaces
โ”‚   โ””โ”€โ”€ utils/enhancedExportUtils.tsโ† XLSX export logic
โ”œโ”€โ”€ .env                            โ† API keys (not committed)
โ”œโ”€โ”€ package.json
โ””โ”€โ”€ vite.config.ts

๐Ÿš€ Getting Started

Prerequisites

  • Node.js v18+
  • npm v9+
  • OpenAI API key (optional โ€” only for AI Advisor)

Installation

# 1. Clone the repo
git clone https://github.com/sakshinikam05/CapZen.git
cd CapZen

# 2. Install dependencies
npm install

# 3. Set up environment
cp .env.example .env
# Edit .env with your OpenAI key

๐Ÿ”ง Environment Variables

# .env โ€” place in project root
OPENAI_API_KEY=sk-your-openai-api-key-here

The AI Equity Advisor is the only feature requiring an API key. All other features work without it.


โ–ถ๏ธ Running the App

๐Ÿ“Œ Notes

  • Make sure Node.js is installed before running the project.
  • Keep the .env file private.
  • Use npm install before starting the app.

CapZen runs two processes in parallel:

# Terminal 1 โ€” Backend API (port 3001)
node server/index.js

# Terminal 2 โ€” Frontend dev server (port 8080)
npm run dev

Or run both together (macOS/Linux):

node server/index.js & npm run dev

On first run, the SQLite database is automatically created at server/capzen.db.

Production build:

npm run build   # Output in dist/

๐Ÿ”Œ API Reference

Base URL: http://localhost:3001

Auth

Method Endpoint Description
POST /api/signup Create account
POST /api/login Authenticate user

Cap Table Data

Method Endpoint Description
POST /api/data/save Save a data section (company, shareholders, etc.)
GET /api/data/load/:userId Load all data for a user

AI Advisor

Method Endpoint Description
POST /api/ai/calculate Submit equity question to GPT-4

Health

Method Endpoint Description
GET /api/health Server + DB status check

๐Ÿ—„๏ธ Database Schema

SQLite with WAL mode ยท Auto-created on first run

users

Column Type Notes
id TEXT (PK) UUID
name TEXT Full name
email TEXT UNIQUE Login email
password_hash TEXT PBKDF2-SHA512 + random salt
created_at DATETIME Auto timestamp

cap_table_data

Column Type Notes
id TEXT (PK) {userId}_{dataType}
user_id TEXT (FK) References users.id
data_type TEXT company, shareholders, etc.
data_json TEXT JSON-serialized data
updated_at DATETIME Last save timestamp

Uses UPSERT โ€” each save replaces the previous version of that data type.


๐Ÿ” Security

Concern Implementation
๐Ÿ”‘ Passwords PBKDF2 + SHA-512 + 16-byte random salt
๐Ÿ”’ Sessions Stored in localStorage post-auth
๐ŸŒ CORS Scoped to localhost:8080 in dev
๐Ÿ’พ Database Local SQLite file, never publicly exposed
๐Ÿ“ Data isolation All queries scoped strictly by userId

โค๏ธ Contributors


Sakshi Nikam
Sakshi Nikam
Sneha Andhale
Sneha Andhale
Shrushti Pawar
Shrushti Pawar
Vishakha Patil
Vishakha Patil


Built with ๐Ÿ’ป & โ˜• for India's startup ecosystem

ยฉ CapZen 2026 ยท MIT License ยท Industry Project

About

๐Ÿ“Š CapZen is a modern Cap Table & Equity Management Platform designed for ๐Ÿ‡ฎ๐Ÿ‡ณ Indian startups. It helps founders, investors, and teams manage ownership, ESOPs, funding rounds, dilution, and equity operations through one centralized dashboard.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors