UNECA's Field Monitoring Dashboard is an operational monitoring tool that visually presents, in real time, key performance indicators (KPIs), coverage metrics, and data quality indicators to enable effective tracking, supervision, and timely decision-making throughout digital census and survey operations.
Before using it, developers are expected to implement their desired indicators and other artifacts based on their own database structure (questionnaires).
This repository is a good starting point for learning how to implement and use the dashboard.
- Git
- Docker
- Visual Studio Code
- Visual Studio Code Extensions
- Chrome browser
-
Clone this repository and
cdinto itgit clone https://github.com/tech-acs/dashboard-training -
Install dependencies (composer and npm packages)
Linux / macOS / WSL:
docker run --rm \
-u "$(id -u):$(id -g)" \
-v "$(pwd):/var/www/html" \
-w /var/www/html \
laravelsail/php83-composer:latest \
composer setupWindows (PowerShell):
docker run --rm `
-v "${PWD}:/var/www/html" `
-w /var/www/html `
laravelsail/php83-composer:latest `
composer setupImportant
If you want to change any of the network ports used by the containers or want to modify default values set in the .env file, now is the time to do it.
Note
From here on, make sure you use the appropriate format of the commands for your enviroment. What's given is for Linux.
- Start the application (Laravel Sail)
./vendor/bin/sail up- Install npm packages and build assets
./vendor/bin/sail npm install && ./vendor/bin/sail npm run build- Migrate the main application database
./vendor/bin/sail artisan migrate- Create an administrator account (management account)
./vendor/bin/sail artisan adminify- Open
http://localhostin your browser and login with the administrator's username and password you created in the previous step.
Sail provides a Docker-based local development environment.
- Start Sail: Run
./vendor/bin/sail up -d(orbash vendor/bin/sail up -don Windows) to start containers in the background. - Stop Sail: Run
./vendor/bin/sail down(orbash vendor/bin/sail downon Windows) to stop and remove the containers.
To run any artisan or npm command, prefix it with Sail's executable:
./vendor/bin/sail artisan <command>
The application includes a database accessible during development. You can manage it using:
- Adminer: Navigate to http://localhost:89 for a web-based database management GUI. Use the database credentials from your
.envfile to log in. - VS Code Database Client: Install the recommended extension and connect to
127.0.0.1using the port and credentials from your.envfile. - External Clients: Use graphical tools like DBeaver, HeidiSQL, or TablePlus to connect using your
.envcredentials.
The application uses Mailpit to intercept and display outgoing system emails (like password resets) locally, preventing them from being sent to real users.
- Access Mailbox: Go to http://localhost:8025 in your browser to view all intercepted emails.
This training repository is built on top of Laravel Sail, a Docker-based local development environment for Laravel. For more information about Laravel Sail, please visit the Laravel Sail documentation.