Date Calculator
Web application for calculating and tracking days across custom date ranges with configurable anchor periods.

01 Overview
Date Calculator is a full-stack web application for calculating and tracking days across custom date ranges with configurable anchor periods. It was built for tracking travel days, residency requirements, and other counts measured against custom yearly periods.
The frontend is built with Next.js 15 and React 19. Users add date ranges with a calendar picker, configure custom anchor dates (e.g., September 17 to September 16), and overlapping ranges are merged automatically. A heatmap shows which days fall within each period.
The backend is a RESTful API built with Flask (Python) and deployed as a serverless AWS Lambda function using container images. The API handles complex date calculations, overlap merging, heatmap generation, and session management.
02 Key Features
03 Architecture
System Architecture
The application is split into a statically-deployed Next.js frontend on Vercel and a serverless Flask API on AWS Lambda. The frontend calls the API via API Gateway; Lambda runs the Python calculation engine packaged as a Docker container image.
Date Calculation Pipeline
Each calculation request flows through overlap merging, period boundary splitting, and heatmap generation before results are returned to the client.
Frontend State Management
All UI state is managed with React hooks and persisted to localStorage so sessions survive page reloads. No external state library is used.