Astelium is a unified Task & Project Management and CRM system built as a monorepo with a Laravel backend and a React/Vite frontend using TailwindCSS. The project is containerized with Docker and Docker Compose.
- Backend: Laravel with Fortify (for authentication/MFA), and MySQL.
- Frontend: React with TypeScript, Vite, and TailwindCSS.
- Containerization: Docker and Docker Compose for development and deployment.
monorepo/
├── backend/ # Laravel application
├── frontend/ # React SPA with Vite and TailwindCSS
├── docker/ # Docker configuration files (Dockerfile.backend, Dockerfile.frontend)
├── docker-compose.yml # Docker Compose configuration file
├── docs/ # Additional documentation
└── README.md # Project overview and instructions
- Docker Desktop (WSL2 integration recommended on Windows)
- Git
- Composer
- Node.js & npm
git clone https://github.com/yourusername/your-repo.git
cd your-repoCopy the provided .env.example file in the backend/ folder to create your local .env file:
cp backend/.env.example backend/.envEnsure the database credentials match those defined in docker-compose.yml:
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=laravel_db
DB_USERNAME=laravel_user
DB_PASSWORD=laravel_passIn the frontend/ folder, create a .env file if needed. For example:
VITE_DEV_SERVER_URL=http://localhost:5173/If you're using Docker Compose, run:
docker-compose run --rm app composer installOtherwise, run:
composer installIf using Docker Compose, run:
docker-compose run --rm app npm installOr locally (from the frontend/ folder):
npm installFor development:
npm run devFor production:
npm run buildStart the application and its services with:
docker-compose up -dThis will start your Laravel application, MySQL, and any other services defined in docker-compose.yml.
Ensure your MySQL database is running and your .env file is configured correctly, then start the Laravel development server (from the backend/ folder):
php artisan serveSet up the database schema by running:
php artisan migrateIf using Docker Compose:
docker-compose run --rm app php artisan migrateSeed the database with default data, including a default admin user:
php artisan db:seedOr with Docker Compose:
docker-compose run --rm app php artisan db:seedThe seeder creates a default admin user with the following credentials:
- Email: admin@example.com
- Password: securepassword
Adjust these values in database/seeders/AdminUserSeeder.php if needed.
- Docker Networking: Ensure that
DB_HOSTin your.envis set to the correct service name (e.g.,mysql) so that Laravel can connect to the MySQL container. - Clearing Configuration Cache: If you make changes to your
.envfile, clear Laravel's configuration cache:
php artisan config:clear- Frontend Development: If you experience issues with the frontend, verify that the Vite development server is running.
-
Database Connection Issues:
Double-check your.envsettings. TheDB_HOSTshould be the name of the MySQL service (e.g.,mysql) when using Docker Compose. -
Cache Problems:
Clear caches using the following commands:
php artisan config:clear
php artisan cache:clear
php artisan route:clearThis project is licensed under the MIT License.
