A full-stack personal finance application for managing wallets, tracking debts with partners, and monitoring expenses.
MA6 Debt is a comprehensive personal finance management application that helps you:
- Manage multiple wallets with parent-child hierarchy
- Track debts with partners (who owes whom)
- Record transactions with debt tagging
- View monthly expense statistics
- Transfer money between wallets
- Monitor financial dashboard with charts
- .NET 9 - Web API framework
- Entity Framework Core - ORM for PostgreSQL
- MediatR - CQRS pattern implementation
- FluentValidation - Input validation
- BCrypt - Password hashing
- JWT Bearer - Authentication
- Scalar - API documentation (Swagger alternative)
- PostgreSQL - Database
- Next.js 16 - React framework (App Router)
- React 19 - UI library
- TypeScript - Type safety
- Tailwind CSS 4 - Styling
- shadcn/ui - UI components
- React Hook Form - Form handling
- Zod - Schema validation
- Recharts - Charts library
- Lucide React - Icons
- Sonner - Toast notifications
MA6_Debt/
├── backend/
│ └── src/
│ ├── API/ # Controllers, Middleware
│ ├── Application/ # CQRS Commands, Queries, Handlers
│ ├── Domain/ # Entities
│ └── Persistence/ # DbContext, Migrations
│
├── frontend/
│ └── src/
│ ├── app/ # Next.js App Router pages
│ ├── features/ # Feature-based modules
│ │ ├── auth/ # Authentication
│ │ ├── wallet/ # Wallet management
│ │ ├── debt/ # Debt partners
│ │ ├── transaction/ # Transactions
│ │ ├── history/ # Transaction history
│ │ ├── transfer/ # Wallet transfers
│ │ └── user/ # User profile
│ ├── components/ # Shared UI components
│ └── lib/ # Utilities
│
└── docs/ # Documentation
- .NET 9 SDK
- Node.js 18+
- PostgreSQL database
- pnpm (recommended)
- Navigate to backend directory:
cd backend- Configure connection string in
src/API/appsettings.Development.json:
{
"ConnectionStrings": {
"DefaultConnection": "Host=localhost; Port=5432; Database=ma6_debt_db; Username=your_name; Password=your_password"
},
"Jwt": {
"Secret": "YourSecretKeyLongerThan32Characters!",
"Issuer": "MA6Debt",
"Audience": "MyUsers",
"ExpirationMinutes": 60
}
}- Run migrations and start:
dotnet ef database update --project src/Persistence --startup-project src/API
dotnet run --project src/APIBackend runs at: https://localhost:7297
- Navigate to frontend directory:
cd frontend- Install dependencies:
pnpm install- Configure environment in
.env.local:
NEXT_PUBLIC_API_URL=https://localhost:7297
- Start development server:
pnpm devFrontend runs at: http://localhost:3000
- Register with username, email, password
- Login with JWT token
- Auto-redirect to dashboard
- Create parent wallets (e.g., "Cash", "Bank")
- Create child wallets (e.g., "Bank -> Savings")
- Set default wallet (star icon)
- View wallet hierarchy with total balance
- Add partners (people you share expenses with)
- Track who owes whom
- Record repayments
- Set default partner
- Record expenses with optional debt tagging
- Toi Tra (I Pay): You pay the bill, partner owes you
- Partner Tra (Partner Pays): Partner pays, you owe them
- Debt amount is tracked automatically
- Notifications show updated debt balance
- View all transactions with filters
- Filter by wallet, partner, tag
- Tags: Salary, Bill, Repay, Consume
- Edit/Delete transactions
- View detailed debt info per transaction
- Transfer money between child wallets
- Track transfer history
- Parent wallet shows aggregated balance
- Net worth calculation (Cash + Receivable - Payable)
- Monthly expense bar chart
- Recent transactions
- Wallet overview
- Edit username and email
- Change password with verification
POST /api/auth/login- LoginPOST /api/auth/register- Register
GET /api/wallets- List walletsPOST /api/wallets- Create walletPUT /api/wallets/{id}- Update walletDELETE /api/wallets/{id}- Delete wallet
GET /api/debt-partners- List partnersPOST /api/debt-partners- Create partnerPUT /api/debt-partners/{id}- Update partnerDELETE /api/debt-partners/{id}- Delete partner
GET /api/transactions- List transactions (paginated)GET /api/transactions/{id}- Get transaction detailPOST /api/transactions/quick-deduct- Quick deductPOST /api/transactions/adjustment- Cash adjustmentPUT /api/transactions/{id}- Update transactionDELETE /api/transactions/{id}- Delete transactionGET /api/transactions/monthly-stats- Monthly statistics
POST /api/transfers- Create transferGET /api/transfers- List transfers
GET /api/users/profile- Get profilePUT /api/users/profile- Update profilePUT /api/users/password- Change passwordGET /api/users/preferences- Get preferencesPUT /api/users/default-wallet- Set default walletPUT /api/users/default-partner- Set default partner
Made by Thai Shiroru
MIT License