This repository implements the Plant Tracer Flask web application and the lambda-resize video-processing service.
Production app: https://prod.planttracer.com/
- Flask backend:
src/app/ - Browser JavaScript and static assets:
src/app/static/ - Jinja templates:
src/app/templates/ - DynamoDB/S3 maintenance CLI:
src/dbutil.py - Lambda video/frame/tracking service:
lambda-resize/ - Python tests:
tests/andlambda-resize/tests/ - JavaScript tests:
jstests/ - Documentation:
docs/
Browser pages load jQuery globally. ES modules import $ from
src/app/static/utils.js, which re-exports the global jQuery instance.
- S3 stores original movies, traced movies, ZIP files, and frame artifacts.
- DynamoDB stores users, courses, API keys, movie metadata, frame trackpoints, and audit logs.
- The S3 bucket is pre-existing and outlives the CloudFormation stack.
- Research-use and attribution metadata must also be written into the MP4 file so archived movies remain self-describing.
Local development uses MinIO for S3 and DynamoDB Local for DynamoDB.
Install dependencies:
make install-macos # macOS
# or
make install-ubuntu # UbuntuStart local services and seed demo data:
make start-local-services
make make-local-demoRun locally:
make run-local-lambda-debug
make run-local-debugFlask runs at http://localhost:8080. The local Lambda bridge runs at
http://127.0.0.1:9811.
Demo mode:
make run-local-demo-debugUse Makefile targets:
make lint
make pytest
make jscoverage
make checkmake pytest starts/uses local DynamoDB and MinIO through the project fixtures
and Makefile environment. Do not run raw pytest for normal validation unless you
also reproduce the Makefile environment.
See docs/Development/EnvironmentVariables.rst.
Common local values are supplied by the Makefile:
AWS_REGION=localAWS_ENDPOINT_URL_DYNAMODB=http://localhost:8000/AWS_ENDPOINT_URL_S3=http://localhost:9000/PLANTTRACER_S3_BUCKET=planttracer-localDYNAMODB_TABLE_PREFIX=demo-PLANTTRACER_LAMBDA_API_BASE=http://127.0.0.1:9811/
Build docs after editing anything under docs/:
poetry run sphinx-build -W --keep-going -b html docs docs/_build/htmlDeveloper entry points:
docs/Development/DeveloperSetup.rstdocs/Development/Local Development and Github Actions.rstdocs/Development/FlaskAPI.mddocs/Development/ClientLambdaAPI.mddocs/Development/TechDebt.rst