A web based tool too allow senders to easily compare delivery routes based on cost and time parameters. Front end will be basically let user choose to and from places then calulate the best route showing him time and route also mode of transport and tracking options
- Step 1: Install docker on your deployment location. For help installing, refer to Docker Desktop or Docker Engine
- Step 2:
create a
docker-compose.yamlfile
services:
# Python Service
python:
image: ghcr.io/somerandomdude-a/vat-gate:main
container_name: python-container
ports:
- "8080:80"
depends_on:
db:
condition: service_healthy
environment:
MYSQL_HOST: db
MYSQL_USER: root
MYSQL_PASSWORD: example
MYSQL_DATABASE: VAT_database
restart: unless-stopped
networks:
- backend
# PHP myadmin
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin-container
environment:
PMA_HOST: db
PMA_USER: root
PMA_PASSWORD: example
ports:
- "8081:80"
depends_on:
db:
condition: service_healthy
networks:
- backend
restart: unless-stopped
# MariaDB Service
db:
image: mariadb:latest
container_name: mariadb-container
environment:
MYSQL_ROOT_PASSWORD: example
MYSQL_DATABASE: VAT_database
volumes:
- VAT_database:/var/lib/mysql
restart: unless-stopped
networks:
- backend
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
start_period: 10s
interval: 10s
timeout: 5s
retries: 3
volumes:
VAT_database:
driver: local
networks:
backend:
driver: bridge- Step 3:
Run
docker compose up --build
Note
For development purpose, the docker compose file in ./backend/Docker can be used instead.
It will build from local context as opposed to pulling from the repository packages.
- Step 4:
Open a web browser and navigate to
localhost:8080for the website itself.
Navigate to localhost:8081 to access PHPmyadmin portal
Important
It is recomended to change the credentials used for the repo and to use a seperate netowrk for the PHPmyadmin portal. This can be achieved by giving the portal its own network and using a reverse proxy. Further, if you do not require the database admin portal, you can simply remove it from the docker-compose file.
vatgate-integrated/
backend/ # Flask API and database models
frontend/ # React (Vite) web application
backend_README.md # Original README from VAT‑Gate
The Digital Bretton Woods, Gaurev Ajwani, Aijaz Ahmed Shaikh.pdfThe backend is a Flask application exposing a REST API. It uses SQLAlchemy to talk to a database. By default the application reads MySQL connection details from the following environment variables:
MYSQL_USERMYSQL_PASSWORDMYSQL_DATABASEMYSQL_HOST(optional, defaults todbin Docker)
If these variables are not provided the server build fails
Note
This repo uses python 3.14. It may also work on other builds on python but stability and operation is not guaranteed.
Alternatively you can use the provided Docker Compose file
backend/Docker/docker-compose.yml which spins up MariaDB, phpMyAdmin
and the Python API. When using Docker Compose the API will be exposed
on http://localhost:8080 and the database credentials are already
configured in the compose file.
cd backend/Docker
docker compose up --buildThe frontend is a React application built with Vite and TypeScript.
Authentication and API calls have been wired up to the Flask backend
via a lightweight wrapper located at frontend/src/lib/api.ts. A
sample .env file is provided with the base URL for API requests. By
default it points to http://localhost:8080 which matches the
configuration in the Docker Compose file. If you run the backend on a
different port or host adjust VITE_API_BASE_URL accordingly.
