A Symfony-based multi-step registration system for a fictional streaming service called StreamPlus. This application demonstrates a robust implementation of a multi-step form with validation, session management, and database persistence.
-
Multi-Step Registration Process:
- Step 1: User Information & Subscription Selection
- Step 2: Address Information with Country-Specific Validation
- Step 3: Payment Information (for premium subscriptions)
- Step 4: Confirmation and Submission
-
Advanced Form Handling:
- Form validation with custom constraints
- Country-specific address validation
- Credit card validation using Luhn algorithm
- Expiration date validation
-
User Experience Enhancements:
- Progress indicator showing current step
- Client-side validation for immediate feedback
- Form field formatting (credit card numbers, expiration dates)
- Ability to navigate back to previous steps
- Session-based data persistence between steps
-
Security Features:
- CSRF protection on all forms
- Secure handling of sensitive payment information
- Data validation on both client and server sides
- Framework: Symfony 5.x
- Frontend: Bootstrap 5, JavaScript
- Database: Doctrine ORM with MySQL/PostgreSQL
- Form Handling: Symfony Form Component
- Validation: Symfony Validator Component
- PHP 8.0 or higher
- Composer
- MySQL or PostgreSQL
- Symfony CLI (optional but recommended)
- Docker and Docker Compose
-
Clone the repository:
git clone https://github.com/yourusername/streamplus.git cd streamplus -
Install dependencies:
composer install -
Configure your database in
.envfile:DATABASE_URL=mysql://root:[email protected]:3306/streamplus -
Create database and run migrations:
php bin/console doctrine:database:create php bin/console doctrine:migrations:migrate
-
Start the database and phpMyAdmin using Docker:
docker-compose up -dThis will start MySQL and phpMyAdmin containers as defined in the compose.yaml file.
-
After starting the Docker containers, make sure to run the migration to set up your database schema:
php bin/console doctrine:migrations:migrate -
Access phpMyAdmin at:
http://localhost:81/index.phpUse username: root and password: root to log in.
-
Start the Symfony development server:
symfony server:startor
php -S localhost:8000 -t public/ -
Access the application in your browser at
http://localhost:8000/onboarding