This is Web Application Using Flask and SQLite in Python 3. SQLAlchemy is used as a Python SQL toolkit to connect to SQLite
home page provides navigation links to other pages
donation registeration enables user to record a donation, including donation type (drop down list including money, food, clothing, and other, donation quantity, and the date of the donation (default is local time).
distribution registration similar to donation registeration, except for it's used to record a donation distribution with details.
reports summary of total donation quantity/distribution quantity by donation type for all records.
# set up virtual environment
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
# run app in development server
flask --app main run --debug
# open local host in a browser and explore pages
http://127.0.0.1:5000/
http://127.0.0.1:5000/donation_register
http://127.0.0.1:5000/donation_distribution
http://127.0.0.1:5000/donation_reports
# optional, if you have trouble seeing the pages, close idle sockets using chrome://net-internals/#sockets
- Donation Registration and Distribution Web Pages.
- Database: Aurora. DynamoDB is an alternative, but it's not great if we need near-real time analysis with aggregations.
- Authentication and Authorization: Amazon Cognito. This service provides user pools and identity pools for secure access control.
- API Gateway: API Gateway endpoints to expose the Lambda functions as RESTful APIs. Use API Gateway's integration with Cognito to secure the APIs and restrict access to authorized users.
- Storage: S3.
- Monitoring and Logging:CloudWatch
- Deployment: CDK
- Frontend: AWS Elastic Beanstalk or AWS Amplify. This frontend will interact with the API Gateway endpoints.
- Security: follow best practics, e.g. encryption at rest and in transit, AWS Identity and Access Management (IAM), and AWS Key Management Service (KMS)
- Scalability: AWS Lambda and DynamoDB automatically scale with traffic, ensuring the system can handle varying donation activity.
- Backup and Disaster Recovery: Enable database regular backup and point-in-time recovery. S3 versioning. Create a disaster recovery plan.
- Cost Optimization: Monitor and optimize costs using AWS Cost Explorer and consider using AWS Budgets and Cost Allocation Tags to manage expenses effectively.
- Reporting: Web page querying database for real-time reporting. For offline analysis, can use S3->Datlake (Glue catalog, Lakeformation), -> Athena query -> Quicksight dashboard, etc.