Overview
This guide will help you deploy FinanzApp on your own infrastructure. FinanzApp is a PHP-based financial management platform that requires a web server, PHP runtime, and MySQL database.System Requirements
Server Requirements
- Web Server: Apache 2.4+ or Nginx 1.18+
- PHP: 7.4 or higher (8.0+ recommended)
- Database: MySQL 5.7+ or MariaDB 10.3+
- Memory: Minimum 512MB RAM (1GB+ recommended)
- Storage: At least 500MB free disk space
Required PHP Extensions
- php-mysqli
- php-json
- php-session
- php-mbstring
- php-curl
Optional but Recommended
- SSL certificate (Let’s Encrypt recommended)
- PHP OPcache for better performance
- Redis or Memcached for session storage
FinanzApp uses server-side sessions for authentication. Ensure your PHP installation has session support enabled.
Installation Methods
- Manual Installation
- Docker Installation
Configure Database
Create a MySQL database and user for FinanzApp:
Database Schema
The application requires ausers table at minimum. Based on the authentication flow in app/auth/deleteAccount.php:21-24, create the users table:The schema above is inferred from the application code. You may need additional tables for goals, investments, and transactions based on your feature requirements.
Configure the Application
Create a database configuration file. While the codebase references Adjust the localhost path if your installation directory differs.
config/database.php (from app/auth/deleteAccount.php:19), you’ll need to create this file:Environment Configuration
The base URL is automatically detected inconfig/config.php:3-10:Configure API Keys
Google reCAPTCHA v3
FinanzApp uses reCAPTCHA for security. Register your site at google.com/recaptcha:- Choose reCAPTCHA v3
- Add your domain(s)
- Get your Site Key and Secret Key
app/login.php:134:The current key
6LdpGAErAAAAABtf_pOcsJbRBnytt5t8_WahFXAY is for the original FinanzApp deployment. You must obtain your own keys for your domain.Google OAuth (Optional)
For Google Sign-In functionality, configure OAuth 2.0:- Go to Google Cloud Console
- Create a new project or select existing
- Enable Google+ API
- Create OAuth 2.0 credentials
- Add authorized redirect URIs
app/register.php:102:EmailJS Configuration
For email notifications, sign up at emailjs.com:- Create an account
- Add an email service (Gmail, Outlook, etc.)
- Create an email template
- Get your Service ID, Template ID, and Public Key
js/initEmail.js (obfuscated). You’ll need to update with your credentials:js/email.js:SSL Certificate (Recommended)
Secure your installation with Let’s Encrypt:Certbot will automatically configure SSL and set up auto-renewal.
Test the Installation
Verify your installation:
-
Check PHP Info:
Create a temporary file
info.phpin your web root:Visithttps://finanzapp.yourdomain.com/info.phpand verify PHP version and extensions. Delete this file after verification! -
Test Database Connection:
Create
test-db.php:Delete after testing! -
Test Registration:
Navigate to
/app/register.phpand create a test account -
Test Login:
Visit
/app/login.phpand log in with your test credentials -
Verify Session:
After login, check that you can access
/app/userConfig.phpwithout being redirected
Post-Installation Configuration
Language Configuration
FinanzApp supports three languages out of the box. Language files are located inlangs/ directory:
es.json- Spanish (default)en.json- Englishfr.json- French
config/config.php:17-31 automatically:
- Checks URL parameter (
?lang=en) - Falls back to session value
- Defaults to Spanish
Security Hardening
Backup Strategy
Implement regular backups:Performance Optimization
Enable OPcache
Add tophp.ini:
Database Indexing
Optimize frequently queried columns:CDN for Static Assets
FinanzApp uses CDN resources for libraries. Ensure they’re accessible:Monitoring and Maintenance
Log Monitoring
Regularly check logs:Health Checks
Create a health check endpoint:Troubleshooting
Common Issues
Session errors or login not working
Session errors or login not working
Symptoms: Users can’t log in or sessions expire immediatelySolutions:
- Verify PHP session directory is writable:
ls -la /var/lib/php/sessions - Check session configuration in
php.ini - Ensure session cookies are being set (check browser dev tools)
- Verify
session_start()is called inconfig/config.php:12-14
Database connection failed
Database connection failed
Symptoms: “Database connection failed” error messageSolutions:
- Verify MySQL is running:
systemctl status mysql - Check credentials in
config/database.php - Test connection with MySQL client:
mysql -u finanzapp_user -p finanzapp - Check MySQL error logs:
tail -f /var/log/mysql/error.log - Verify the user has correct permissions
reCAPTCHA validation fails
reCAPTCHA validation fails
Symptoms: Registration or login fails with reCAPTCHA errorsSolutions:
- Ensure you’re using your own reCAPTCHA keys, not the demo keys
- Verify domain is registered in Google reCAPTCHA console
- Check that
js/api.jsis loading correctly - Test with a different IP address (rate limiting may apply)
Email notifications not sending
Email notifications not sending
Symptoms: Users don’t receive email notificationsSolutions:
- Verify EmailJS credentials are configured correctly
- Check browser console for JavaScript errors
- Ensure
js/initEmail.jsandjs/email.jsare loading - Test EmailJS service independently
- Check spam folder for test emails
Google Sign-In not working
Google Sign-In not working
Symptoms: OAuth authentication failsSolutions:
- Verify Google OAuth client ID is correct
- Check authorized redirect URIs in Google Cloud Console
- Ensure callback file exists:
app/auth/google-callback.php - Check that Google Sign-In library is loading from CDN
Static assets not loading
Static assets not loading
Symptoms: Missing styles, broken images, or JavaScript errorsSolutions:
- Check
BASE_URLconfiguration inconfig/config.php - Verify file permissions allow web server to read assets
- Check browser console for 404 errors
- Ensure CDN resources are accessible (not blocked by firewall)
Debug Mode
For development, enable detailed error reporting:Upgrading
To upgrade to a newer version:Support and Resources
GitHub Repository
Source code, issues, and pull requests
Live Demo
Try FinanzApp before installing
Security Policy
Report security vulnerabilities
Contributing
Contribution guidelines
Next Steps
After installation:- Read the Quickstart Guide to understand user workflows
- Set up automated backups
- Configure monitoring and alerting
- Review security settings
- Test all features thoroughly
This project was developed as a Final Year Project at IES La Arboleda. It is licensed under CC BY-NC 4.0 and provided as-is without warranty.
