A financial management API built with TypeScript, Express, and Prisma, following Clean Architecture principles. It allows users to manage budgets, wages, and expenses efficiently.
- Node.js (v18 or higher)
- MySQL (v8.0 or higher)
- Bun (recommended) or bun
bun installThe project uses three different databases for different environments:
- finanzapp-local - For local development
- finanzapp-test - For running tests
- finanzapp - For production
# Run the automated setup script
./docs/scripts/setup-databases-simple.sh# Setup each database individually
bun run db:setup:local # Setup local database
bun run db:setup:test # Setup test database
bun run db:setup:prod # Setup production database# Start local development (uses finanzapp-local)
bun run dev
# Start with production database
bun run dev:prod# Run tests (uses finanzapp-test)
bun run test
# Run tests with coverage
bun run coverage- Database:
finanzapp-local - Configuration:
.env.local - Command:
bun run dev
- Database:
finanzapp-test - Configuration:
.env.test - Command:
bun run test
- Database:
finanzapp - Configuration:
.env - Command:
bun run dev:prod
bun run dev # Local development (uses finanzapp-local)
bun run dev:prod # Development with production DB
bun run build # Build the project
bun run start # Start production serverbun run test # Run tests (uses finanzapp-test)
bun run coverage # Run tests with coveragebun run db:setup:local # Setup local database
bun run db:setup:test # Setup test database
bun run db:setup:prod # Setup production databasebun run prisma:migrate # Create migration for local
bun run prisma:migrate:prod # Create migration for production
bun run prisma:deploy # Apply migrations to production
bun run prisma:deploy:local # Apply migrations to local
bun run prisma:deploy-test # Apply migrations to test# Start only the database
docker compose up -d finanzapp-db
# Start complete application
docker compose up- Knowledge Base - Understanding the application functionality
- API Documentation - Complete API reference (Swagger/OpenAPI)
- Project Setup - Detailed project setup guide
- Project Setup - Detailed setup guide
- Database Setup Script - Automated database setup
- Environment Configuration - Environment variables and configuration
- Development Commands - All available development commands
- Testing Guide - Testing strategies and guidelines
- Troubleshooting - Common issues and solutions
- Users API - User management endpoints
- Wages API - Wage management endpoints
- Budgets API - Budget management endpoints
- Endpoints Overview - Complete API overview
- Command Reference - All available commands
- Troubleshooting - Common issues and solutions
- Changelog - Project version history
# Check if MySQL is running
docker compose ps
# Restart MySQL
docker compose restart finanzapp-db# Regenerate Prisma client
bun run prisma:generate
# Apply migrations manually
bunx prisma migrate deploy# Create database manually
mysql -u user -ppassword -h localhost -P 3307 -e "CREATE DATABASE \`finanzapp-local\`;"# Verify local database connection
bunx prisma db pull --schema=./prisma/schema.prisma
# Verify environment variables
node -e "console.log(require('dotenv').config())"- MySQL running on port 3307
- Database
finanzapp-localexists - Database
finanzapp-testexists - Database
finanzappexists -
.env.localfile configured -
.env.testfile configured - Migrations applied to all databases
-
bun run devworks without errors -
bun run testworks without errors
If you encounter issues:
- Check the troubleshooting guide: docs/development/troubleshooting.md
- Verify MySQL connection:
mysql -u user -ppassword -h localhost -P 3307 -e "SELECT 1;" - Verify databases:
mysql -u user -ppassword -h localhost -P 3307 -e "SHOW DATABASES;" - Regenerate Prisma client:
bun run prisma:generate
We welcome contributions to FinanzApp! Your help is essential to improving the project and making it better for everyone.
- Fork the Repository: Click on the fork button at the top right of the repository page.
- Create a Branch: Use
git checkout -b feature/YourFeatureto create a new branch. - Make Changes: Make your changes in your branch.
- Write Tests: Ensure that you write tests for your new functionality.
- Commit Changes: Use clear and descriptive commit messages.
- Submit a Pull Request: Push your changes and submit a pull request to the main repository, detailing the changes you've made.
If you find a bug or have a feature request, please open an issue in the repository.
This project is licensed under the ISC License.