A modern allowance management system built with React + ASP.NET Core 8.0. Helps parents manage children's allowances, track spending, and teach financial responsibility through an intuitive web interface and REST API.
- π¨βπ©βπ§βπ¦ Family Management: Manage multiple children in one family account
- π° Transaction Control: Add money (chores, gifts) or deduct spending
- π Automated Allowances: Set weekly allowances that pay automatically
- π Analytics Dashboard: View spending trends, income vs expenses, and category breakdowns
- πΎ Savings Accounts: Automatic savings transfers with deposits and withdrawals
- π― Wish Lists: Help children save for goals
- π Secure Authentication: ASP.NET Core Identity with role-based access
- π΅ Track Balance: See current balance and transaction history
- π― Wish List: Save for things they want with progress tracking
- π° Savings Account: Build savings with parent oversight
- π± Mobile Ready: iOS native app coming soon
- βοΈ Modern Frontend: React 19 + TypeScript + Tailwind CSS v4
- π¨ Rich Visualizations: Recharts for analytics (line, bar, pie charts)
- π§ͺ Test-Driven: 213 comprehensive tests with >90% coverage
- π³ Docker Ready: Containerized deployment
- π CI/CD: Automated testing and deployment via GitHub Actions
- π JWT Authentication: Secure API access
- πΎ Azure SQL Server: Reliable data persistence with EF Core migrations
- βοΈ Azure Deployment: API on App Service, Frontend on Storage Static Website
- π‘ Optional SignalR: Add real-time updates if needed (see ADDING_SIGNALR.md)
βββββββββββββββββββββββββββββββββββββββββββ
β React Frontend (SPA) β
β React 19 + TypeScript + Vite β
β Tailwind CSS v4 + Recharts β
β Axios for API calls β
ββββββββββββββββββββ¬βββββββββββββββββββββββ
β HTTP/REST + JWT
βΌ
βββββββββββββββββββββββββββββββββββββββββββ
β ASP.NET Core 8.0 Web API β
βββββββββββββββββββββββββββββββββββββββββββ€
β βββ Controllers (REST endpoints) β
β βββ Services (Business Logic) β
β β βββ FamilyService β
β β βββ TransactionService β
β β βββ AllowanceService β
β β βββ WishListService β
β β βββ SavingsAccountService β
β β βββ TransactionAnalyticsService β
β βββ Authentication (JWT + Identity) β
ββββββββββββββββββββ¬βββββββββββββββββββββββ
β Entity Framework Core 8
βΌ
βββββββββββββββββββββββββββββββββββββββββββ
β Azure SQL Database β
β βββ Users (ApplicationUser) β
β βββ Families β
β βββ Children β
β βββ Transactions β
β βββ WishListItems β
β βββ SavingsTransactions β
ββββββββββββββββββββ¬βββββββββββββββββββββββ
β²
β
ββββββββββββββββββββββββββββββββββββββββββββ
β Azure Function (Timer Trigger) β
β Processes Weekly Allowances β
β Runs daily at 10:00 AM UTC β
ββββββββββββββββββββββββββββββββββββββββββββ
- .NET 8.0 SDK
- Node.js 20.x (LTS recommended)
- SQL Server or Docker
For detailed step-by-step instructions, see LOCAL_DEVELOPMENT.md
Quick version:
# 1. Clone the repository
git clone https://github.com/yourusername/allowance-tracker.git
cd allowance-tracker
# 2. Start SQL Server (using Docker)
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=YourStrong@Passw0rd" \
-p 1433:1433 --name allowancetracker-sql \
-d mcr.microsoft.com/azure-sql-edge:latest
# 3. Setup and run the API
cd src/AllowanceTracker
dotnet ef database update
dotnet run
# API runs on https://localhost:7071
# 4. Setup and run the React app (in a new terminal)
cd web
npm install
echo "VITE_API_URL=https://localhost:7071" > .env.development
npm run dev
# Frontend runs on http://localhost:5173Open your browser to http://localhost:5173
Deploy to Azure with GitHub Actions:
- Set up Azure resources (SQL, App Service, Function App, Storage)
- Configure GitHub Secrets
- Push to
mainbranch - automatic deployment!
See GITHUB-ACTIONS-DEPLOYMENT.md for complete instructions.
We follow strict Test-Driven Development (TDD) with 73 comprehensive tests:
# Run all tests
dotnet test
# Run with code coverage
dotnet test --collect:"XPlat Code Coverage"
# Run specific test category
dotnet test --filter "Category=Unit"
# Watch mode (continuous testing)
dotnet watch test- 213 tests passing (API and Services)
- >90% code coverage on critical business logic
- Includes: Models, Services, Controllers, Authentication
- CI/CD runs all tests automatically on every commit
- Navigate to
/register - Create parent account (first user becomes family admin)
- Add children from the dashboard
// Via UI: Dashboard β "Add Child" button
// Or via API:
POST /api/v1/children
{
"firstName": "Alice",
"lastName": "Smith",
"weeklyAllowance": 10.00
}Via React UI:
- Go to Dashboard
- Click on a child's card to view details
- Go to "Transactions" tab
- Click "Add Transaction"
- Enter amount, type (Credit/Debit), category, and description
- Click "Save"
Via API:
curl -X POST https://localhost:7001/api/v1/transactions \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"childId": "guid-here",
"amount": 25.00,
"type": "Credit",
"description": "Mowed the lawn"
}'Allowances are processed automatically by an Azure Function with timer trigger:
- β Runs daily at 10:00 AM UTC
- β Checks all children with configured weekly allowances
- β Pays if 7+ days since last payment (or never paid before)
- β Creates transaction with category "Allowance"
- β Processes automatic savings transfer (if enabled)
- β Prevents double-payment within same week
- β Logs all activity to Application Insights
- β Nearly free on consumption plan
See WEEKLY_ALLOWANCE.md for complete details and testing instructions.
The REST API uses JWT Bearer authentication:
POST /api/auth/login
{
"email": "parent@example.com",
"password": "YourPassword123!"
}
# Response:
{
"token": "eyJhbGciOiJIUzI1NiIs...",
"expiresAt": "2025-10-10T12:00:00Z"
}curl -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
https://localhost:7001/api/v1/children/{childId}/balanceTokens expire after 24 hours. Claims included: UserId, Email, Role, FamilyId.
allowance/
βββ src/
β βββ AllowanceTracker/ # ASP.NET Core Web API
β β βββ Data/ # EF Core DbContext & Migrations
β β βββ Models/ # Domain entities
β β βββ DTOs/ # Data transfer objects
β β βββ Services/ # Business logic
β β βββ Api/V1/ # REST API controllers
β β βββ Program.cs # App startup & DI
β βββ AllowanceTracker.Functions/ # Azure Functions
β β βββ WeeklyAllowanceFunction.cs # Timer trigger
β β βββ Program.cs # Function startup & DI
β β βββ host.json # Function configuration
β βββ AllowanceTracker.Tests/ # xUnit test project
β βββ Models/ # Model tests
β βββ Services/ # Service tests
β βββ Api/ # API controller tests
βββ web/ # React Frontend
β βββ src/
β β βββ components/ # React components
β β β βββ tabs/ # Tab components
β β β βββ forms/ # Form components
β β βββ pages/ # Page components
β β βββ services/ # API service layer
β β βββ contexts/ # React contexts
β β βββ types/ # TypeScript types
β β βββ App.tsx # Main app component
β βββ package.json
β βββ vite.config.ts
βββ ios/ # iOS Native App (SwiftUI)
βββ specs/ # Detailed specifications
βββ .github/workflows/ # GitHub Actions CI/CD workflows
βββ GITHUB-ACTIONS-DEPLOYMENT.md # GitHub Actions deployment guide
βββ LOCAL_DEVELOPMENT.md # Local dev setup guide
βββ CLAUDE.md # Development guide for AI
βββ README.md # This file
| Category | Technology |
|---|---|
| Backend Framework | ASP.NET Core 8.0 Web API |
| Frontend Framework | React 19 + TypeScript |
| Build Tool | Vite 7 |
| Styling | Tailwind CSS v4 |
| Charts | Recharts |
| HTTP Client | Axios |
| Database | Azure SQL Server / SQL Server 2022 |
| ORM | Entity Framework Core 8 |
| Auth | ASP.NET Core Identity + JWT Bearer |
| Background Jobs | Azure Functions (Timer Trigger) |
| Testing | xUnit + FluentAssertions + Moq |
| CI/CD | GitHub Actions |
| Deployment | Azure App Service (API) + Azure Functions + Azure Storage (Frontend) |
- Password Hashing: ASP.NET Core Identity with PBKDF2
- JWT Tokens: HMAC-SHA256 signing, 24-hour expiration
- Role-Based Access: Parent/Child roles enforced at API level
- Database Transactions: Atomic money operations prevent race conditions
- Audit Trail: All transactions include
CreatedByandCreatedAt - Input Validation: Data annotations + FluentValidation
- Immutable Transactions: Once created, transactions cannot be modified
-- Core tables
Users (ApplicationUser extends IdentityUser)
- Id (Guid, PK)
- Email, FirstName, LastName
- Role (Parent/Child enum)
- FamilyId (FK)
Families
- Id (Guid, PK)
- Name
- CreatedAt
Children
- Id (Guid, PK)
- UserId (FK to Users)
- FamilyId (FK to Families)
- CurrentBalance (decimal)
- WeeklyAllowance (decimal)
- LastAllowanceDate (DateTime?)
Transactions
- Id (Guid, PK)
- ChildId (FK to Children)
- Amount (decimal)
- Type (Credit/Debit enum)
- Description (string)
- BalanceAfter (decimal, snapshot)
- CreatedById (FK to Users, audit)
- CreatedAt (DateTime, audit)We follow strict Test-Driven Development (TDD):
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Write tests first (RED phase)
- Implement minimum code to pass tests (GREEN phase)
- Refactor while keeping tests green
- Commit with descriptive messages:
git commit -m "Add feature X with TDD - Wrote 5 tests for feature X - Implemented minimum code to pass - Refactored for clarity Tests: 78 passing (+5) π€ Generated with Claude Code"
- Push to branch:
git push origin feature/amazing-feature - Open Pull Request
- >90% test coverage for new features
- AAA pattern: Arrange, Act, Assert
- Async/await consistently
- Nullable reference types enabled
- Records for DTOs, classes for entities
- LOCAL_DEVELOPMENT.md - START HERE - Complete local setup guide
- GITHUB-ACTIONS-DEPLOYMENT.md - Deploy to Azure with GitHub Actions
- WEEKLY_ALLOWANCE.md - Azure Function for automated allowances
- ADDING_SIGNALR.md - Add real-time updates (optional)
- CLAUDE.md - Development guide for AI assistants
- specs/ - Detailed specifications:
01-overview.md- System overview02-database-schema.md- EF Core models03-api-specification.md- REST API docs04-implementation-phases.md- TDD roadmap05-testing-strategy.md- Testing approach06-tdd-best-practices.md- TDD patterns08-ios-app-specification.md- iOS native app (SwiftUI)09-design-system.md- Design system and UI patterns
- Phase 1: Foundation with EF Core & Identity
- Phase 2: Transaction Management with Atomic Operations
- Phase 3: React Frontend Migration (from Blazor)
- Phase 4: Weekly Allowance Azure Function
- Phase 5: JWT Authentication & REST API
- Phase 6: Wish List Management
- Phase 7: Analytics & Reports with Charts
- Phase 8: Savings Accounts with Auto-Transfer
- Phase 9: Azure Deployment Pipeline
- iOS Native App (SwiftUI)
- PDF Export for Reports
- Chore Assignments with Rewards
- Family Notifications (Email/Push)
- Multi-Currency Support
- Recurring Transactions
- Budget Goals and Alerts
# Add new migration
dotnet ef migrations add YourMigrationName
# Apply migrations
dotnet ef database update
# Remove last migration (if not applied)
dotnet ef migrations remove# Verify appsettings.json has valid JWT configuration
# SecretKey must be at least 32 characters for HMAC-SHA256
{
"Jwt": {
"SecretKey": "your-secret-key-min-32-chars-long-for-hmac-sha256",
"Issuer": "AllowanceTracker",
"Audience": "AllowanceTracker"
}
}# View logs
docker-compose logs -f
# Rebuild containers
docker-compose down
docker-compose up --build
# Reset everything
docker-compose down -v # β οΈ This deletes all data!This project is licensed under the MIT License - see the LICENSE file for details.
- Built with ASP.NET Core
- UI powered by React with TypeScript
- Database by Microsoft SQL Server
- Testing with xUnit and FluentAssertions
- Deployed on Azure
- Developed with β€οΈ using Test-Driven Development
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: See specs/ folder
Built with Test-Driven Development π§ͺ 213 Tests Passing β >90% Code Coverage π Modern Stack: React + .NET βοΈ Production Ready π