System Requirements
Required Software
PHP
Version 7.4 or higher (8.x recommended)
Composer
Latest stable version for dependency management
Node.js
Version 14+ with npm included
Database
MySQL 8.0+ or MariaDB 11.4+
Optional Software
- Docker Desktop - For containerized deployment (recommended)
- Git - For version control and cloning the repository
Installation Methods
- Docker Installation
- Local Installation
Docker provides a consistent, isolated environment for Zoo Arcadia.You should see:
Prerequisites
Install Docker Desktop
Download and install Docker Desktop for your operating system:
Setup Process
Configure environment
Run the Docker configuration script:This creates/updates your
.env file with Docker-specific settings:Review Docker Compose configuration
The
docker-compose.yml defines three services:Web Service (PHP + Apache)- Exposes port 8080
- Mounts source directories for development
- Automatically installs dependencies
- Exposes port 3306
- Persistent volume for data storage
- Auto-initializes with SQL scripts from
database/directory
Build and start containers
The
--build flag ensures all dependencies are installed and assets are compiled. This may take a few minutes on first run.Verify containers are running
zoo-arcadia-web- Status: Upzoo-arcadia-db- Status: Up
Docker Container Management
Database Management (Docker)
Updating Code in Docker
When you modifycomposer.json, package.json, or source files:Docker volumes automatically sync changes to PHP files, so you don’t need to rebuild for simple code changes. Only rebuild when dependencies change.
Environment Configuration
Database Configuration
The.env file controls all database connections:
Email Configuration
Configure SMTP for contact form and notifications:For Gmail, you need to create an App Password instead of using your regular password.
Cloudinary Configuration (Optional)
For cloud-based image storage:Database Setup
Database Schema
Zoo Arcadia uses a modular SQL structure:- 01_init.sql - Creates database and sets character encoding
- 02_tables.sql - Defines all tables (users, animals, habitats, services, etc.)
- 03_constraints.sql - Foreign key relationships and constraints
- 04_indexes.sql - Performance optimization indexes
- 05_procedures.sql - Stored procedures for complex operations
- 06_seed_data.sql - Initial data for development/testing
- 07_cleanup.sql - Removes deprecated tables
Manual Database Deployment
If automated scripts don’t work, execute SQL files manually:Seed Data
The06_seed_data.sql file includes:
- Roles: Admin, Veterinary, Employee, Accountant
- Employees: Sample employee records
- Users: Login credentials for each role
- Animals: Sample zoo animals with details
- Habitats: Savanna, Jungle, Marsh environments
- Services: Restaurant, guided tours, train ride
Asset Compilation
Build Commands
Asset Pipeline
The Gulp configuration (gulpfile.js) handles:
CSS Processing:
- Compiles
src/scss/app.scss→public/build/css/app.css - Compiles
src/scss/bo-sidebar-only.scssfor back-office - Copies vendor CSS (Bootstrap, DataTables, Normalize.css)
- Minifies
src/js/app.jswith Terser - Compiles individual filter scripts:
animals-filter.jshabitat-filter.jsrating-testimony.js
- Generates source maps for debugging
- Copies vendor JS (jQuery, Bootstrap, DataTables)
- BrowserSync for live reload
- File watching for automatic recompilation
- Proxy to
http://localhost:3001
Verification Steps
Verify assets compiled
Check that
public/build/ contains:css/app.csscss/bo-sidebar-only.csscss/bootstrap.min.cssjs/app.jsjs/jquery.min.js
Access the application
Docker:
http://localhost:8080Local: http://localhost:3001You should see the Zoo Arcadia homepage.Troubleshooting
SSL Certificate Error (Windows)
Ifcomposer install fails with curl error 60: SSL certificate problem:
Download cacert.pem
Download from curl.se/ca/cacert.pemSave to a permanent location, e.g.,
C:\php\cacert.pemPort Conflicts
Port 8080 (Docker) already in use:Database Connection Issues
Access denied for user
Access denied for user
Verify credentials in If you can’t connect, reset the root password or create a new user.
.env match your MySQL/MariaDB setup:Database does not exist
Database does not exist
Run the database deployment script:
Can't connect to MySQL server
Can't connect to MySQL server
Ensure MySQL/MariaDB service is running:
Asset Compilation Errors
gulp: command not found
gulp: command not found
Install Gulp globally or use npx:
Node Sass binding error
Node Sass binding error
Rebuild node-sass:
Permission denied errors
Permission denied errors
Windows: Run terminal as AdministratormacOS/Linux:
Docker-Specific Issues
Container won't start
Container won't start
Check logs for errors:
Database not initializing
Database not initializing
Ensure SQL files are being mounted:If empty, rebuild:
Changes not reflecting in browser
Changes not reflecting in browser
For PHP changes: Refresh browser (changes are mounted in real-time)For dependencies: Rebuild container:
Project Structure
Next Steps
After successful installation:- Explore the codebase architecture in
App/ - Review the front controller pattern in
public/index.php - Check routing configuration in
App/router.php - Review security implementations (CSRF tokens, input validation)
- Test all user roles (Admin, Veterinary, Employee)
Additional Resources
- Project Documentation:
docs/DOSSIER_PROJET_ZOO_ARCADIA.md - Live Demo: https://zoo-arcadia-production.up.railway.app
- GitHub Repository: https://github.com/dumitrusf/zoo-Arcadia