Skip to content

Personal website and blog built with vanilla HTML/JS and Tailwind CSS. Static architecture focused on speed, security (CSP, SRI, HSTS), and privacy—no trackers, local assets only. Includes testing suite, Nginx production config, and GPG key distribution.

License

Notifications You must be signed in to change notification settings

tanhiowyatt/tanhio.dev

Repository files navigation

License: MIT Issues

 

tanhio.dev logo

Tanhio.Dev Personal Site
Static • Secure • Privacy-First

HTML5 Badge JavaScript Badge Tailwind CSS Badge MDX Badge


This is the source code for tanhio.dev, a personal website and blog built with vanilla HTML/JS and Tailwind CSS. It is designed to be lightweight, secure, and privacy-focused.

Screenshot

Features

  • Static Architecture: Fast and secure static HTML files.
  • Styling: Tailwind CSS for utility-first styling.
  • Privacy First: No external trackers, local fonts/icons, strict Content Security Policy (CSP).
  • Security:
    • SRI (Subresource Integrity) hashes for external assets (if any).
    • GPG Key distribution (gpg.asc).
    • security.txt and well-defined policies.
  • Testing: Comprehensive test suite including Unit, E2E, Security, and Accessibility tests.

Getting Started

Installation

  1. Install Dependencies:

    npm install
  2. Start Development Server:

    npx serve . -l 5173

    The site will be available at http://localhost:5173.

  3. Watch Mode (CSS): Recompile Tailwind CSS automatically on file changes:

    npm run watch:css

Build

Compile assets for production:

npm run build:css

Testing

The project maintains a comprehensive test suite in the tests/ directory.

Command Description
npm test Run all tests (Unit, E2E, Security, A11y)
npm run test:unit Run unit tests
npm run test:e2e Run end-to-end browser tests
npm run test:security Run security checks (CSP, HTTP headers)
npm run test:a11y Run accessibility audits

Deployment

Infrastructure

  • Server: Nginx on Linux (Debian/Ubuntu)
  • Path: /var/www/tanhio_site
  • Security: Behind Cloudflare/AWS WAF, strict HTTPS, and rate limiting.

Configuration

Production Nginx configuration is available at infra/nginx.conf.

Key Features:

  • Subdomains: tanhio.dev, blog.tanhio.dev, cv.tanhio.dev
  • Security Headers: HSTS, CSP, X-Frame-Options
  • Caching: Aggressive caching (1 year) for static assets

Setup Steps

  1. Clone repository to /var/www/tanhio_site.
  2. Install dependencies (npm ci) and build CSS (npm run build:css).
  3. Symlink and reload Nginx:
    sudo ln -s /var/www/tanhio_site/infra/nginx.conf /etc/nginx/sites-available/tanhio_site
    sudo ln -s /etc/nginx/sites-available/tanhio_site /etc/nginx/sites-enabled/
    sudo nginx -t && sudo systemctl reload nginx

Project Structure

├── assets/          # Static assets (CSS, JS, Images)
│   ├── styles/      # Tailwind input/output CSS
│   └── components/  # Modular JS components
├── blog/            # Blog posts
├── files/           # Public downloads (CV, GPG keys)
├── infra/           # Server Infrastructure (Nginx)
├── partials/        # HTML inclusions (Header, Footer)
├── tests/           # Test suites (Unit, E2E)
├── index.html       # Landing page
└── tailwind.config.js

About

Personal website and blog built with vanilla HTML/JS and Tailwind CSS. Static architecture focused on speed, security (CSP, SRI, HSTS), and privacy—no trackers, local assets only. Includes testing suite, Nginx production config, and GPG key distribution.

Resources

License

Stars

Watchers

Forks