← Back to Projects
Calmly project screenshot

Calmly

AWS Deployed Next.js Mental Health Platform

Deployed
N/A
Category
AWS

Overview

Calmly is a comprehensive web application built with Next.js and deployed on AWS, featuring a secure VPC with public/private subnets, EC2 instances for app and database servers, MySQL database, and S3 bucket for educational materials storage. The platform evolved to include serverless components like API Gateway, Lambda functions, DynamoDB, and SNS notifications for scalable mental health support.

Project Goal

Create a centralized telepsychiatry platform addressing Malaysia's mental health crisis (1M+ affected per NHMS 2023), enabling patients to book therapy sessions online, access educational resources, and receive real-time notifications while using AWS for scalable, secure, cost-efficient cloud infrastructure that serves rural and underserved communities.

Key Features

  • Patient registration/login, appointment booking/rescheduling/cancellation
  • Therapist dashboard for appointment management and material creation
  • Admin panel for user/material management
  • Educational materials upload/download via S3
  • Real-time SNS email notifications for appointment changes
  • Secure multi-role authentication system

Technical Challenges

01

Configuring VPC networking with public/private subnets, NAT Gateway, and Internet Gateway for secure database isolation.

02

Setting up EC2 security groups to allow controlled access between app server (ports 80/3000/22) and database (port 3306).

03

IAM permission issues across team members requiring precise role policies for Lambda, S3, and DynamoDB access.

04

CORS configuration for API Gateway to enable frontend-backend communication.

05

Transitioning from MySQL (Task 1) to DynamoDB serverless database while maintaining data integrity.

06

Lambda cold starts and monitoring performance with X-Ray/CloudWatch.

Key Learnings

01

Mastered AWS networking fundamentals (VPC, subnets, route tables, security groups) for production-grade deployments.

02

Implemented hybrid serverless architecture transitioning from EC2/MySQL to Lambda/API Gateway/DynamoDB/SNS.

03

Gained expertise in AWS IAM role management and least-privilege security policies.

04

Learned comprehensive monitoring with CloudWatch metrics, X-Ray tracing, and Lambda log analysis.

05

Understood cost optimization through serverless pay-per-use model vs. always-on EC2 instances.

06

Developed full-stack deployment skills including Git cloning, Node.js setup, database migrations, and S3 file handling.

Personal Reflection

"I really should reflect on this project... One day, when I'm not too busy shipping code, I'll write something profound here. For now, just know that it was a journey, and I learned things. Many things. Definitely."

Want to Learn More About This Project?

I'm happy to discuss the technical architecture, challenges overcome, and lessons learned from this project.