A full-stack Financial Accounting semester project that uploads transaction records, classifies accounts, generates a balance sheet, validates the accounting equation, and exports reports.
- Frontend: React + Vite
- Backend: Node.js + Express
- Database: PostgreSQL with Prisma ORM
- Hosted database: Neon PostgreSQL
- Frontend deployment: Vercel
- Backend deployment: Render
smart-balance-sheet-generator/
client/ React/Vite app
server/ Express API, Prisma schema, parsing and report services
- Install dependencies:
npm install- Create environment files:
cp server/.env.example server/.env
cp client/.env.example client/.env-
Add your Neon PostgreSQL connection string to
server/.env.MAX_UPLOAD_MBcontrols the largest accepted upload. The default is25.MAX_PARSE_ROWScontrols how many rows are processed from a file. The default is100000. -
Generate Prisma client and create tables:
npm run prisma:generate
npm run prisma:migrate- Run both apps in separate terminals:
npm run dev:server
npm run dev:clientThe frontend runs on http://localhost:5173 and the backend runs on http://localhost:4000.
- CSV
- Excel
.xlsx - PDF parsing is experimental and depends on readable text tables
Recommended columns: date, description, account, debit, credit, and/or amount.
A small demo file is included at samples/transactions.csv.
- Create a new Render Web Service from this repository.
- Use
serveras the root directory. - Build command:
npm install && npx prisma generate && npx prisma db push - Start command:
npm start - Add environment variables from
server/.env.example. - After the frontend is deployed, update
FRONTEND_URLto the Vercel URL.
- Create a new Vercel project from this repository.
- Use
clientas the root directory. - Add
VITE_API_URLwith the deployed Render backend URL. - Deploy.
If deploying the backend on Vercel instead of Render:
- Create a second Vercel project from this repository.
- Use
serveras the root directory. - Add the backend environment variables from the section below.
- Deploy.
- Use the backend Vercel URL as
VITE_API_URLin the frontend Vercel project.
Render backend:
NODE_ENV=production
DATABASE_URL=postgresql://USER:PASSWORD@HOST.neon.tech/smart_balance_sheet?sslmode=require
FRONTEND_URL=https://your-vercel-app.vercel.app
MAX_UPLOAD_MB=25
MAX_PARSE_ROWS=100000
JSON_BODY_LIMIT=75mbVercel frontend:
VITE_API_URL=https://your-render-service.onrender.comVercel backend:
NODE_ENV=production
DATABASE_URL=postgresql://USER:PASSWORD@HOST.neon.tech/smart_balance_sheet?sslmode=require
FRONTEND_URL=https://your-frontend.vercel.app
MAX_UPLOAD_MB=25
MAX_PARSE_ROWS=100000
JSON_BODY_LIMIT=75mbPOST /api/uploadsuploads and parses CSV, Excel, or PDF files.POST /api/balance-sheetrecalculates a balance sheet from transactions.POST /api/reports/pdfdownloads a PDF report.POST /api/reports/exceldownloads an Excel report.