A full-stack personal finance management application that helps you track your income and expenses, categorize transactions, and visualize your spending patterns.
- Features
- Tech Stack
- Prerequisites
- Installation
- Configuration
- Running the Application
- Project Structure
- API Documentation
- Contributing
- License
-
User Authentication & Authorization
- Secure user registration and login
- Cookie-based authentication
- Role-based access control (Admin/User)
- Password requirements enforcement
-
Transaction Management
- Add, edit, view, and delete financial transactions
- Track transaction date, amount, description
- Categorize transactions for better organization
- Soft delete functionality
-
Category Management
- Create custom categories for transactions
- Upload and manage category icons
- Edit and delete categories
- User-specific categories
-
Statistics & Visualization
- View spending patterns with charts
- Date range filtering for analytics
- Visual insights into financial data
-
Admin Panel
- User management dashboard
- View all registered users
- Monitor user activity
- Framework: ASP.NET Core 8.0
- Database: SQL Server (LocalDB)
- ORM: Entity Framework Core 9.0
- Authentication: ASP.NET Core Identity with Cookie Authentication
- API Documentation: Swagger/OpenAPI
- Mapping: AutoMapper
- Framework: React 18.3
- Build Tool: Vite 6.0
- UI Framework: Bootstrap 5.3 + React Bootstrap
- Routing: React Router DOM 6.28
- Charts: Chart.js 4.4
- Date Handling: Moment.js + DateRangePicker
- HTTP Client: Fetch API
Before you begin, ensure you have the following installed:
-
Backend:
- .NET 8.0 SDK
- SQL Server LocalDB or SQL Server
-
Frontend:
- Node.js (v16 or higher)
- npm or yarn package manager
-
Tools:
- Git
- Visual Studio 2022, VS Code, or any preferred IDE
git clone https://github.com/kras2v/MoneyCount.git
cd MoneyCountcd money-count-backend
# Restore NuGet packages
dotnet restore
# Update database with migrations
dotnet ef database updatecd money-count-frontend
# Install dependencies
npm install-
Database Connection
Update
appsettings.jsonorappsettings.Development.jsonin themoney-count-backenddirectory:{ "ConnectionStrings": { "SqlServerConnection": "Server=(localdb)\\MSSQLLocalDB;Database=aspnet-PaymentAPI;Trusted_Connection=True;MultipleActiveResultSets=True" } } -
CORS Settings
The backend is configured to allow requests from
http://localhost:5173(default Vite dev server). Modify inProgram.csif needed:builder.Services.AddCors(opt => opt.AddPolicy("AllowFrontend", p => p.WithOrigins("http://localhost:5173") .AllowAnyMethod() .AllowAnyHeader() .AllowCredentials()));
-
Identity Configuration
Password requirements and lockout settings are configured in
Program.cs. Adjust as needed:- Minimum password length: 6 characters
- Requires digit, non-alphanumeric, and uppercase
- Lockout: 5 failed attempts = 5-minute lockout
Create a .env file in the money-count-frontend directory:
VITE_REACT_APP_API_URL=http://localhost:5000/api/Update the URL to match your backend server address.
cd money-count-backend
dotnet runThe API will be available at http://localhost:5000 (or the port specified in launchSettings.json).
Access Swagger documentation at: http://localhost:5000/swagger (in development mode)
cd money-count-frontend
npm run devThe application will be available at http://localhost:5173.
Backend:
cd money-count-backend
dotnet publish -c ReleaseFrontend:
cd money-count-frontend
npm run buildThe production build will be in the dist folder.
MoneyCount/
βββ money-count-backend/ # ASP.NET Core API
β βββ Controllers/ # API Controllers
β β βββ AccountController.cs # Authentication & user management
β β βββ CategoryController.cs # Category CRUD operations
β β βββ TransactionController.cs # Transaction CRUD operations
β βββ Data/ # Database context and migrations
β β βββ MoneyCountDbContext.cs
β βββ Entities/ # Database models
β β βββ User.cs
β β βββ Category.cs
β β βββ Transaction.cs
β βββ Models/ # DTOs and view models
β βββ MappingProfiles.cs # AutoMapper configuration
β βββ Program.cs # Application entry point
β
βββ money-count-frontend/ # React application
β βββ src/
β β βββ components/ # Reusable React components
β β β βββ auth/ # Authentication components
β β β βββ category/ # Category components
β β β βββ transaction/ # Transaction components
β β β βββ protected-routes.jsx # Route protection
β β βββ pages/ # Page components
β β β βββ authentication/ # Login & register pages
β β β βββ users/ # User & admin pages
β β β βββ categories.jsx # Category management
β β β βββ transactions.jsx # Transaction management
β β β βββ statistics.jsx # Analytics dashboard
β β βββ App.jsx # Main app component
β β βββ main.jsx # Application entry point
β βββ public/ # Static assets
β βββ index.html # HTML template
β βββ vite.config.js # Vite configuration
β βββ package.json # Dependencies
β
βββ README.md # This file
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| POST | /api/account/register |
Register a new user | No |
| POST | /api/account/login |
Login user | No |
| POST | /api/account/logout |
Logout user | Yes |
| GET | /api/account/checkuser |
Check if user is authenticated | Yes |
| GET | /api/account/admin |
Access admin panel | Yes (Admin) |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /api/transactions |
Get paginated transactions | Yes |
| GET | /api/transactions/get-all-transactions |
Get all transactions | Yes |
| GET | /api/transactions/{id} |
Get specific transaction | Yes |
| POST | /api/transactions |
Create new transaction | Yes |
| POST | /api/transactions/post-transactions |
Bulk create transactions | Yes |
| PUT | /api/transactions |
Update transaction | Yes |
| DELETE | /api/transactions |
Delete transaction | Yes |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /api/categories |
Get all categories | Yes |
| GET | /api/categories/{id} |
Get specific category | Yes |
| POST | /api/categories |
Create new category | Yes |
| POST | /api/categories/upload-category-icon |
Upload category icon | Yes |
| PUT | /api/categories |
Update category | Yes |
| DELETE | /api/categories |
Delete category | Yes |
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow existing code style and conventions
- Write meaningful commit messages
- Update documentation as needed
- Test your changes thoroughly before submitting
kras2v
- GitHub: @kras2v
- Chart.js for data visualization
- React Bootstrap for UI components
- ASP.NET Core Identity for authentication
Note: This application is designed for personal use. Always keep your database credentials and sensitive configuration secure.