homeexampleshello-visitor-docker

Docker Visitor Greeting - Multi-Container Demo

Published Oct 22, 2025
3 minutes read

This project demonstrates a complete multi-container Docker Compose application. Users submit their name and email through a React frontend, which triggers a Node.js backend to store the visit in PostgreSQL and send a personalized welcome email via Gmail SMTP

Docker Compose Architecture
Multi-container setup with React, Node.js, PostgreSQL, and Redis

Project goals

Architecture overview

Data model

CREATE TABLE visits (
  id SERIAL PRIMARY KEY,
  name VARCHAR(100) NOT NULL,
  email VARCHAR(255) NOT NULL,
  created_at TIMESTAMP DEFAULT NOW()
);
 
CREATE INDEX idx_email ON visits(email);
CREATE INDEX idx_created_at ON visits(created_at);
Registration Form
Visitor form with PostgreSQL schema and Redis rate limiting

API surface

Request lifecycle

  1. User submits form in React frontend
  2. Frontend validates input and sends POST to backend
  3. Backend checks Redis for spam protection
  4. If not spam-blocked: inserts into PostgreSQL
  5. Sends HTML email via Gmail SMTP
  6. Sets Redis cooldown key (5 minutes)
  7. Returns success/error response to frontend

Email system

Operational concerns

Security and reliability

Performance notes

Trade-offs and decisions

Welcome Email
Personalized email sent via Gmail SMTP

Running the project

Troubleshooting

Notes

This project showcases how modern container orchestration enables rapid development of full-stack applications. The Clean Monochrome design demonstrates that minimal, focused UI can be both beautiful and functional. The email integration shows real-world SMTP usage patterns that scale to production systems

The repository demonstrates production ready patterns in a compact - perfect for understanding Docker Compose, multi-service architectures, and modern web development practices