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.1.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.1-py3-none-any.whl (305.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ctao_qualpipe_webapp-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 d6d53235905c99cdae071755236237fe3bd3410d4bae4f4dfaa4d07aa45b677a
MD5 4877aebb9e3c53c5d195e09bc678c917
BLAKE2b-256 8f75e67264429302b9b6097682e1790dfe3a79f3c7076f6c854e3c61fd94e632

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ctao_qualpipe_webapp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7c6499edf3a11244fb6989b31c77bea73dfef47d1ec79cc470a89cd72e909a6d
MD5 580848fe4ff09e0880c574347fae7dbb
BLAKE2b-256 be96016f9aebfe3d7f07f9162408be36a9f8a976ff8a0a5f60aa8e4766850748

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