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!