A comprehensive Personal Finance Manager built with Spring Boot and React, designed to help users track expenses, manage budgets, and achieve financial goals with enterprise-level security.
- Multi-Account Support - Bank accounts, credit cards, cash, investments, crypto
- Transaction Tracking - Income, expenses, and transfers with categories
- Budget Management - Periodic budgets with spending alerts
- Financial Goals - Savings goals, debt payoff, emergency funds
- Recurring Transactions - Automatic transaction scheduling
- Multi-Currency Support - Handle different currencies
- JWT Authentication - Secure token-based authentication
- Role-Based Access Control - USER, ADMIN, PREMIUM roles
- Password Security - BCrypt encryption
- Two-Factor Authentication - Enhanced security (planned)
- Rate Limiting - API abuse protection
- Data Validation - Input sanitization and validation
- Spending Analytics - Visual spending patterns
- Budget Tracking - Real-time budget vs actual spending
- Goal Progress - Track progress towards financial goals
- Transaction History - Comprehensive transaction search and filtering
- Financial Reports - Monthly, quarterly, yearly reports
src/main/java/mra_pfm/pfm/
βββ config/ # Configuration classes
βββ controller/ # REST API controllers
βββ dto/ # Data Transfer Objects
βββ entity/ # JPA entities
βββ repository/ # Data access layer
βββ security/ # Security configurations
βββ service/ # Business logic layer
pfm-client/src/
βββ components/ # Reusable UI components
βββ pages/ # Application pages
βββ services/ # API service layer
βββ hooks/ # Custom React hooks
βββ types/ # TypeScript type definitions
βββ utils/ # Utility functions
- Java 17 or higher
- Node.js 18 or higher
- MySQL 8.0 or higher
- Git
git clone https://github.com/mrahmanashiq/pfm.git
cd pfm-- Create database
CREATE DATABASE pfm;
-- Create user (optional)
CREATE USER 'pfm_user'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON pfm.* TO 'pfm_user'@'localhost';
FLUSH PRIVILEGES;# Configure database connection
cp src/main/resources/application.properties.example src/main/resources/application.properties
# Edit application.properties with your database credentials
nano src/main/resources/application.properties
# Build and run the backend
./gradlew bootRunThe backend will start on http://localhost:8090
# Navigate to frontend directory
cd pfm-client
# Install dependencies
npm install
# Start development server
npm startThe frontend will start on http://localhost:3000
Create .env file in the root directory:
# Database Configuration
DB_URL=jdbc:mysql://localhost:3307/pfm
DB_USERNAME=root
DB_PASSWORD=your_password
# JWT Configuration
JWT_SECRET=your-super-secret-jwt-key-here-make-it-long-and-secure
JWT_EXPIRATION=86400000
JWT_REFRESH_EXPIRATION=604800000
# Email Configuration (Optional)
MAIL_USERNAME[email protected]
MAIL_PASSWORD=your-app-password
# CORS Configuration
CORS_ORIGINS=http://localhost:3000,http://localhost:3001Key configuration options in application.properties:
# Server Configuration
server.port=8090
# Database Configuration
spring.datasource.url=${DB_URL}
spring.datasource.username=${DB_USERNAME}
spring.datasource.password=${DB_PASSWORD}
# JWT Configuration
app.jwt.secret=${JWT_SECRET}
app.jwt.expiration=${JWT_EXPIRATION:86400000}
app.jwt.refresh-expiration=${JWT_REFRESH_EXPIRATION:604800000}
# CORS Configuration
app.cors.allowed-origins=${CORS_ORIGINS:http://localhost:3000}POST /api/v1/auth/signup # User registration
POST /api/v1/auth/signin # User login
POST /api/v1/auth/refresh # Refresh JWT token
POST /api/v1/auth/signout # User logout
POST /api/v1/auth/forgot-password # Password reset requestGET /api/v1/accounts # Get user accounts
POST /api/v1/accounts # Create new account
GET /api/v1/accounts/{id} # Get account details
PUT /api/v1/accounts/{id} # Update account
DELETE /api/v1/accounts/{id} # Delete accountGET /api/v1/transactions # Get user transactions
POST /api/v1/transactions # Create new transaction
GET /api/v1/transactions/{id} # Get transaction details
PUT /api/v1/transactions/{id} # Update transaction
DELETE /api/v1/transactions/{id} # Delete transactionVisit http://localhost:8090/swagger-ui.html when the server is running.
# Run all tests
./gradlew test
# Run tests with coverage
./gradlew test jacocoTestReport
# Run integration tests
./gradlew integrationTestcd pfm-client
# Run unit tests
npm test
# Run tests with coverage
npm run test:coverage
# Run E2E tests
npm run test:e2e# Build and run with Docker Compose
docker-compose up -d
# View logs
docker-compose logs -f# Backend production build
./gradlew build -Pprod
# Frontend production build
cd pfm-client
npm run buildWe welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Backend: Follow Java code conventions and use Spotless for formatting
- Frontend: Use ESLint and Prettier configurations
- Commits: Follow Conventional Commits
- Core authentication system
- Account management
- Basic transaction tracking
- User management
- Transaction categories
- Basic budgeting
- Advanced budget management
- Financial goal tracking
- Spending analytics
- Mobile app (React Native)
- Data export/import
- Two-factor authentication
- Investment portfolio tracking
- Bill reminders
- Financial advisor integration
- Open banking API integration
- Advanced reporting
- Machine learning insights
- Spring Boot - Application framework
- Spring Security - Authentication and authorization
- Spring Data JPA - Data persistence
- MySQL - Database
- JWT - Token-based authentication
- Gradle - Build automation
- React - UI framework
- TypeScript - Type safety
- Tailwind CSS - Utility-first CSS
- Axios - HTTP client
- React Hook Form - Form management
This project is licensed under the MIT License - see the LICENSE file for details.
- MRA Rahman Ashiq - Initial work - @mrahmanashiq
- Inspired by popular finance apps like Mint, YNAB, and PocketGuard
- Special thanks to the Spring Boot and React communities
- Icons and design inspiration from various open-source projects
- π§ Email: [email protected]
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
β Star this repo if you find it helpful!