Back to workPROJECT 07 / Software

Portfolio Contact — API Architecture

Source studyBoth implementations are available as source. Email delivery is not demonstrated here.

DISCIPLINESoftware
STATUSSource study
TOOLSNode.js / Express / Serverless / Nodemailer / HTTP
GitHub source preview of the Express portfolio contact API
01 / THE PROBLEM & FOCUS

Behind the
experience.

Two approaches to a portfolio contact flow: an Express server and a focused serverless handler.

This source study compares an Express contact API with a Vercel-oriented serverless handler. Both accept contact details, validate required fields, configure CORS, and use Nodemailer with environment-based SMTP settings.

Implementation focus

  • Contact request and response handling
  • Required-field validation and CORS configuration
  • SMTP integration through Nodemailer
02 / TECHNICAL & DESIGN DECISIONS

The decisions
behind the interface.

01

Define the request

Accept the contact name, email, subject, and message as JSON.

02

Validate the input

Check required fields and return clear success or error responses.

03

Connect email delivery

Configure a Nodemailer transport through environment variables.

ONE FLOW / TWO APPROACHES

From message to response.

Express server

A persistent server organizes a health endpoint and contact route with CORS middleware.

  1. Contact request
  2. Express route
  3. Required-field checks
  4. SMTP transport
  5. JSON response

Serverless handler

A single exported function handles method checks, preflight responses, validation, and delivery.

  1. Contact request
  2. POST / OPTIONS handler
  3. Required-field checks
  4. SMTP transport
  5. JSON response
03 / THE INTERFACE

A closer look.

Actual project screens. Select one to explore the details.

Project screenshot

04 / OUTCOME & STATUS

What came out of it.

A paired source study covering request handling, validation, CORS, and environment-based email configuration.

Explore my GitHub profile
UP NEXT / 08

Urgent Question — Browser Experiment