Quick Start | Manual Install | Services & Ports | Troubleshooting
An IoT dashboard built with Laravel 12, Livewire, and Vite for Yotta Aksara Energi. This project provides real-time monitoring and management for air quality, soil tests, and user administration, integrating MQTT for device communication.
Service | Description | Host Port | Container Port | Notes |
---|---|---|---|---|
dashboard | Laravel app (main) | 8002 | 8002 | http://localhost:8002 |
mysql | MySQL database | 4406 | 3306 | DB: yotta_db, user: yotta |
phpmyadmin | DB Admin UI | 8001 | 80 | http://localhost:8001 |
- Real-time device data via MQTT
- Air Quality and Soil Test monitoring
- User Management (Admin & User roles)
- Action Logging
- Livewire-powered interactive UI
- Dockerized for easy deployment
- Vite for modern frontend asset building
- PHP: >= 8.2
- Composer: Latest version
- Node.js: >= 18.x (for frontend build)
- Docker & Docker Compose (optional, for containerized setup)
- PHP Extensions (minimum required):
- openssl
- bcmath
- curl
- json
- mbstring
- mysql
- tokenizer
- xml
- zip
- grpc
The recommended way to run this project is using Docker. This ensures all dependencies and services are set up automatically.
-
Clone the repository:
git clone https://github.com/teguhafrianda/yottaaksara-iot-dahsboard.git cd yottaaksara-iot-dahsboard
-
Environment file:
- By default, the Docker build will copy
.env.example
to.env
if.env
does not exist. You can override or edit.env
as needed before building. - To override environment variables (e.g., ports, DB credentials), edit
.env
or set them indocker-compose.yml
under theenvironment:
section for each service.
- By default, the Docker build will copy
- Port already in use:
- Make sure ports 8002 (app), 8001 (phpMyAdmin), and 4406 (MySQL) are free or change them in
docker-compose.yml
.
- Make sure ports 8002 (app), 8001 (phpMyAdmin), and 4406 (MySQL) are free or change them in
- Database connection errors:
- Ensure the
mysql
service is running and the credentials in.env
match those indocker-compose.yml
.
- Ensure the
- File permission issues:
- You may need to adjust permissions for
storage/
andbootstrap/cache/
:sudo chown -R $USER:$USER storage bootstrap/cache chmod -R 775 storage bootstrap/cache
- You may need to adjust permissions for
- Composer memory errors:
- The Dockerfile uses
COMPOSER_MEMORY_LIMIT=-1
to avoid memory issues. If you see errors, try rebuilding the containers.
- The Dockerfile uses
-
Place your Firebase credentials:
cp firebase_credentials.json storage/app/
-
Start the application:
docker-compose up --build
-
Access the app:
- Visit http://localhost:8002 (or as configured in
docker-compose.yml
). - The app service is named
dashboard
in Docker Compose. - The default
APP_URL
is set to https://dev-yotta.quantummute.com (seedocker-compose.yml
).
- Visit http://localhost:8002 (or as configured in
-
phpMyAdmin (optional):
- Access phpMyAdmin at http://localhost:8001 (user:
yotta
, password:yotta_pass
).
- Access phpMyAdmin at http://localhost:8001 (user:
-
Database credentials (default):
- Host:
mysql
- Port:
3306
(internal),4406
(host docker) - Database:
insert name db
- Username:
insert username
- Password:
insert password
- Host:
-
Run migrations and seed database (in another terminal):
docker-compose exec dashboard php artisan migrate --seed
-
Run tests (optional):
docker-compose exec dashboard php artisan test
If you prefer not to use Docker, follow these steps:
- Install PHP, Composer, Node.js, and required PHP extensions
- Clone the repository:
git clone https://github.com/teguhafrianda/yottaaksara-iot-dahsboard.git cd yottaaksara-iot-dahsboard
- Install PHP dependencies:
composer install
- Install Node.js dependencies & build frontend:
npm install npm run build
- Copy .env and set up environment:
cp .env.example .env php artisan key:generate
- Place your Firebase credentials:
cp firebase_credentials.json storage/app/
- Run migrations and seed database:
php artisan migrate --seed
- Run the app:
php artisan serve
- Run tests (optional):
php artisan test
If running locally (not Docker), optimize performance with:
php artisan optimize
php artisan route:cache
php artisan view:clear
php artisan cache:clear
For development with hot reload (manual install):
npm run dev
Insert your .env here:
MASS_STORAGE_LORAWAN_BASE_URL=
MASS_STORAGE_LORAWAN_ENDPOINT=
MASS_STORAGE_LORAWAN_TOKEN=
MASS_STORAGE_LORAWAN_ACCEPT=