A Flask-based backend API for the Prismo educational platform with AWS integration.
- Flask web framework with CORS support
- AWS Cognito authentication
- DynamoDB database integration
- Environment-based configuration
- Modular blueprint structure
- API endpoints for labs, widgets, and collections
- Health check endpoints
- JWT token authentication
-
Install dependencies:
uv sync
-
Set up AWS services:
- Configure AWS Cognito User Pool
- Set up DynamoDB tables
- Configure environment variables
See SETUP.md for detailed AWS setup instructions.
-
Run the development server:
python main.py
-
The API will be available at
http://localhost:5000
GET /- API statusGET /health- Health check
POST /auth/register- Register new userPOST /auth/login- Login userPOST /auth/refresh- Refresh tokenGET /auth/profile- Get user profilePUT /auth/profile- Update user profile
GET /api/labs- Get all labsPOST /api/labs- Create labGET /api/labs/<id>- Get specific labPUT /api/labs/<id>- Update labDELETE /api/labs/<id>- Delete lab
GET /api/widgets- Get all widgetsPOST /api/widgets- Create widgetGET /api/widgets/<id>- Get specific widget
GET /api/collections- Get collectionsPOST /api/collections- Create collectionGET /api/collections/<id>- Get specific collection
The app uses environment-based configuration. See config.py for available settings.
backend/
├── app/
│ ├── __init__.py # App factory
│ ├── routes.py # Basic API routes
│ ├── auth_routes.py # Authentication routes
│ ├── data_routes.py # Data management routes
│ ├── auth_service.py # Cognito authentication service
│ ├── aws_config.py # AWS configuration
│ └── models.py # DynamoDB models
├── config.py # Configuration classes
├── main.py # Application entry point
├── setup_tables.py # DynamoDB table setup script
├── pyproject.toml # Project dependencies
├── SETUP.md # AWS setup guide
└── README.md # This file