How ballwictb/finanzapp works
1. Overall shape
- This is a traditional PHP web application with browser-side JavaScript and CSS, not a SPA. The server renders pages such as the landing page and the auth/account flows, while the client adds validation, translation, overlays, and richer UI behavior.
2. Primary request entry points
- The top-level entry is index.php, which likely serves the public landing experience.
- Feature pages live under app/ (about.php, contact.php, cookies.php, privacy.php, terms.php, login.php, register.php, reset.php, resetPassword.php, userConfig.php), each acting as a route/page in the app.
- receive-data.php is the clearest standalone backend endpoint in the tree and likely handles posted form or API-style submissions.
3. Authentication and account management boundary
- Auth-related server pages are grouped in app/auth/:
- logout.php
- deleteAccount.php
- api_response_debug.txt as a debug artifact for backend responses
- The auth flow includes registration, login, password reset, and account deletion, with server-side pages paired with client-side validation scripts in js/.
4. Shared layout and page composition
- Reusable page chrome is split into includes/header.php, includes/footer.php, and includes/mobileMenu.php.
- This suggests a componentized PHP template approach: each page includes the shared header/footer and injects page-specific content into a common shell.
5. Frontend assets and interaction layer
- CSS is organized by concern: css/auth.css, css/landing_page.css, and css/scrollbar.css.
- JavaScript is split by feature:
- form validation: loginValidation.js, registerValidation.js, resetValidation.js, contactValidation.js, validationUtils.js
- page behavior: landing_page.js, overlay.js, loader.js, liteVideo.js
- account/settings behavior: userConfig.js, passwordChange.js
- API and email helpers: api.js, email.js, initEmail.js
- The frontend is therefore responsible for user experience, while the PHP pages own the actual page lifecycle and submission endpoints.
6. Localization and text rendering
- Multi-language support is first-class:
- langs/en.json, langs/es.json, langs/fr.json
- js/trans.js and js/translations.js
- This indicates text content is dynamically swapped in the browser, so the same PHP pages can serve multiple locales without duplicating page structure.
7. External service integrations
- The README identifies reCAPTCHA v3 for bot protection and EmailJS for notification/email workflows.
- The presence of js/email.js and js/initEmail.js supports an outbound-email integration on the client side.
- README also mentions Resend for financial analysis, though the file tree does not expose a dedicated backend integration layer for it; if used, it is likely encapsulated behind receive-data.php or client-side API helpers.
8. Configuration and secrets boundary
- config/config.php is the central configuration entry point and is likely where environment-dependent values, service keys, and application settings are defined.
- The architecture implies a clear split between reusable config and page scripts, which is typical for PHP apps that need to share credentials and constants across multiple pages.
9. Static content and documentation assets
- assets/ contains images and wiki/readme media used by the site and documentation.
- manifest/manifest.json and manifest/manifest_icons/ indicate PWA-style metadata and install icons, so the frontend is designed to be installable or at least mobile-friendly.
- docs/ contains governance and project documentation, while errors/ holds custom error pages for HTTP and token failures.
10. Operational and quality tooling
- GitHub Actions workflows under .github/workflows/ cover code scanning, onboarding automation, labels, and SonarCloud analysis.
- sonar-project.properties confirms SonarCloud integration as part of code-quality checks.
- These tools are repository-level concerns: they do not affect runtime behavior, but they shape CI, security scanning, and maintainability.
11. Typical runtime flow
- A user loads a PHP page.
- The page includes shared header/footer markup and page-specific CSS/JS.
- Browser scripts handle localization and form validation.
- Forms submit to PHP endpoints or dedicated handlers such as receive-data.php and auth scripts.
- The backend returns rendered pages or error pages from errors/ when needed.
12. Important architectural boundaries to show in a diagram
- Browser/UI layer: PHP-rendered pages plus CSS/JS.
- Shared templates: includes/.
- Feature pages: app/ and top-level entry points.
- Auth/account backend: app/auth/ and reset/login/register flows.
- Integration layer: reCAPTCHA / EmailJS / any API calls from js/.
- Configuration: config/config.php.
- Static/documentation assets: assets/, manifest/, docs/, errors/.
Main entry points: header.php Header · index.php Home · contact.php Contact · trans.js Translations
Components 25
Server pages
PHP entry points and request handlers
- Home · Public landing page entry point
index.php - About · Informational app page
app/about.php - Contact · Contact form page
app/contact.php - Login · Sign-in page
app/login.php - Register · Account creation page
app/register.php - Reset · Password reset request page
app/reset.php - Set Password · Password reset completion page
app/resetPassword.php - Settings · User configuration page
app/userConfig.php - Auth actions · Logout and account deletion endpoints
app/auth/logout.php - Receive data · Standalone submission handler
receive-data.php
Frontend layer
Browser-side scripts and styles
- Validation · Shared form validation utilities
js/validationUtils.js - Landing UI · Landing page interactions and overlays
js/landing_page.js - Auth UI · Login, register, reset, and password-change scripts
js/loginValidation.js - Styles · Primary site and auth styles
css/landing_page.css
Shared shell
Reusable templates and common layout
- Header · Shared page chrome and top navigation
includes/header.php - Footer · Shared page chrome and footer
includes/footer.php - Mobile menu · Responsive navigation component
includes/mobileMenu.php
Integrations
External services and app wiring
- Config · Central application configuration
config/config.php - API client · Client-side API/request helper
js/api.js - Email flow · EmailJS and outbound email wiring
js/email.js - Translations · Language switching and text rendering
js/trans.js
Connections 35
- Home → Header: includes · Uses shared site chrome
- Home → Footer: includes · Uses shared site chrome
- Home → Landing UI: loads · Adds landing interactions
- Home → Styles: styles · Applies landing and site styling
- About → Header: includes · Uses shared site chrome
- Contact → Header: includes · Uses shared site chrome
- Login → Header: includes · Uses shared site chrome
- Register → Header: includes · Uses shared site chrome
- Reset → Header: includes · Uses shared site chrome
- Set Password → Header: includes · Uses shared site chrome
- Settings → Header: includes · Uses shared site chrome
- Auth actions → Config: uses · Reads shared configuration
- Contact → Receive data: submits to · Contact form handler
- Login → Auth UI: loads · Login validation behavior
- Register → Auth UI: loads · Registration validation behavior
- Reset → Auth UI: loads · Reset request behavior
- Set Password → Auth UI: loads · Password reset behavior
- Settings → Auth UI: loads · Account settings behavior
- Contact → Validation: uses · Shared form validation
- Contact → Email flow: uses · Email workflow support
- Contact → Translations: uses · Locale-aware UI text
- Login → Translations: uses · Locale-aware UI text
- Register → Translations: uses · Locale-aware UI text
- Reset → Translations: uses · Locale-aware UI text
- Settings → Translations: uses · Locale-aware UI text
- Validation → Locales: reads · Loads localized validation messages
- Translations → Locales: reads · Loads translated strings
- Email flow → API client: calls · Uses request helpers for outbound actions
- API client → Config: uses · Uses shared endpoints or keys
- Home → Manifest: publishes · Exposes PWA metadata
- Home → Media: uses · Displays site media
- About → Media: uses · Displays site media
- Contact → Media: uses · Displays site media
- Login → Media: uses · Displays site media
- Errors → Login: fallback · Error handling can redirect back to auth flows