Skip to main content

Viir Phuria — Elite Engineering Portfolio & AI Agent Gateway

CI Pipeline Django CI/CD Python Version Django Version Is Agentic Score Code Style: Black Security: Hardened License: MIT

Production codebase powering viir.tech — a high-performance, defense-in-depth engineering portfolio, research portal, and AI agent interface built by Viir Phuria (Cybersecurity Engineer, Security Consultant, Full-Stack Developer, and IEEE Researcher).


Architecture Overview

                      +-----------------------------+
                      |   Cloudflare Managed DNS    |
                      |   (DNS-Only Apex + CNAME)   |
                      +--------------+--------------+
                                     |
                                     v
                      +-----------------------------+
                      |      Vercel Edge Proxy      |
                      | (SSL, www->apex, CDN Cache) |
                      +--------------+--------------+
                                     |
                                     v
                      +-----------------------------+
                      |   PythonAnywhere Host       |
                      |   (Gunicorn WSGI App)       |
                      +--------------+--------------+
                                     |
             +-----------------------+-----------------------+
             |                                               |
             v                                               v
+--------------------------+                   +--------------------------+
|      Django 4.2 LTS      |                   |    Static & Media Assets |
|  - Content Security Policy|                   |  - WhiteNoise Storage    |
|  - Argon2 Password Hasher|                   |  - Offline CSS Compressor|
|  - nh3 Rust XSS Filter   |                   +--------------------------+
|  - Model Context Protocol|
|  - RFC 9457 & RateLimits |
+------------+-------------+
             |
             v
+--------------------------+
|  Storage & Encryption    |
|  - Encrypted PII Fields  |
|  - Dynamic Cache Backend |
|  - SQLite / PostgreSQL   |
+--------------------------+

Core Capabilities

1. Defense-in-Depth Security

  • Argon2 Password Hashing: Utilizes ParanoidArgon2Hasher configured with elevated memory and time costs.
  • Content Security Policy (CSP): Per-request cryptographically secure random nonces injected via middleware (nonce-{secret}). Disables unsafe-inline scripts.
  • Data-at-Rest Encryption: Visitor contact details, emails, and phone numbers are encrypted at the database level using django-cryptography.
  • Rust-based HTML Sanitization: Powered by nh3 (Ammonia binding in Rust) for blog posts and rich content rendering.
  • Brute-Force Lockout: Integrated with django-axes (5 failure limit, 1-hour cool-off, IP-based tracking).
  • HSTS Preload: Strict Transport Security with subdomains and preload flags (max-age=31536000).

2. Autonomous Agent & AI Discoverability (100/100 Score)

  • llms.txt & llms-full.txt: Standardized machine-readable agent documentation conforming to llmstxt.org.
  • Model Context Protocol (MCP): Streamable JSON-RPC endpoint and manifest at /.well-known/mcp.json providing portfolio context tools to LLM agents.
  • Content Negotiation (acceptmarkdown.com): Requests with Accept: text/markdown receive clean Markdown context rather than HTML.
  • Agent-Friendly 404s: Probes requesting markdown on missing routes receive markdown problem summaries with links to sitemaps and documentation.
  • RFC 9457 Problem Details: Standardized API error format returning application/problem+json.
  • RFC 8594 & IETF RateLimit Headers: Comprehensive sunset notices, deprecation dates, and proactive rate-limit indicators on all API routes.

3. Developer Portal & REST API v1

  • OpenAPI 3.1 Specification: Hosted at /api/openapi.json and /api/v1/openapi.json.
  • Developer Portal: Live interactive documentation at https://viir.tech/developer/.
  • Official CLI SDK: viir-cli Python package specification for rapid terminal querying of portfolio data.

Public REST Endpoints

All REST API endpoints support both JSON and Markdown content negotiation:

Endpoint Method Description
/api/v1/health GET System health check and uptime status
/api/v1/dossier GET Complete machine-readable candidate dossier
/api/v1/projects GET Verified engineering projects, tags, and repos
/api/v1/publications GET Academic publications and IEEE conference papers
/api/v1/contact POST Encrypted recruiter and consulting contact form
/api/v1/mcp POST Model Context Protocol JSON-RPC stream
/api/openapi.json GET OpenAPI 3.1 specification schema
/llms.txt GET Concise LLM overview & agent guidance
/llms-full.txt GET Expanded complete system context dossier

Local Development & Quickstart

1. Prerequisites

  • Python 3.11+
  • Virtual environment (venv)
  • Git

2. Setup Instructions

# Clone repository
git clone https://github.com/Viir-Phuria/viir_portfolio.git
cd viir_portfolio

# Create and activate virtual environment
python -m venv .venv
# Windows:
.venv\Scripts\activate
# Linux/macOS:
source .venv/bin/activate

# Install dependencies
pip install --upgrade pip
pip install -r requirements.txt

# Configure environment variables
cp .env.example .env
# Edit .env with your specific local settings

# Run database migrations
python manage.py migrate

# Create administrative user
python manage.py createsuperuser

# Start development server
python manage.py runserver

Open http://127.0.0.1:8000 in your browser. The administrative portal is accessible at http://127.0.0.1:8000/dashboard/.


Testing & Quality Assurance

We maintain a rigorous test suite of 47 automated tests verifying agentic readiness, rate-limiting, CSP nonce generation, content negotiation, and API schemas:

# Run unit test suite
python manage.py test viir_folio

# Run tests with pytest
pytest

# Code style formatting check
black --check .

# Linting and syntax check
flake8 viir_folio viir_portfolio --statistics --max-line-length=127

# Check for uncommitted database migrations
python manage.py makemigrations --check --dry-run

# Production security deployment checklist verification
python manage.py check --deploy

Environment Variables Reference

Variable Type Default Description
SECRET_KEY string Required Django cryptographic signing secret
DEBUG bool False Enables debugging toolbar/detailed traces
ALLOWED_HOSTS string viir.tech,... Comma-delimited list of host headers
SITE_DOMAIN string viir.tech Primary apex domain
SECURE_SSL_REDIRECT bool True Forces HTTPS redirect on requests
SECURE_HSTS_SECONDS int 31536000 HTTP Strict Transport Security duration (1 year)
COMPRESS_ENABLED bool False Enables django-compressor asset minification
COMPRESS_OFFLINE bool False Pre-compresses static assets offline
SENTRY_DSN string "" Sentry Application Performance Monitoring DSN
EMAIL_HOST_USER string "" SMTP sender email username
EMAIL_HOST_PASSWORD string "" SMTP application-specific password
EMAIL_RECIPIENT_EMAIL string "" Inbox destination for contact form submissions

Production Deployment Checklist

When deploying changes to PythonAnywhere / Vercel:

  1. Pull Latest Changes:
    git pull origin main
    
  2. Collect Static Files:
    python manage.py collectstatic --noinput
    
  3. Compile Offline Compressed Bundles (if COMPRESS_OFFLINE=True):
    python manage.py compress --force
    
  4. Apply Migrations:
    python manage.py migrate
    
  5. Reload WSGI Process:
    touch /var/www/viir_pythonanywhere_com_wsgi.py
    

Contributing & Security

  • Security Advisories: Please review SECURITY.md for vulnerability reporting and coordinated disclosure guidelines.
  • Contributing: Please review CONTRIBUTING.md for coding conventions, commit standards, and pull request procedures.
  • Changelog: Release history and updates are documented in CHANGELOG.md.

License

This project is open-source software licensed under the MIT License.

Metadata

Release files for viir-cli 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for viir-cli 1.0.0
File Size Uploaded Provenance Actions
viir_cli-1.0.0.tar.gz 13.6 kB Without provenance Details for viir_cli-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for viir-cli 1.0.0
File Interpreter ABI Platform Actions
viir_cli-1.0.0-py3-none-any.whl Python 3 none any Details for viir_cli-1.0.0-py3-none-any.whl

Total release size: 22.9 kB

Release files / viir_cli-1.0.0.tar.gz

Download URL viir_cli-1.0.0.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
fa6a7baf30630b4454e7a3eb787fece2a3e0ecbd53da0db8ed8a3a5bb3980cd6
BLAKE2b-256 checksum
How to use checksums
9358f2b92165cdc349cf092ddbe5d660a1c2c16f14a479771c07f2614e0d4fd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.0

Release files / viir_cli-1.0.0-py3-none-any.whl

Download URL viir_cli-1.0.0-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2b9e27467df0747a8ee9f21b291ce9d8cbf7d4301cfb15c28504902e12ac8deb
BLAKE2b-256 checksum
How to use checksums
61eb8468f11d3fc85cdc1f63859fa79404137dae92c2cb5afef1c0c476930785
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.0

Security for viir-cli 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page