Loading repository data…
Loading repository data…
mixin27 / repository
A comprehensive RESTful API for personal finance management, built with Spring Boot 4 and Kotlin.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
A comprehensive RESTful API for personal finance management, built with Spring Boot 4 and Kotlin.
git clone https://github.com/mixin27/finance-wallet-api.git
cd finance-wallet-api
# Create database
createdb finance_wallet
# Update src/main/resources/application.properties
spring.datasource.url=jdbc:postgresql://localhost:5432/finance_wallet
spring.datasource.username=your_username
spring.datasource.password=your_password
jwt.secret=your-super-secret-jwt-key-at-least-256-bits-long
jwt.expiration=86400000
./gradlew bootRun
The API will be available at http://localhost:8080
POST /api/auth/register - Register new user
POST /api/auth/login - Login and get JWT token
POST /api/auth/refresh - Refresh access token
GET /api/accounts - Get all accounts
POST /api/accounts - Create new account
GET /api/accounts/{id} - Get account details
PUT /api/accounts/{id} - Update account
DELETE /api/accounts/{id} - Delete account
GET /api/transactions - Get all transactions
POST /api/transactions - Create transaction
POST /api/transactions/transfer - Transfer between accounts
GET /api/transactions/{id} - Get transaction details
PUT /api/transactions/{id} - Update transaction
DELETE /api/transactions/{id} - Delete transaction
GET /api/categories - Get all categories
GET /api/categories?type=INCOME - Get income categories
POST /api/categories - Create custom category
PUT /api/categories/{id} - Update category
DELETE /api/categories/{id} - Delete category
GET /api/budgets - Get all budgets
GET /api/budgets/active - Get active budgets with progress
POST /api/budgets - Create budget
PUT /api/budgets/{id} - Update budget
DELETE /api/budgets/{id} - Delete budget
GET /api/goals - Get all goals
GET /api/goals?activeOnly=true - Get active goals only
POST /api/goals - Create goal
PATCH /api/goals/{id}/progress - Update goal progress
PATCH /api/goals/{id}/complete - Mark goal as completed
PUT /api/goals/{id} - Update goal
DELETE /api/goals/{id} - Delete goal
GET /api/dashboard - Get dashboard overview
GET /api/dashboard/statistics - Get statistics (custom range)
GET /api/dashboard/statistics/this-month - This month statistics
GET /api/dashboard/statistics/last-month - Last month statistics
GET /api/dashboard/statistics/this-year - This year statistics
POST /api/transactions/{id}/attachments - Upload receipt
GET /api/transactions/{id}/attachments - Get attachments
DELETE /api/transactions/{id}/attachments/{fileId} - Delete attachment
GET /api/uploads/{subDir}/{filename} - View/download file
spring.datasource.url=jdbc:postgresql://localhost:5432/finance_wallet
spring.datasource.username=your_username
spring.datasource.password=your_password
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=false
jwt.secret=your-256-bit-secret-key
jwt.expiration=86400000
jwt.refresh-expiration=604800000
spring.servlet.multipart.enabled=true
spring.servlet.multipart.max-file-size=5MB
spring.servlet.multipart.max-request-size=10MB
app.upload.dir=uploads
app.upload.max-file-size=5242880
# Configured in SecurityConfig.kt
# Allows localhost with any port for development
# Register
curl -X POST http://localhost:8080/api/auth/register \
-H "Content-Type: application/json" \
-d '{
"email": "john@example.com",
"username": "johndoe",
"password": "securePass123",
"fullName": "John Doe"
}'
# Login
curl -X POST http://localhost:8080/api/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "john@example.com",
"password": "securePass123"
}'
curl -X POST http://localhost:8080/api/accounts \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Main Checking",
"accountTypeId": "account-type-uuid",
"currencyId": "currency-uuid",
"initialBalance": 5000.00,
"color": "#4CAF50",
"icon": "💰"
}'
curl -X POST http://localhost:8080/api/transactions \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"accountId": "account-uuid",
"type": "EXPENSE",
"amount": 45.99,
"transactionDate": "2024-01-15T19:30:00",
"description": "Groceries at Whole Foods",
"categoryId": "food-category-uuid",
"tags": ["groceries", "weekly shopping"]
}'
curl -X POST http://localhost:8080/api/budgets \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Monthly Food Budget",
"amount": 600.00,
"period": "MONTHLY",
"startDate": "2024-01-01",
"currencyId": "currency-uuid",
"categoryId": "food-category-uuid",
"alertThreshold": 80
}'
curl -X POST http://localhost:8080/api/goals \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Emergency Fund",
"targetAmount": 10000.00,
"initialAmount": 1000.00,
"targetDate": "2024-12-31",
"currencyId": "currency-uuid",
"icon": "💰",
"color": "#4CAF50"
}'
src/main/kotlin/com/financewallet/api/
├── config/ # Configuration classes
│ ├── SecurityConfig.kt
│ └── DataInitializer.kt
├── controller/ # REST controllers
│ ├── AuthController.kt
│ ├── AccountController.kt
│ ├── TransactionController.kt
│ ├── CategoryController.kt
│ ├── BudgetController.kt
│ ├── GoalController.kt
│ ├── DashboardController.kt
│ └── FileController.kt
├── service/ # Business logic
│ ├── auth/
│ ├── account/
│ ├── transaction/
│ ├── category/
│ ├── budget/
│ ├── goal/
│ ├── dashboard/
│ └── file/
├── repository/ # Data access layer
├── entity/ # JPA entities
├── dto/ # Data transfer objects
│ ├── request/
│ └── response/
├── security/ # Security components
├── exception/ # Exception handling
└── FinanceWalletApiApplication.kt
Comprehensive testing guides available for all endpoints:
Each guide includes:
users - User accounts and authenticationrefresh_tokens - JWT refresh tokensaccounts - Financial accountsaccount_types - Account type definitionstransactions - Income/expense/transfer recordstransaction_attachments - Receipt filescategories - Transaction categoriesbudgets - Budget definitionsgoals - Financial goalscurrencies - Currency definitionsexchange_rates - Currency exchange ratestags - Transaction tagsuser_preferences - User settingssync_log - Synchronization tracking# Build Docker image
docker build -t finance-wallet-api .
# Run with Docker Compose
docker-compose up -d
Contributions are welcome! Please follow these steps:
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)This project is licensed under the MIT License - see the LICENSE file for details.
Your Name