Data Management

Last updated: January 2025

Database Configuration

Our Flask template uses PostgreSQL as the primary database. The configuration varies by environment:

  • Development: Uses local PostgreSQL instance for development and testing
  • Staging: Dedicated AWS RDS PostgreSQL instance
  • Production: Dedicated AWS RDS PostgreSQL instance

Data Schema Management

Database schema and settings are managed through the models.py file in the template code. This file defines your application's data models and relationships.

Admin Portal

The Flask application includes an administrative portal where you can view and manage your application's data. This provides a comprehensive interface for data management and monitoring.

Admin User Management

Development Environment

To create an admin user in the development environment, use the interactive command:

flask create-admin

Follow the prompts to set up the admin user credentials.

Staging and Production Environments

Admin users in staging and production environments are managed through the admin_users Secret. To update this secret, please see the Update Environment Secrets documentation.

Data Security and Compliance

Important: As an application owner, you are responsible for:

  • Ensuring the security and privacy of all personal information collected in your application
  • Compliance with applicable data protection laws and regulations
  • Implementing appropriate access controls and data handling procedures
  • Regular security audits and updates

Disaster Recovery

For production environments, we maintain 7-day backup retention for point-in-time recovery:

  • Automated backups are stored on AWS RDS
  • In case of catastrophic database failure, point-in-time recovery is available
  • To create a new environment from a production snapshot, please let us know on Slack

Need Help?

Join our Slack community to connect with other developers and get help in the #support channel.

Chat with our AI assistant