Development Setup Instructions
Running Without Docker for Development
You can run the application without Docker containers for easier development by running the frontend and backend services directly on your host machine.
Prerequisites
- Node.js 18+ and npm
- PHP 8.1+ with required extensions
- MySQL/MariaDB database
- Redis (optional, for caching)
Backend Setup
Install PHP Dependencies:
cd backend
composer install
Configure Environment:
cp .env.example .env
# Edit .env with your database credentials
Start Backend Server:
cd backend
php -S localhost:8080
Frontend Setup
Install Dependencies:
cd frontend
npm install
Configure Environment:
cp .env.example .env.local
# Edit .env.local with your API URL
Start Development Server:
cd frontend
npm run dev
Access the Application
Benefits of Development Setup
- Hot Reload: Frontend automatically reloads on code changes
- Fast Debugging: No container overhead, direct file access
- Easy Logging: Direct access to logs and error messages
- Database Access: Direct connection to local database for debugging
- No Docker Issues: Avoid container networking and volume mounting problems
Switching Between Development and Production
To switch back to Docker setup:
# Stop development servers
# Kill PHP server (Ctrl+C)
# Kill npm dev server (Ctrl+C)
# Start Docker containers
docker-compose -f docker-compose.unified.yml up -d
Troubleshooting
If you encounter issues:
- Port Conflicts: Make sure ports 8080 (backend) and 5173 (frontend) are available
- Database Connection: Verify MySQL is running and credentials in .env are correct
- PHP Extensions: Ensure all required PHP extensions are installed
- Node Version: Make sure you're using Node.js 18+