DashLab¶
π§ Overview¶
The goal of this project is to deepen my practical knowledge by exploring new frameworks and challenging myself through the development of a versatile, accessible application.
At its core, DashLab is a dashboard that serves as a centralized hub to launch various projects. These projects are designed as APIs to maximize flexibility and reusability.
Together with MindShelf, where I document detailed notes on the tools I use and discover, DashLab helps me track my progress, showcase my coding skills, and continuously improve by learning more efficient coding practices, production tips, and problem-solving strategies.
π οΈ Technologies Used¶
- π Python Dash β by Plotly, for building the dashboard UI
- βοΈ Amazon EC2 and Route 53 β for app deployment and DNS management
- π Amazon Cognito and PyJWT β for user authentication and security
- π FastAPI β for serving the backend APIs powering the projects
- π³ Docker and Docker Compose β for streamlined local development and production deployment
- π Caddy β for HTTPS management, simplifying SSL without needing an AWS Application Load Balancer (ALB)
π Implementation Steps¶
- π Project planning and identification of potential limitations
- π» Developing the multi-page dashboard in Python
- βοΈ Deploying the application on Amazon EC2
- π§ͺ Thorough testing of the appβs functionality and performance
- β¨ Future enhancements: adding new projects to the dashboard and refining existing ones based on user needs and feedback
π Challenges Encountered¶
-
π³ Learning how to deploy containerized applications on AWS was a significant hurdle. Initially, I explored using a public ALB with ECS Fargate, then considered cost-reducing strategies such as private ALBs and VPC endpoints with CloudFront. Ultimately, I opted for direct deployment on an EC2 instance, linking its public IP to my domain with HTTPS managed by Caddy. This approach simplified deployment and reduced costs.
-
π Amazon Cognitoβs built-in user management did not fully support my desired workflow of self-registration with email validation followed by admin approval to prevent unauthorized access and unexpected costs. To address this, I created a custom user attribute,
approved
, which must be set to true for users to access protected resources. The dashboard dynamically adjusts messages and navigation options based on this attribute. Additionally, I implemented a post-confirmation Lambda trigger to notify me via email whenever a new user registers and validates their email.
β¨ What I Learned¶
- π How to deploy a secure, globally accessible application with user authentication
- π Managing HTTPS certificates easily using the open-source Caddy server
- π³ Improving development and production workflows with Docker and Docker Compose
π Related Resources¶
- π Live application: DashLab
- π Caddy Server Documentation for HTTPS management
- π³ Official Docker image for Caddy