Skip to main content

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.
This project has been archived and is provided as-is under the CC BY-NC 4.0 license. For the latest information, visit the GitHub repository.

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
  • 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

1

Clone the Repository

Clone the FinanzApp repository to your web server:
Set appropriate permissions:
2

Configure Database

Create a MySQL database and user for FinanzApp:
Replace your_secure_password with a strong, unique password. Store this securely as you’ll need it for configuration.

Database Schema

The application requires a users 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.
3

Configure the Application

Create a database configuration file. While the codebase references config/database.php (from app/auth/deleteAccount.php:19), you’ll need to create this file:

Environment Configuration

The base URL is automatically detected in config/config.php:3-10:
Adjust the localhost path if your installation directory differs.
4

Configure API Keys

Google reCAPTCHA v3

FinanzApp uses reCAPTCHA for security. Register your site at google.com/recaptcha:
  1. Choose reCAPTCHA v3
  2. Add your domain(s)
  3. Get your Site Key and Secret Key
Update the site key in 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:
  1. Go to Google Cloud Console
  2. Create a new project or select existing
  3. Enable Google+ API
  4. Create OAuth 2.0 credentials
  5. Add authorized redirect URIs
Update the client ID in app/register.php:102:

EmailJS Configuration

For email notifications, sign up at emailjs.com:
  1. Create an account
  2. Add an email service (Gmail, Outlook, etc.)
  3. Create an email template
  4. Get your Service ID, Template ID, and Public Key
The EmailJS initialization is in js/initEmail.js (obfuscated). You’ll need to update with your credentials:
And configure the email sending in js/email.js:
5

Configure Web Server

Apache Configuration

Create a virtual host configuration:
Enable required Apache modules:

Nginx Configuration

Alternatively, for Nginx:
Test and reload Nginx:
6

SSL Certificate (Recommended)

Secure your installation with Let’s Encrypt:
Certbot will automatically configure SSL and set up auto-renewal.
Always use HTTPS in production. FinanzApp handles sensitive financial data and requires secure connections.
7

Test the Installation

Verify your installation:
  1. Check PHP Info: Create a temporary file info.php in your web root:
    Visit https://finanzapp.yourdomain.com/info.php and verify PHP version and extensions. Delete this file after verification!
  2. Test Database Connection: Create test-db.php:
    Delete after testing!
  3. Test Registration: Navigate to /app/register.php and create a test account
  4. Test Login: Visit /app/login.php and log in with your test credentials
  5. Verify Session: After login, check that you can access /app/userConfig.php without being redirected

Post-Installation Configuration

Language Configuration

FinanzApp supports three languages out of the box. Language files are located in langs/ directory:
  • es.json - Spanish (default)
  • en.json - English
  • fr.json - French
The language detection system in config/config.php:17-31 automatically:
  1. Checks URL parameter (?lang=en)
  2. Falls back to session value
  3. Defaults to Spanish
You can modify the default language by changing:

Security Hardening

1

Secure PHP Configuration

Edit your php.ini:
2

File Permissions

Set restrictive permissions:
3

Database Security

Secure your MySQL installation:
Restrict database user privileges:

Backup Strategy

Implement regular backups:
Schedule with cron:

Performance Optimization

Enable OPcache

Add to php.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

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 in config/config.php:12-14
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
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.js is loading correctly
  • Test with a different IP address (rate limiting may apply)
Symptoms: Users don’t receive email notificationsSolutions:
  • Verify EmailJS credentials are configured correctly
  • Check browser console for JavaScript errors
  • Ensure js/initEmail.js and js/email.js are loading
  • Test EmailJS service independently
  • Check spam folder for test emails
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
Symptoms: Missing styles, broken images, or JavaScript errorsSolutions:
  • Check BASE_URL configuration in config/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:
Never enable display_errors in production! Always log errors to files instead.

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:
  1. Read the Quickstart Guide to understand user workflows
  2. Set up automated backups
  3. Configure monitoring and alerting
  4. Review security settings
  5. 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.