Brif is a boilerplate tool based on Docker and FastAPI, designed to streamline the development and deployment of IIIF compliant platforms.

Overview

brif


A boilerplate tool based on Docker, designed to streamline the development and deployment of IIIF compliant platforms.

Embedded with FastAPI, Celery + Rabbit-MQ + Flower, Postgres + PGAdmin, Cantaloupe, Nginx, Bulma.

IIIF features:

  • Cantaloupe image server <=> Image API 2.1
  • FastAPI implementation <=> Presentation API 2.1
  • Automated manifest creation from CSV files
  • IIIF manifests creation based on Prezi
  • Tify viewer directly embedded with each manifest

Content

The tiny dataset and 6 related images used in the demo are released as copyright-free materials, and come from the Finnish National Gallery Open Data platform.

Installation

Backend

You should use the main branch, other branches being used for development purpose.

Fetch all the Git LFS resources: git lfs fetch --all && git lfs pull

You might have to tweak the volumes of the brif_nginx service to import your own certificate provider directory.

You have to create the required nginx configuration files:

  • certificate.json
  • app_docker.conf
  • monitor_docker.conf

Same goes with servers.json if you use the pgadmin container.

Then you're left with creating the .env environment file.

NB: For all these required files, you'll find xxxxxx.example sample files ready to adapt.


Cantaloupe

Mount your images as volumes in the cantaloupe service and set FilesystemSource.BasicLookupStrategy.path_prefix in cantaloupe.properties accordingly to get things going. From there, you can easily set your logs, enable/disable different API version number (i.e. from to 3) as it follows the very official documentation.


Frontend

You can add your own head_meta.html , or discard it from base.html while implementing up the {title} tag again.


Data

You just need to copy your datasets in data/input, and the dashboard should automatically pick them up.

Or change accordingly in docker's x-brif-common

Each directory can contain multiple datasets, and they will be treated separately. Each directory can have only 1 specific mapping.

Each directory can contain one mapping.json file to implement a specific mapping for the data pipeline. If not present, a default mapping will be applied.


Run

Only the core containers

docker-compose docker-compose.core.yml up

+ monitoring containers

docker-compose -f docker-compose.core.yml -f docker-compose.monitoring.yml up

+ with Brif app (including test container)

docker-compose -f docker-compose.core.yml -f docker-compose.monitoring.yml -f docker-compose.brif.yml up

+ with Nginx containers (tagged with 'prod_live' profile)

docker-compose -f docker-compose.core.yml -f docker-compose.monitoring.yml -f docker-compose.brif.yml --profile live_prod up

Docker is great but sometimes tricky ... when changes are made, don't forget to:

  • Use the --build flag.
  • Cleanse the database properly by using the prune and rm tools to purge volumes and containers.

Manual

Instructions

This tool is not meant to search within the collection, only to transform the raw data into valid IIIF manifests.

To browse further the collection you will probably need to import the transformed data into a search engine such as Elasticsearch or Solr.

Each transformed dataset comes with a new collection dataset which gathers all the transformed IIIF manifests URLs, thus making it easy to import the related data within your system.


Docs & Monitoring

You can find the Swagger UI for the whole tool at the /docs url. Some endpoints are voluntarily not presented there, look for include_in_schema=False for the exclusions if necessary.

The tool comes with optional monitoring services (Flower and PGAdmin) to monitor further your Postgres database and the tasks going through the pipeline.


Dashboard UI

At startup, a dashboard is directly accessible at the url /dashboard

  • The dashboards is a basic UI to manage your datasets and check the transformed collections.
  • It shows some stats, along with sample links.

The workflow is relatively simple:

  • The whole dataset is itemised.
  • A dedicated IIIF Image API is spinned up based on the provided images.
  • Each new item/record is transformed into a IIIF manifest.
  • A new collection dataset is created which gathers all the IIIF manifests urls.

Once processed, all manifests can be accessed with their base URI followed by /manifest.json to access the data or either /view for the Tify viewer.


Development

If you want to make some changes in this repo while following the same environment tooling.

poetry config virtualenvs.in-project true
poetry install && poetry shell
pre-commit install
You might also like...
A Boilerplate repo for Scientific Python Open Science projects

A Boilerplate repo for Scientific Python Open Science projects Installation Clone this repo If you need a fresh python environment, run $ conda env cr

King is a simple boilerplate from a bigger Discord Bot project created for my Discord Server.
King is a simple boilerplate from a bigger Discord Bot project created for my Discord Server.

King A simple Discord bot boilerplate. King is a simple boilerplate from a bigger Discord Bot project created for my Discord Server. I intend to showc

A project to get you started with Docker and Django.

Docker Django tl;dr $ git clone [email protected]:erroneousboat/docker-django.git $ docker-compose up Now you can access the application at https://local

Basic Docker Compose template application with Flask, Celery, Redis, MySQL, SocketIO, Nginx and Gunicorn.

Nginx / Gunicorn / Flask 🐍 / Celery / SocketIO / MySQL / Redis / Docker 🐳 sample application Basic Docker Compose template application for orchestat

simple flask starter app utilizing docker

Simple flask starter app utilizing docker to showcase seasonal anime using jikanpy (myanimelist unofficial api).

A test Django application with production-level docker setup

DockerApp A test Django application with production-level docker setup. Blog: https://medium.com/@siddharth.sahu/the-near-perfect-dockerfile-for-djang

Um template para quem quiser usar o Docker + PGSQL + Django.
Um template para quem quiser usar o Docker + PGSQL + Django.

Um template para quem quiser usar o Docker + PGSQL + Django.

Combine the power of FastAPI and Django to build a production-ready application capable of utilizing all of the best features of both worlds.
Combine the power of FastAPI and Django to build a production-ready application capable of utilizing all of the best features of both worlds.

FastAPI and Django Combo This projects aims to combine FastAPI and Django to build a Production ready application capable of utilizing all of the feat

A template for some new Python tool or package with a reasonable basic setup.

python-app-template A template with a reasonable basic setup, including: black (formatting) flake8 (linting) mypy (type checking) isort (import sortin

Releases(v0.2.0)
Template to quickly start your playwright-python project

Playwright-python template 🍪 Template to quickly start your playwright-python project Getting started • Demo • Configuration Getting started Clone th

Constantin 1 Dec 13, 2021
NHS Theme for Streamlit applications

NHS Streamlit App Template Deployment (local) The tool has been built using Stre

nhs.pycom 3 Nov 07, 2022
Setup a flask project using a single command, right from creating virtual environment to creating Procfile for deployment.

AutoFlask-Setup About AutoFlask-Setup can help you set up a new Flask Project, right from creating virtual environment to creating Procfile for deploy

Ashutosh Krishna 1 Oct 21, 2021
Django starter project with 🔋

A batteries-included Django starter project. For a production-ready version see the book Django for Professionals. 🚀 Features Django 3.1 & Python 3.8

William Vincent 1.5k Jan 08, 2023
A project to get you started with Docker and Django.

Docker Django tl;dr $ git clone [email protected]:erroneousboat/docker-django.git $ d

JP Bruins Slot 176 Dec 29, 2022
Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly.

Cookiecutter Django Powered by Cookiecutter, Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly. Documentati

Daniel Roy Greenfeld 10k Jan 01, 2023
Creating Templates and components so those can be reusable some time and makes workflow a lot easier!

TEMPLATES AND COMPONENTS IN ANY LANG! This is an Open Repository For Students to Contribute code in Hackoctoberfest in different Languages and Tech me

SriSravyaN 9 Feb 19, 2022
simple flask starter app utilizing docker

Simple flask starter app utilizing docker to showcase seasonal anime using jikanpy (myanimelist unofficial api).

Kennedy Ngugi Mwaura 5 Dec 15, 2021
Get a Django app up and running in dev, test, and production with best practices in 10 minutes

Django template for Docker + Heroku This is how I set up Django projects to get up and running as quick as possible. In includes a few neat things: De

Ben Firshman 30 Oct 13, 2022
A low dependency and really simple to start project template for Python Projects.

Python Project Template A low dependency and really simple to start project template for Python Projects. HOW TO USE THIS TEMPLATE DO NOT FORK this is

Yurii Dubinka 5 Jan 21, 2022
Um template para quem quiser usar o Docker + PGSQL + Django.

Um template para quem quiser usar o Docker + PGSQL + Django.

Drack 2 Mar 11, 2022
Open-source full-stack seed project that uses a React UI powered by a simple Flask API Server

React Flask Authentication Open-source full-stack seed project that uses a React UI powered by a simple Flask API Server.

App Generator 37 Dec 24, 2022
CRUD app to create and save code snippets, Flask/Python restful Api/backend and React/Typescript frontend

MS3 Cheat-Hub A cheatsheet hub. An app that organizes your code snippets into collections of cheat sheets and allows you to view, like and save others

Joem Elias Sanez 21 Dec 28, 2022
The Django Base Site is a Django site that is built using the best Django practices and comes with all the common Django packages that you need to jumpstart your next project.

Django Base Site The Django Base Site is a Django site that is built using the best Django practices and comes with all the common Django packages tha

Brent O'Connor 167 Jan 03, 2023
A Boilerplate repo for Scientific Python Open Science projects

A Boilerplate repo for Scientific Python Open Science projects Installation Clone this repo If you need a fresh python environment, run $ conda env cr

Vincent Choqueuse 2 Dec 23, 2021
Django Webpack starter template for using Webpack 5 with Django 3.1 & Bootstrap 4. Yes, it can hot-reload.

Django Webpack Starter Hello fellow human. The repo uses Python 3.9.* Django 3.1.* Webpack 5.4.* Bootstrap 4.5.* Pipenv If you have any questions twe

Ganesh Khade 56 Nov 28, 2022
Template for creating ds simple projects

ds-project-template Template for creating ds simple projects Requirements pyenv python==3.9.4 Setup For this purpose you use following commands: pytho

1 Dec 17, 2021
Vue + Django with no compromises. Django Templates and Vue SFCs in harmony without sacrificing the full power of either.

Cookiecutter Vue Django Vue + Django with no compromise. Cookiecutter Vue Django is a framework for jumpstarting production-ready Django + Vue project

Mike Hoolehan 122 Dec 22, 2022
Launchr is an open source SaaS starter kit, based on Django.

Launchr Launchr is an open source SaaS starter kit. About Launchr is a fully-equipped starter template, ready to start a SaaS web app. It implements t

Jannis Gebauer 183 Jan 06, 2023
Generic python project template

generic-python-project-template generic-python-project-template STEPS - STEP 01- Create a repository by using template repository STEP 02- Clone the n

SUNNY BHAVEEN CHANDRA 3 Oct 03, 2022