Introduction to the Fundraising-Application Project
Overview
The Fundraising-Application project is a user-facing application developed for Wikimedia Deutschland's fundraising initiatives. This project is designed to facilitate easy donation processes, support a variety of payment methods, and manage fundraising campaigns effectively. It incorporates modern development practices involving Docker, PHP, and Symfony to ensure a robust and scalable application.
Installation
Initial Setup
To get started with the Fundraising-Application for development purposes, you need Docker and Docker Compose installed on your system. This setup replaces the need for PHP, Node.js, or MariaDB installations on your machine. After cloning the git repository, you can prepare your environment by running the make setup
command. This script takes care of installing necessary PHP dependencies, downloading frontend assets, and setting up configuration files.
Dependency Management
To manage or update the existing dependencies for the project, you can use the make install-php
command to install dependencies listed in the composer.lock
file.
Running the Application
To launch the application within Docker containers, the command make up-app
is used, and the application becomes accessible at http://localhost:8082/. To halt the application, make down-app
should be executed. It's also possible to run the application without a Makefile using docker compose up
.
Configuration
The application utilizes environment-based configuration management, whereby settings are loaded based on the APP_ENV
variable. Each environment (dev
, test
, prod
, etc.) has a corresponding configuration file to streamline operations for different scenarios. Furthermore, .env files manage sensitive credentials, ensuring a flexible setup when switching between environments.
Testing and Code Quality
The Fundraising-Application emphasizes code quality and reliability. You can run all tests, check code style, and perform static analysis using the make ci
command. Specific tests can be executed with the make test
command, and code style checks corrected using make fix-cs
. PHPStan is utilized for static code analysis to identify potential errors in the codebase.
Email Management
During development, the project employs Mailhog, an email testing tool, to capture outgoing emails. This tool's web interface can be accessed at http://localhost:8025/ to view and examine email interactions.
Database Management
For database operations, the application uses Docker to encapsulate the database environment. The setup involves using MariaDB or SQLite for tests. Database migrations and schema updates can be managed with Doctrine's migration tools.
Frontend Development
Developers working on the frontend can use pre-built assets or link the application to a development server for live asset access. The app's configuration file allows changes to the asset path for smoother integration of frontend changes.
Deployment
The application is equipped with scripts for deploying on a live server. Detailed instructions provide guidance for deployment processes to facilitate a smooth transition to production environments.
Project Structure
The project follows a clean architecture pattern, categorizing code into Bounded Contexts such as Donation, Membership, and Payment contexts. These contexts organize the code in a maintainable and scalable manner. The project directory includes folders dedicated to production, configuration, tests, and a web
directory for web accessible content.
Conclusion
The Fundraising-Application is a well-structured project aimed at enhancing the fundraising capabilities of Wikimedia Deutschland through modern development techniques. Its architecture ensures maintainability and scalability, essential for supporting ongoing fundraising efforts.
For more insights into the architecture and development principles of the application, reference materials on Clean Architecture and its implementation in the project are available.