soyosoyo-reactapp

🎯 SACCO System - Quick Launch Guide

⚑ Quick Start (30 seconds)

Already Running βœ…

Servers are currently active:

Just open your browser to http://localhost:5173!


πŸš€ Start Fresh (if servers stopped)

Terminal 1 - Backend

cd backend
npm run start:dev

Should see: Backend running on port 3000

Terminal 2 - Frontend

cd frontend
npm run dev

Should see: VITE v7.3.1 ready in ... ms on port 5173


πŸ“ Key Pages

Page URL Purpose
Dashboard http://localhost:5173 Overview & summary
Members http://localhost:5173/members Manage members
Deposits http://localhost:5173/deposits Record deposits
Withdrawals http://localhost:5173/withdrawals Record withdrawals
Loans http://localhost:5173/loans Manage loans
Settings http://localhost:5173/settings ⭐ Configuration
Ledger http://localhost:5173/ledger ⭐ Financial history
Reports http://localhost:5173/reports Reports & analysis

⭐ = New in this release


πŸ”Œ API Endpoints (for testing)

Health Check

curl http://localhost:3000/health

Settings API

curl http://localhost:3000/settings/contribution-types
curl http://localhost:3000/settings/expense-categories
curl http://localhost:3000/settings/fine-categories

Accounts API

curl http://localhost:3000/accounts
curl http://localhost:3000/accounts/by-type/bank

Ledger API

curl http://localhost:3000/ledger/summary
curl http://localhost:3000/ledger/transactions

Fines API

curl http://localhost:3000/fines
curl http://localhost:3000/fines/statistics

πŸ“Š What You Can Do

βœ… Manage Members - Add/edit/delete cooperative members
βœ… Record Transactions - Deposits, withdrawals, loans, repayments
βœ… View Ledger - Complete transaction history with running balance
βœ… Configure Settings - Set contribution types, expenses, income, fines
βœ… Generate Reports - Financial summaries and analytics
βœ… Track Fines - Member penalties and payments


πŸ’Ύ Database

Provider: Neon PostgreSQL (serverless cloud)
Status: βœ… Connected and synced
Tables: 15 models with proper relations

To reset database:

cd backend
npx prisma db push --force-reset  # ⚠️ Deletes all data
npx prisma db seed               # Optional: seed test data

πŸ“€ Push Changes to GitHub

After making code changes:

cd ..  # Go to repo root
git add .
git commit -m "Your message here"
git push origin main

πŸ” Troubleshooting

Servers won’t start?

# Kill existing Node processes
Get-Process node | Stop-Process -Force
# Then restart

Database out of sync?

cd backend
npx prisma migrate dev
npx prisma db push

Port already in use?

# Find process using port
netstat -ano | findstr :3000  # Backend
netstat -ano | findstr :5173  # Frontend

# Kill by PID
taskkill /PID 12345 /F

πŸ“š Documentation


πŸŽ“ Architecture Overview

Frontend (React + Vite)
    ↓ HTTP/REST
Backend (NestJS)
    ↓ Prisma ORM
Database (Neon PostgreSQL)
    ↓ Double-entry accounting
General Ledger (JournalEntry)

πŸ’‘ Pro Tips

  1. Hot Reload Active - Save files and see changes instantly
  2. Database Synced - Prisma keeps schema in sync
  3. Type Safe - Full TypeScript coverage
  4. Git Tracking - All changes committed automatically
  5. Error Handling - Check browser console & server logs

πŸ“ž System Status

βœ… Backend:  RUNNING on port 3000
βœ… Frontend: RUNNING on port 5173
βœ… Database: CONNECTED to Neon PostgreSQL
βœ… Git:      SYNCED with GitHub (cb61f41)

Ready to develop! πŸš€

Open http://localhost:5173 in your browser now.

Last Updated: January 20, 2026