A web dashboard to view data from the Sensing Garden API using the sensing_garden_client package.
- Create a
.envfile in the project root with the following content:
# API Configuration for Sensing Garden Backend
SENSING_GARDEN_API_KEY=your_api_key_here
API_BASE_URL=https://your-api-endpoint.com
AWS_ACCESS_KEY_ID=your_aws_access_key_id
AWS_SECRET_ACCESS_KEY=your_aws_secret_access_key
AWS_REGION=us-east-1
MODELS_BUCKET=scl-sensing-garden-models
OUTPUT_BUCKET=scl-sensing-garden
ACTIVITY_EVENTS_TABLE=sensing-garden-activity-events
- Install Poetry if you don't have it already:
curl -sSL https://install.python-poetry.org | python3 -- Run the start script to create the Poetry environment:
./start_local.sh- Run the dashboard:
poetry run flask run --host=0.0.0.0 --port=8080- Open your browser and navigate to:
http://localhost:8080
-
Make sure Docker and Docker Compose are installed on your system
-
Build and run the Docker container:
docker-compose up --build- Open your browser and navigate to:
http://localhost:8080
- View detection data including images and metadata
- View classification data including species information and confidence scores
- View model information
- Browse the output S3 bucket in read-only mode
- View dashboard, backend, S3, and bugcam activity in one Admin log
- Upload model bundles to the models S3 bucket
- Delete model bundles from S3 and remove model records
- View detailed information for each item
- Direct links to S3 images
- Pagination support for large datasets
- Uses Flask for the web framework
- Poetry for dependency management
- sensing_garden_client package to interact with the API
- Docker support for containerized deployment
The following environment variables are required (stored in the .env file):
SENSING_GARDEN_API_KEY: API key for authentication with the Sensing Garden APIAPI_BASE_URL: Base URL for the APIAWS_ACCESS_KEY_ID: AWS access key for model bundle managementAWS_SECRET_ACCESS_KEY: AWS secret access key for model bundle managementAWS_REGION: AWS region for S3 accessMODELS_BUCKET: S3 bucket used for model bundlesOUTPUT_BUCKET: S3 bucket used for processed bugcam outputACTIVITY_EVENTS_TABLE: DynamoDB table used for dashboard/backend activity events
To add new dependencies to the project:
poetry add package-nameFirst install dependencies (if not already done):
poetry install --no-rootRun the test suite using Poetry's virtual environment:
poetry run pytest -qAfter starting the dashboard you can verify that it is running by hitting the
/health endpoint:
curl http://localhost:8080/healthThis application is configured to be deployable to AWS AppRunner. The Docker container setup provides the necessary configuration for cloud deployment.
- This dashboard is for development and testing purposes only
- For production use, consider adding authentication and additional security measures