Skip to main content

CTAO DPPS QualPipe Web Application

Project description

QualPipe-Webapp

The QualPipe-webapp project uses FastAPI as backend and frontend, plus D3.js for dynamic frontend visualizations, separated into clean services using Docker Compose.


๐Ÿ“‚ Project Structure

/qualpipe-webapp
โ”‚
โ”œโ”€โ”€ docker-compose.dev.yml           # Docker compose for developer
โ”œโ”€โ”€ docker-compose.yml               # Docker compose for user
โ”œโ”€โ”€ Makefile                         # Makefile to build Backend and Frontend
โ”‚
โ”œโ”€โ”€ docs/                            # Document folder
โ”‚
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ qualpipe_webapp/             # FastAPI backend
โ”‚       โ”œโ”€โ”€ backend/                 # FastAPI backend
โ”‚       โ”‚   โ”œโ”€โ”€ main.py              # Main FastAPI app
โ”‚       โ”‚   โ”œโ”€โ”€ data/                # JSON data sources
โ”‚       โ”‚   โ”œโ”€โ”€ requirements.txt     # Backend dependencies
โ”‚       โ”‚   โ”œโ”€โ”€ requirements-dev.txt # Backend dependencies for developer
โ”‚       โ”‚   โ””โ”€โ”€ Dockerfile           # Backend container
โ”‚       โ”‚
โ”‚       โ”œโ”€โ”€ frontend/                # FastAPI frontend
โ”‚       โ”‚   โ”œโ”€โ”€ /templates/          # Template pages
โ”‚       โ”‚   โ”œโ”€โ”€ /static/             # Static files (css, js, lib)
โ”‚       โ”‚   โ”œโ”€โ”€ main.py              # Main FastAPI app
โ”‚       โ”‚   โ”œโ”€โ”€ requirements.txt     # Frontend dependencies
โ”‚       โ”‚   โ”œโ”€โ”€ requirements-dev.txt # Frontend dependencies for developer
โ”‚       โ”‚   โ””โ”€โ”€ Dockerfile           # Frontend container
โ”‚       โ”‚
โ”‚       โ”œโ”€โ”€ nginx/
โ”‚       โ”‚   โ”œโ”€โ”€ nginx.conf
โ”‚       โ”‚   โ””โ”€โ”€ ssl/                 # (optional later)
โ”‚
โ””โ”€โ”€ .gitignore

Instructions

To run it in the background, from the project folder qualpipe-webapp simply execute:

make up

Then open your browser:

To stop everything, execute:

make down

If you also want to automatically see the logs you can then run it via docker compose

To run it the first time execute: (later on you can remove the --build)

docker-compose up --build

To stop it you can soft-kill with CTRL-C and shut down all the services executing make down.

If instead you do any modification to the config while the containers are running or in case Docker caches wrong stuff, you can restart it running:

make restart

or

docker-compose down -v --remove-orphans
docker-compose up --build

Makefile

Description of all the Makefile functionalities:

Command What it does
make build Build the Docker images
make up Build and start services (backend + frontend) in background
make down Stop all services
make logs View combined logs (both frontend and backend)
make logs-backend View only backend logs
make logs-frontend View only frontend logs
make restart Restart the containers
make prune Clean up unused Docker containers/images
------------------ -----------------------------------------------------------
make build-dev Build the Docker images
make up-dev Build and start services (backend + frontend) in background

Developers

For developers, you can build containers that automatically file changes, avoiding the need to restart the containers every time. To do so, simply execute:

make build-dev
make up-dev

This will automatically output also every log produced.

Contributing

If you want to contribute in developing the code, be aware that we are using pre-commit, code-spell and ruff tools for automatic adherence to the code style. To enforce running these tools whenever you make a commit, setup the pre-commit hook executing:

pre-commit install

The pre-commit hook will then execute the tools with the same settings as when a merge request is checked on GitLab, and if any problems are reported the commit will be rejected. You then have to fix the reported issues before tying to commit again.

License

This project is licensed under the BSD 3-Clause License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ctao_qualpipe_webapp-0.1.0.tar.gz (302.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ctao_qualpipe_webapp-0.1.0-py3-none-any.whl (305.5 kB view details)

Uploaded Python 3

File details

Details for the file ctao_qualpipe_webapp-0.1.0.tar.gz.

File metadata

  • Download URL: ctao_qualpipe_webapp-0.1.0.tar.gz
  • Upload date:
  • Size: 302.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for ctao_qualpipe_webapp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c6fb9f621dc1b9dc8401673bc78d841a7da2786e561798c748bcc4fe9f04765f
MD5 fbdd5ca228c8a1b687623a3492cbdd81
BLAKE2b-256 852b2ae0dc812fbc9b314d03f6a1e9e28455d5c538507901bdc1870341e5e268

See more details on using hashes here.

File details

Details for the file ctao_qualpipe_webapp-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ctao_qualpipe_webapp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 184c59fc3746409e613dc8982e49073d4d48f0dee050df47baf244cc1b3c3944
MD5 26a16592e8b32cd0e4ec01e2bc5e0991
BLAKE2b-256 eb8f8cd691ac5cc12a2bcfdeccb9243c460c7276d5dcf9b386ae26479c43ecf8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page