How alejandro-jj/fastapi_bb works
BeadBuddy combines an authenticated image-upload/job API with asynchronous image processing, and also contains a separate bead-analysis library. The documented working path uploads an image, dispatches a Celery task through Redis, converts the image to grayscale, saves a result, and exposes task status. The sampled worker is still a placeholder for full segmentation; the richer segmentation and bead-analysis modules are not wired into it in the inspected code. The referenced optimization module is absent from the tree, so its behavior and connections are omitted.
Main entry points: main.py FastAPI routes · tasks.py Celery worker task · completeAnalysis.py Complete analysis · BeadClass.py Bead result model
Components 13
API and access
- FastAPI routes
backend/main.py - Authentication
backend/auth.py
Job processing
- Celery worker task
backend/tasks.py - Redis broker and results
Bead analysis
- Complete analysis
bb_funcs/completeAnalysis.py - Master segmenter
bb_funcs/MasterSegmenter.py - Bead result model
bb_funcs/BeadClass.py - Coordinate utilities
bb_funcs/tools.py
Data and files
- User and job models
backend/models.py - SQLite sessions
backend/database.py - Uploaded images
backend/uploads - Processed images
backend/results
Other components
- API client
Connections 15
- API client → FastAPI routes: sends requests
- FastAPI routes → Authentication: uses auth
- FastAPI routes → SQLite sessions: opens sessions
- FastAPI routes → User and job models: queries and writes
- FastAPI routes → Uploaded images: saves uploads
- FastAPI routes → Celery worker task: dispatches task
- FastAPI routes → Redis broker and results: checks task result
- FastAPI routes → Processed images: records result path
- Celery worker task → Redis broker and results: uses broker
- Redis broker and results → Celery worker task: delivers task
- Celery worker task → Uploaded images: reads image
- Celery worker task → Processed images: saves grayscale image
- Complete analysis → Master segmenter: runs segmentation
- Complete analysis → Bead result model: creates bead records
- Bead result model → Coordinate utilities: uses plotting utility