{"id":20156231,"url":"https://github.com/openfun/clearboard","last_synced_at":"2026-04-15T16:33:40.137Z","repository":{"id":42573486,"uuid":"463315897","full_name":"openfun/clearboard","owner":"openfun","description":"Receive a stream of images, detect a blackboard in it, extract it and serve an enhanced view of what is written on it","archived":false,"fork":false,"pushed_at":"2022-03-31T09:20:40.000Z","size":113684,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-03T01:45:16.620Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openfun.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-24T22:06:00.000Z","updated_at":"2022-03-19T08:46:48.000Z","dependencies_parsed_at":"2022-09-09T05:32:29.655Z","dependency_job_id":null,"html_url":"https://github.com/openfun/clearboard","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/openfun/clearboard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfun%2Fclearboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfun%2Fclearboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfun%2Fclearboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfun%2Fclearboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openfun","download_url":"https://codeload.github.com/openfun/clearboard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfun%2Fclearboard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31849845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T23:38:07.075Z","updated_at":"2026-04-15T16:33:40.119Z","avatar_url":"https://github.com/openfun.png","language":"Python","readme":"# Clearboard – Stream an enhanced blackboard 👨‍🏫\n\nClearboard receives a stream of images, detects a blackboard in it, extracts it and serves\nan enhanced view of what is written on the blackboard.\n\n## Getting started\n\n### Prerequisite\n\nMake sure you have a recent version of Docker and\n[Docker Compose](https://docs.docker.com/compose/install) installed on your laptop:\n\n```bash\n$ docker -v\n  Docker version 20.10.2, build 2291f61\n\n$ docker-compose -v\n  docker-compose version 1.27.4, build 40524192\n```\n\n\u003e ⚠️ You may need to run the following commands with `sudo` but this can be\n\u003e avoided by assigning your user to the `docker` group.\n\n### Project bootstrap\n\nThe easiest way to start working on the project is to use our `Makefile` :\n\n```bash\n$ make bootstrap\n```\n\nThis command builds the `app` and `lambda-enhance` containers, installs\ndependencies and runs them. It's a good idea to use this command each time\nyou are pulling code from the project repository to avoid dependency-releated\nissues.\n\n#### FastAPI app\n\nThe `app` container is the FastAPI web server that serves the API to:\n\n- serve an upload policy to the frontend\n- serve a CloudFront signed url to retrieve the processed image from the destination bucket\n\nYou should be able to access the API overview interface at (http://localhost:8070).\n\n#### Env\n\nYou need to create a .env file in the backend repository to specify parameters used in clearboard/config.py. At the moment there are 2 parameters:\n\n- `MEDIA_ROOT` the root folder for saving pictures\n- `ORIGINS` used when adding a middle ware that whitelist origins that can contact the api, if you need to whitelist several addresses, use `,` to separate them.\n\nExample :\nMEDIA_ROOT=\"/data/media\"\nORIGINS=\"http://localhost:3000,https://www.example.com\"\n\n#### Architecture\n\nAll python scripts for the FastAPI server are in the clearboard folder:\n\n- `main.py` is the main script that is running on the docker, it managed all the api routes\n- `config.py` load the env vars\n- `models.py` handle models used in main.py\n- `coord_loader.py` script implementing functions to load and save coordinates in file\n- `black_n_white.py, color.py, contrast.py, parallax.py` filters already implemented and available\n\n#### Lambda enhance\n\nThe `lambda-enhance` container holds the Python script that processes images in an AWS lambda. It is not implemented yet.\n\nThe lambda is triggered by S3 each time an image is uploaded to it. It processes the image and\ndeposits the result in the destination bucket.\n\nThe lambda container can run locally in docker compose for development purposes:\n\n```bash\n$ make lambda\n```\n\nYou can then test it with a trigger request including a payload mimicking an AWS S3 trigger.\nFor example, if your source bucket contains a file with key \"image.png\", the following\ncurl mimicks the trigger sent by S3 when the file was uploaded:\n\n```bash\ncurl -XPOST \"http://localhost:9000/2015-03-31/functions/function/invocations\" \\\n    -d '{\"Records\":[{\"s3\":{\"bucket\":{\"name\": \"production-clearboard-source-fun\"}, \"object\":{\"key\": \"image.png\"}}}]}'\n```\n\nNote that you can see all available commands in our `Makefile` with :\n\n```bash\n$ make help\n```\n\n## Guides\n\n## Contributing\n\nThis project is intended to be community-driven, so please, do not hesitate to\nget in touch if you have any question related to our implementation or design\ndecisions.\n\nWe try to raise our code quality standards and expect contributors to follow\nthe recommandations from our\n[handbook](https://openfun.gitbooks.io/handbook/content).\n\n## License\n\nThis work is released under the MIT License (see [LICENSE](./LICENSE)).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenfun%2Fclearboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenfun%2Fclearboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenfun%2Fclearboard/lists"}