A modern PHP & JavaScript Development Environment with multiple deployment options and automated setup scripts. This project includes support for Google Firebase Studio (formerly Project IDX), GitHub Codespaces, and Local System Installation.
php-javascript-development-environment/
├── .devcontainer/ # GitHub Codespaces configuration
│ ├── Containerfile # Docker container definition
│ └── devcontainer.json # VS Code dev container settings
├── .idx/ # Google Firebase Studio configuration
│ └── dev.nix # Nix environment definition
├── local/ # Local system installation
│ └── local-setup.sh # Automated setup script
├── LICENSE # GNU GPL v3 license
└── README.md # Project documentation
Choose your preferred setup method:
- 1. Cloud IDE: Google Firebase Studio (formerly Project IDX)
- 2. Dev Containers: GitHub Codespaces
- 3. Direct Install: Local Setup Script
- Minimum Disk Space: 5GB available space
- Minimum RAM: 4GB (8GB recommended for optimal performance)
- Operating System:
- Debian (Latest)
- Nix (for Firebase Studio)
- Network: Stable internet connection for cloud-based options
The fastest way to get started with a cloud-based development environment.
- Cloud-based: No local installation required
- Pre-configured: PHP, Node.js, Composer, and pnpm ready
- AI Integration: Gemini AI assistant built-in
- Auto-updates: Dependencies updated automatically on workspace start
- Zero maintenance: No system updates or dependency management needed
- A Google account
- Stable internet connection
- Modern web browser
Configured via .idx/dev.nix
:
- Nix Channel: Latest unstable for cutting-edge packages
- PHP: Latest version with Composer
- Node.js: Latest Current version with pnpm
- Additional Tools: cacert, curl, git, zip
- Open Firebase Studio
- Click "Import Repo" → Paste
https://github.com/UnifyKitHQ/php-javascript-development-environment
- Name your workspace → Click "Import"
What happens next: Workspace auto-detects .idx/dev.nix
and sets up the environment automatically. You're ready to code!
Use a containerized environment for development with full isolation.
- Containerized: Isolated development environment
- Pre-configured: PHP, Node.js, Composer, and pnpm ready
- Auto-updates: Dependencies updated automatically on workspace start
- VS Code integration: Built-in extensions and customizations
- A GitHub account
- Stable internet connection
- Modern web browser
Configured via .devcontainer/Containerfile
:
- Base Image: Debian Slim (Latest) with non-root dev user
- PHP: Latest version with comprehensive extensions
- Node.js: Latest Current version with pnpm
- Additional Tools: Playwright with browser dependencies, Composer
- Fork the repo to your GitHub account
- Go to your repo → Click Code → Codespaces → Create codespace on your desired branch
What happens next: Codespaces auto-detects .devcontainer
and sets up the environment automatically. You're ready to code!
For native system installation without virtualization. This comprehensive setup script installs and configures all necessary development tools on your local system.
- Native performance: Direct system access without virtualization overhead
- Full customization: Complete control over your development environment
- Offline capable: Works without internet after initial setup
- System integration: Seamless integration with local tools and services
- Comprehensive tooling: Includes VS Code, Playwright, and all PHP extensions
- Operating System: Debian (Latest)
- Disk Space: Minimum 5GB available space
- RAM: 4GB minimum (8GB recommended)
- Network: Stable internet connection for initial setup
- Permissions: Root access (sudo) required
Configured via local/local-setup.sh
:
- System: Debian (Latest)
- PHP: Latest version with all available extensions
- Node.js: Latest LTS or Current version (user choice) with npm
- Additional Tools: pnpm, Playwright, Composer, VS Code (optional)
git clone https://github.com/UnifyKitHQ/php-javascript-development-environment.git
cd php-javascript-development-environment
sudo bash local/local-setup.sh
Interactive Prompts:
- VS Code installation preference
- Node.js version choice (LTS or Current)
- Git configuration setup
- All prompts can be skipped with default options
Post-Installation:
- Reboot recommended for all changes to take effect
- New terminal session may be needed for pnpm/playwright commands
- Setup logs available at
/var/log/phpjs-dev-environment-setup.log
Feature | Firebase Studio | GitHub Codespaces | Local Setup |
---|---|---|---|
Setup Speed | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐ |
Resource Usage | Cloud-based | Container | Native |
Internet Required | Yes | Yes | No (after setup) |
Customization | Limited | High | Full |
Cost | Free tier | Free tier | Free |
# Sets the path for pnpm-installed binaries
export PNPM_HOME="$HOME/.local/share/pnpm"
export PATH="$PNPM_HOME:$PATH"
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
git config --global credential.helper store
Tool | Description |
---|---|
PHP | Latest stable version for server-side logic |
Composer | PHP dependency manager |
Node.js | Latest Current/LTS version for frontend tooling |
pnpm | Fast, disk space-efficient package manager |
Git | Version control system |
Common Utilities | ca-certificates , curl , gnupg2 , unzip , zip |
VS Code | (Optional) Can be installed by setup scripts |
After setup, create a simple test to verify everything works:
# Test PHP
php -r "echo 'PHP is working!';"
# Test Node.js
node -e "console.log('Node.js is working!');"
# Test Composer
composer --version
# Test pnpm
pnpm --version
- Solution: Free up space or use cloud/container options
- Check:
df -h
to verify available space
- Solution: Use
sudo
if needed for local setup - Alternative: Use cloud-based options
- Solution: Ensure Docker is running and user is in
docker
group - Check:
docker --version
andgroups $USER
- Firebase Studio: Check browser compatibility and firewall settings
- Codespaces: Verify GitHub access and internet connection
- Local Setup: Ensure stable internet for initial downloads
- Check versions:
php --version
andnode --version
- Update if needed: Follow setup instructions for your chosen method
- Review setup logs for specific error messages
- Try alternate setup method if one fails
- Check existing GitHub issues or create a new one
- Include system details when reporting issues:
- Error messages
- OS version
- Setup method used
- Fork the repo
- Create a feature branch:
git checkout -b feature/amazing-feature
- Test all setup methods thoroughly
- Commit your changes:
git commit -m 'Add amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Submit a pull request
- Test changes across all three setup methods
- Update documentation for any new features
- Follow existing code style and formatting
- Add appropriate error handling
Licensed under GNU GPL v3. See LICENSE.
- Google Firebase Studio for cloud development environment
- Docker for containerization technology
- VS Code for excellent development experience
- Open source community for tools and libraries
- GitHub Issues: Check existing issues or create a new one
- Documentation: Review this README and project wiki
- Community: Join discussions in GitHub Discussions
- Email: For private support, contact maintainers directly
Happy Coding! 🎉
Built with ❤️ for the PHP and JavaScript development community