Track & Trace
This is an open source MIT licensed website to allow for easy track and trace for a business with a single or multiple locations. It allows for a configured data retention period, default is at 21 days. After this time period, records will be automatically purged at the end of the day.
Roadmap
- Data export for when you need to contact people (CSV/Excel/JSON)
- Add unit tests
- Investigate an install wizard for non cli installed
Requirements
- Laravel 8 requirements
- PHP 7.4 and up
- NodeJS v12.19 - previous versions may work but not tested
- Maria/MySql database, other datebases may work but not tested
- Superviors if running on a *nix box to allow for the scheduled task.
Installation
- Clone/Download this repository to where you want to install it.
- Duplicated the
.env.example
file and add the database connection details and make sureAPP_URL
is set to the correct domain- If you want a custom visitor retention period, set
VISITOR_RETENTION_PERIOD
to the number of days that's required in your country/county.
- If you want a custom visitor retention period, set
composer install
andnpm install
thennpm run production
- Run the database migrations
php artisan migrate
- Generate an application key
php artisan key:generate
- Link the storage folder
php artisan storage:link
- Add a user via the command
php artisan user:create
You will be prompted for fields - Add the following supervisor script to your system if you're on a *nix machine, see normal Laravel instructions
[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /path/to/app/artisan queue:work sqs --sleep=3 --tries=3 --max-time=3600
autostart=true
autorestart=true
user=forge
numprocs=8
redirect_stderr=true
stdout_logfile=/home/forge/app.com/worker.log
stopwaitsecs=3600
- If you can't use supervisor, then please set this in the env file to false
APP_SUPERVISOR_IN_USE=false
. This will trigger the command once per day at the start of the day. Uses the cache system to determine when to run, and sets thettl
to the end of the day. - Once you have an account, you can get to the dashboard by going to
/dashboard
or/login
Commands
php artisan user:create
- Creates a user accountphp artisan venue:generate-qr
- Generates QR codes for Venuesphp artisan visitors:remove-old
- Removes all users outside of the retention period