A modern investment platform demo built with Laravel 11, showcasing two distinct frontends:
- 💼 Guest Interface: React + Inertia.js + TailwindCSS
- 🧭 User/Admin Dashboard: Laravel Livewire + Alpine.js
Fully containerized with Docker for production-grade reliability, complete with automatic migrations, caching, and optimized builds.
🧠 Designed to demonstrate a professional, multi-stack Laravel architecture ready for portfolio or real-world deployment.
✅ Laravel 11 + PHP 8.3 (FPM)
✅ React + Inertia.js (guest interface)
✅ Livewire 3 + Alpine.js (admin & user dashboards)
✅ TailwindCSS + Vite asset pipeline
✅ MySQL 8 database container
✅ Nginx web server optimized for Laravel
✅ adminer database GUI container for viewing application's stored data
✅ One-command build via Docker Compose
git clone https://github.com/Chukwusombiri/Investron.git cd investron
cp .env.example .env
composer install
php artisan key:generate && php artisan migrate --force
npm install && npm run dev
# open separate terminal in the same directory and start php server
php artisan serve
1️⃣ Frontend Stage (Node 18) → React/Vite/Tailwind build 2️⃣ Backend Stage (PHP 8.3 FPM) → Laravel application 3️⃣ Webserver Stage (Nginx) → Serves the application
text
┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ Nginx │ │ Laravel │ │ MySQL │ │ Adminer │ │ (Webserver)│◄──►│ (PHP-FPM) │◄──►│ (Database) │◄──►│ (DB GUI) │ │ :5000 │ │ :9000 │ │ :3307 │ │ :8080 │ └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘
text
- Docker & Docker Compose
- git
# Copy environment file
cp .env.example .env.dockerThe application will automatically generate Laravel key on first build
# Build and start all services in detached mode
docker compose up -d --build
docker compose exec app php artisan migrate
| Service | URL | Purpose |
|---|---|---|
| Main Application | http://localhost:5000 | Laravel application |
| Database Admin | http://localhost:8080 | Adminer (DB management) |
Docker Management
# Start services
docker compose up -d
# Stop services
docker compose down
# Stop and remove volumes (fresh start)
docker compose down -v
# View logs
docker compose logs -f
# Rebuild specific service
docker compose build app# Access app container
docker exec -it investron-app bash
# Run migrations
docker exec -it investron-app php artisan migrate
# Generate Laravel key
docker exec -it investron-app php artisan key:generate
# Install composer dependencies
docker exec -it investron-app composer install
# Run tests
docker exec -it investron-app php artisan test-
Connection Details
Property Value Host db (container name) or 127.0.0.1 Port 3307 (external) / 3306 (internal) Database investron_db Username investron_user Password secret_password Root Password root -
Accessing MySQL
# Direct access via MySQL client mysql -h 127.0.0.1 -P 3307 -u investron_user -p investron_db # Viewing Database Content After logging into MySQL SHOW TABLES; SELECT * FROM users LIMIT 10;
Or use Adminer web interface at http://localhost:8080
Services Breakdown
| Service | Container Name | Ports | Description |
| ---------------- | ---------------------- | ------------------------ | ---------------------------- |
| app | investron-app | 9000 | Laravel PHP-FPM application |
| nginx | investron-web | 5000:80 | Nginx web server |
| db | investron-db | 3307:3306 | MySQL 8.0 database |
| adminer | investron-adminer | 8080:8080 | Database management GUI |
Hot-reload: File changes are synchronized automatically
Persistent data: MySQL data persists in Docker volume
Optimized builds: Multi-stage Dockerfile for production readiness
text investron/ ├── docker/ │ └── nginx/ │ └── default.conf # Nginx configuration ├── resources/ │ ├── js/ # React/Inertia components │ ├── views/ # Blade templates │ └── css/ # Tailwind styles ├── public/ │ └── build/ # Compiled assets (from Docker build) ├── Dockerfile # Multi-stage build configuration ├── compose.yaml # Docker Compose services ├── .env.docker # Docker environment variables ├── vite.config.js # Vite configuration └── tailwind.config.js # TailwindCSS configuration
-
app: Laravel backend with PHP 8.3, auto-reload on file changes
-
nginx: Optimized Laravel server configuration
-
db: MySQL 8.0 with persistent volume
-
adminer: Web-based database management
-
Optimized for Laravel applications
-
PHP-FPM integration with app container
-
Security headers enabled
-
Proper error handling and logging
Default passwords should be changed in production
.env.docker contains development credentials
Security headers are configured in Nginx
X-Powered-By header is hidden
CSRF protection enabled via Laravel
-
Code changes are automatically synced to the container
-
Composer dependencies trigger rebuild on composer.json changes
-
Frontend assets can be rebuilt inside container or locally
# Create new migration
docker exec -it investron-app php artisan make:migration create_users_table
# Run migrations
docker exec -it investron-app php artisan migrate
# Rollback migrations
docker exec -it investron-app php artisan migrate:rollbackCommon Issues
-
Port already in use Change ports in compose.yaml if 5000, 3307, or 8080 are occupied
-
Docker build fails
# Clear Docker cache
docker compose build --no-cache- Database connection issues
# Check if MySQL container is running
docker ps | grep investron-db
# View database logs
docker logs investron-db- Permission issues
# Fix Laravel storage permissions
docker exec -it investron-app chown -R www-data:www-data storage bootstrap/cache-
Fork the repository
-
Create a feature branch: git checkout -b feature/amazing-feature
-
Commit changes: git commit -m 'Add amazing feature'
-
Push to branch: git push origin feature/amazing-feature
-
Open a Pull Request
-
Follow Laravel coding standards
-
Include tests for new features
-
Update documentation accordingly
-
Ensure Docker setup remains functional
This project is open-sourced under the MIT License.
Laravel Community - For the excellent framework
Docker Team - Containerization platform
CORIENT - Platform adaptation for educational purposes
Disclaimer: This project is for educational and portfolio purposes only.
Bounty Tech - https://github.com/Chukwusombiri
"Code as if the next person to maintain it is a future version of you."