A comprehensive C# console application for tracking personal expenses, income, and budgets with data persistence and reporting features. Now fully optimized for cross-platform development with SQLite support!
- User registration and login system
- JWT-based authentication
- Secure password hashing with BCrypt
- Pre-defined expense and income categories
- Category-based transaction organization
- Colorful category visualization
- Create and manage budgets for different categories
- Real-time budget tracking and spending alerts
- Budget performance analysis
- Over-budget notifications
- Comprehensive financial reporting
- Category breakdown analysis
- Monthly spending trends
- Budget performance reports
- LINQ-powered data analysis
- C# (.NET 9)
- Entity Framework Core - Data persistence
- SQLite - Cross-platform database (Windows, macOS, Linux)
- LINQ - Data querying
- JWT - Authentication
- BCrypt - Password hashing
- Clean Architecture - Project structure
PersonalFinanceTracker/
βββ src/
β βββ Domain/ # Core business entities
β β βββ Entities/
β β βββ User.cs
β β βββ Transaction.cs
β β βββ Category.cs
β β βββ Budget.cs
β βββ Application/ # Business logic layer
β β βββ DTOs/ # Data Transfer Objects
β β βββ Services/ # Application services
β βββ Infrastructure/ # Data access layer
β β βββ Data/
β β βββ ApplicationDbContext.cs
β βββ WebApi/ # REST API layer
β β βββ Controllers/
β β βββ Services/
β βββ ConsoleClient/ # Console application
β βββ Services/
β βββ Models/
- Users: User accounts with authentication
- Categories: Expense/Income categories with colors
- Transactions: Financial transactions linked to users and categories
- Budgets: Budget planning with spending tracking
- Users have many Transactions and Budgets
- Categories can have many Transactions and Budgets
- Budgets track spending within date ranges
- β Add income and expense transactions
- β Categorize all transactions
- β View transaction history
- β Transaction summaries with totals
- β Date-range filtering
- β Create budgets for expense categories
- β Set budget periods (start/end dates)
- β Real-time spending tracking
- β Budget progress visualization
- β Over-budget alerts
- β Comprehensive financial reports
- β Category breakdown analysis
- β Monthly trend analysis
- β Budget performance reports
- β Visual progress bars in console
- β Intuitive console interface
- β Color-coded displays
- β Secure authentication
- β Error handling and validation
- .NET 9 SDK
- Cross-platform support (Windows, macOS, Linux)
- Visual Studio, VS Code, or any .NET IDE
-
Clone the repository
git clone <repository-url> cd PersonalFinanceTracker
-
Build the solution
dotnet build
-
Start the API server
cd src/WebApi dotnet run --profile httpThe API will be available at
http://localhost:5269 -
Run the console client
cd src/ConsoleClient dotnet run
- The SQLite database will be created automatically on first run
- Pre-defined categories will be seeded
- Register a new user account
- Start tracking your finances!
-
Authentication
- Register new account or login
- Secure JWT-based session management
-
Main Menu Options
- π° Transaction Management
- π Budget Planning
- π Financial Reports
- π·οΈ Category Management
- π Quick Summary
-
Transaction Management
- Add income/expense transactions
- Select from available categories
- View transaction history
- Get spending summaries
-
Budget Planning
- Create budgets for expense categories
- Monitor spending against budgets
- View budget performance
- Get over-budget alerts
-
Financial Reports
- Generate comprehensive reports
- Analyze spending by category
- View monthly trends
- Track budget performance
POST /api/auth/register- User registrationPOST /api/auth/login- User login
GET /api/transactions- Get user transactionsPOST /api/transactions- Create transactionGET /api/transactions/summary- Get transaction summaryDELETE /api/transactions/{id}- Delete transaction
GET /api/budgets- Get user budgetsPOST /api/budgets- Create budgetGET /api/budgets/active- Get active budgetsGET /api/budgets/summary- Get budget summary
GET /api/categories- Get categoriesGET /api/categories/with-stats- Get categories with statistics
POST /api/reports/financial- Generate financial reportGET /api/reports/category-breakdown- Get category breakdownGET /api/reports/monthly-trends- Get monthly trends
- π½οΈ Food & Dining
- π Transportation
- ποΈ Shopping
- π¬ Entertainment
- π‘ Bills & Utilities
- π₯ Health & Fitness
- πΌ Salary
- π Investment
- π» Freelance
- π° Other Income
- JWT authentication with configurable expiry
- Password hashing using BCrypt
- User data isolation
- Input validation and sanitization
- Color-coded transaction displays (green for income, red for expenses)
- Progress bars for budget tracking
- Tabular data presentation
- Interactive menu system
- Error handling with user-friendly messages
- Domain Layer: Core business entities
- Application Layer: Business logic and services
- Infrastructure Layer: Data access and external services
- Presentation Layer: Web API and Console UI
- Repository pattern via Entity Framework
- Dependency Injection
- DTO pattern for data transfer
- Service layer pattern
- Entity Framework Core with SQLite
- Cross-platform database support
- Code-first approach with automatic database creation
- Seed data for categories
- Relationship management
- Database Compatibility: Migrated from SQL Server to SQLite for cross-platform support
- Math Function Issues: Replaced
Math.Abs()andMath.Max()with SQLite-compatible alternatives - Enum Serialization: Fixed all CategoryType and BudgetStatus serialization issues
- Type Conversion: Resolved JSON deserialization errors in console client
- Dependency Injection: Fixed service registration and resolution issues
- HTTPS Redirect: Disabled HTTPS redirect for development environment
- SQLite Database: Lightweight, file-based database that works on all platforms
- LINQ Translation: All queries now properly translate to SQLite
- JSON Serialization: Proper enum-to-string conversion for API responses
- Error Handling: Comprehensive error handling and user-friendly messages
- Build System: Clean builds across all projects
π PROJECT IS FULLY FUNCTIONAL!
- β API Server: Running on HTTP port 5269
- β Database: SQLite with automatic creation and seeding
- β Authentication: JWT-based user registration and login
- β All Features: Transactions, budgets, categories, and reports working
- β Console Client: Interactive interface with all functionality
- β Cross-Platform: Works on Windows, macOS, and Linux
- Web-based UI
- Mobile app integration
- Data export/import features
- Advanced reporting with charts
- Multi-currency support
- Recurring transaction support
- Investment tracking
- Bill reminders
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with .NET 9 and Entity Framework Core
- Optimized for cross-platform development
- SQLite database for universal compatibility
- Inspired by modern personal finance management needs
- Designed for extensibility and maintainability
Happy Financial Tracking! π°π
Last Updated: August 2025 - Now with full cross-platform support and all issues resolved!