Architecture & Tech Stack

FreshList is built as a cloud-native, serverless application designed for scalability, performance, and maintainability. Below is a breakdown of the technical choices and architecture.

Frontend

  • Next.js 14 (App Router)
  • TypeScript
  • Tailwind CSS + Shadcn UI
  • Lucide React Icons
  • Deployed on Vercel

Backend

  • AWS Lambda (Node.js 20)
  • TypeScript
  • Serverless Architecture
  • Single Responsibility Handlers
  • REST API via API Gateway

Infrastructure

  • Terraform (IaC)
  • DynamoDB (Single Table Design)
  • API Gateway HTTP API
  • CloudWatch Logs
  • Least Privilege IAM Roles

CI/CD & DevOps

  • GitHub Actions
  • AWS OIDC Authentication
  • Automated Terraform Apply
  • Vercel Deployment
  • Local Build Scripts for Lambda

Key Learnings

  • Serverless Optimization: Keeping Lambda bundle size small by excluding devDependencies and using efficient build scripts.
  • IaC with Terraform: Managing state and resources declaratively ensures reproducible environments.
  • Modern Frontend Patterns: Leveraging Next.js 14 Server Components and Client Components effectively for a smooth UX.

Future Improvements

  • Real Authentication: Replace mock auth with NextAuth.js (Cognito or Auth0).
  • AI Integration: Use OpenAI API to generate dynamic meal plans based on real user input.
  • Offline Mode: Implement PWA features for grocery shopping without internet.