Malec Family Wiki

Multi-Subdomain Portfolio Platform

Active Development

Project Overview

The Malec Family Wiki is a sophisticated multi-subdomain portfolio platform that enables family members to maintain their professional portfolios, project histories, and personal pages under a unified domain structure. Built with modern web technologies and hosted on Azure App Service, the platform showcases an elegant solution to subdomain routing and content management.

Timeline

November 2024 - Present

Role

Solo Developer / Architect

Type

Web Application / Platform

Status

Production / Active

Tech Stack

Node.js 24 Express.js 4.18 Azure App Service Azure DevOps HTML5 CSS3 JavaScript ES6+ Git

The Problem

Managing multiple portfolio websites for family members presented several challenges:

The Solution

A unified platform with intelligent subdomain routing that provides:

Subdomain Architecture

Each person can have multiple subdomain variations that all route to their personalized page:

All these variations automatically route to the same portfolio while preserving SEO benefits.

Configuration-Driven Content

Person-to-subdomain mappings are managed through a simple JSON configuration:

{ "people": { "brian": { "id": "brian", "name": "Brian M. Malec", "subdomains": ["brian.m.malec", "brian.malec", "bmalec", "brian"] } } }

Easy Expansion

Adding a new family member takes just 5 minutes:

  1. Add configuration entry in config/people.json
  2. Create directory: public/people/{personId}/
  3. Copy and customize an HTML template
  4. Commit and push - automatic deployment via CI/CD

Key Features

Technical Highlights

Middleware-Based Routing

The subdomain routing logic uses Express middleware to parse and match subdomains before handling requests. This approach ensures routing decisions happen early in the request lifecycle:

  1. Extract hostname from request headers
  2. Parse subdomain by removing base domain
  3. Look up person ID from configuration
  4. Attach person ID to request object for downstream handlers
  5. Route to appropriate HTML template

Middleware Ordering Bug Fix

An interesting challenge emerged during development: the static file middleware was serving the main landing page before the subdomain routing logic could execute. The solution was to reorder middleware so dynamic routes are processed before static file serving.

Azure DevOps Integration

Complete CI/CD pipeline with:

Results & Impact

Architecture

Project Structure

malec-wiki/ ├── config/ │ └── people.json # Person-to-subdomain mappings ├── public/ │ ├── people/ │ │ └── {personId}/ │ │ ├── index.html # Main portfolio page │ │ └── projects/ │ │ ├── current.html # Current projects list │ │ ├── past.html # Past projects list │ │ └── *.html # Individual project pages │ └── index.html # Landing page ├── server.js # Express server with routing ├── package.json # Dependencies └── azure-pipelines.yml # CI/CD configuration

Request Flow

  1. Request arrives at Azure App Service load balancer
  2. Express receives request with full hostname
  3. Subdomain middleware parses hostname and extracts subdomain
  4. Configuration lookup matches subdomain to person ID
  5. Request object augmented with person information
  6. Route handler serves appropriate HTML template
  7. Static assets (CSS, JS) served via Express static middleware

Challenges & Solutions

Challenge 1: Middleware Ordering

Problem: Subdomains were showing the default landing page instead of person-specific content.

Solution: Discovered that Express static middleware was matching before the routing logic. Reordered middleware to process dynamic routes first, then fall back to static files.

Challenge 2: Azure Domain Configuration

Problem: Azure App Service requires Basic tier or higher for custom domains, and wildcard domains need Standard tier.

Solution: Created comprehensive documentation (AZURE_DOMAIN_SETUP.md) with step-by-step instructions for both individual and wildcard domain approaches.

Challenge 3: Project Documentation Workflow

Problem: Creating detailed project pages was time-consuming and required remembering all project details.

Solution: Built a cross-session prompt system where Claude Code can analyze a project in one session, generate structured data, which is then used in the wiki session to auto-generate project pages.

Future Enhancements

Lessons Learned

← Back to Current Projects