A multi-service monorepo for personal financial health management with AI-powered insights.
CAPSTACK is a comprehensive financial wellness platform that helps users:
- Track income and expenses
- Automate savings with smart locking mechanisms
- Calculate financial health scores
- Predict emergency survival periods
- Receive personalized financial insights and alerts
The project consists of three main services:
- Framework: Node.js + Express + TypeScript
- Database: PostgreSQL (with Prisma/TypeORM ready)
- Cache: Redis
- Features: RESTful APIs for user management, finance calculations, savings automation
- Framework: FastAPI + Python
- ML Stack: scikit-learn, pandas, numpy
- Features: Risk scoring, survival prediction, health score calculation
- Framework: Next.js + TypeScript + Material UI
- Features: Responsive web app with dashboard, onboarding, and insights
CAPSTACK/
├── backend-api/ # Node.js Express API
├── ml-service/ # FastAPI ML service
├── frontend/ # Next.js React app
├── database/ # SQL migrations and seeds
├── infra/ # Docker configs and deployment
├── analytics/ # Jupyter notebooks and reports
├── docs/ # Documentation and PDFs
├── .gitignore
└── README.md
- Node.js 18+
- Python 3.11+
- Docker & Docker Compose
- PostgreSQL & Redis (or use Docker)
# Clone and navigate to project
cd CAPSTACK
# Start all services
docker-compose -f infra/docker-compose.yml up --build
# Access services:
# Frontend: http://localhost:3001
# Backend API: http://localhost:3000
# ML Service: http://localhost:8000cd backend-api
npm install
npm run dev # Development
npm run build && npm start # Productioncd ml-service
pip install -r requirements.txt
uvicorn app.main:app --reloadcd frontend
npm install
npm run devCreate .env files in each service directory:
PORT=3000
DATABASE_URL=postgresql://user:password@localhost:5432/capstack
JWT_SECRET=your_jwt_secret
REDIS_URL=redis://localhost:6379
# Add ML service environment variables
NEXT_PUBLIC_BACKEND_URL=http://localhost:3000
NEXT_PUBLIC_ML_URL=http://localhost:8000
- Backend API docs: Available at
/docswhen running - ML Service docs: Available at
/docswhen running
# Backend tests
cd backend-api && npm test
# Frontend tests (when implemented)
cd frontend && npm testSee infra/ directory for Docker and deployment configurations.
- Follow the established folder structure
- Add tests for new features
- Update documentation
- Use TypeScript for type safety
TODO: Add license information