Skip to content

FrankJamison/Developer-Portfolio-Platform

Repository files navigation

Developer Portfolio Platform (Flask)

The Developer Portfolio Platform is a small, fast portfolio site built with Python + Flask.

The server renders Jinja templates, serves pre-built static assets, and includes a contact form that persists messages to disk (and can optionally send an SMTP notification email).


Features

  • Server-rendered pages via Jinja templates (templates/)
  • Safe page routing (GET /<page_name> is restricted to filename-safe names)
  • Contact form:
    • Saves submissions to var/server-instance/database.txt and var/server-instance/database.csv
    • Optionally sends an SMTP email notification

Tech stack

Back-end

  • Python 3.14 (this repo’s venv metadata shows 3.14.2)
  • Flask 3.x
  • Gunicorn (WSGI in production)

Front-end

  • Pre-built CSS/JS in static/
  • Images and other assets in static/assets/

Run locally (Windows)

This repo contains a Python virtual environment in-place (the Scripts/ + Lib/ folders). You can use it, or create a fresh venv.

Option A: use the included venv

  1. Activate:
    • Scripts\activate.bat
  2. Install dependencies:
    • pip install -r requirements.txt
  3. Start the dev server:
    • python dev_server.py
  4. Open:

Option B: create a fresh venv

  1. Create + activate:
    • python -m venv .venv
    • .venv\Scripts\activate.bat
  2. Install dependencies:
    • pip install -r requirements.txt
  3. Start the dev server:
    • python dev_server.py

VS Code tasks (optional)

If you open this repo in VS Code, the included tasks can speed up the common workflow:


App entrypoints

  • dev_server.py — local dev runner (debug=True, 127.0.0.1:30001)
  • server.py — Flask app (routes + contact form)
  • wsgi.py — production entrypoint for Gunicorn (wsgi:app)
  • gunicorn.conf.py — Gunicorn config (uses PORT, default 30001)

Routes and templates

Pages

Templates live in templates/ and are served through a safe “page renderer” route:

  • GET /index.html
  • GET /<page_name><page_name>.html (only when page_name matches ^[a-zA-Z0-9_-]+$)

If the template doesn’t exist (or page_name is unsafe), the app returns 404.

Included templates:

  • index, about, works, work-01work-06, contact, thankyou, components

Contact form

  • Endpoint: POST /submit_form
  • Fields: email, subject, message
  • Success behavior: redirects to /thankyou

Data storage (instance directory)

Submissions are written to the Flask “instance path” so runtime data stays out of source-controlled files.

This project sets the instance path to:

  • var/server-instance/

Files written:

  • var/server-instance/database.txt (CSV rows)
  • var/server-instance/database.csv (CSV rows)

The directory is created automatically on first write.

Note: database.txt and database.csv at the repo root are not used by the app at runtime.


SMTP email notifications (optional)

If SMTP isn’t configured, sending is skipped by default.

Environment variables:

  • CONTACT_SMTP_HOST (default: mail.fcjamison.com)
  • CONTACT_SMTP_PORT (default: 587)
  • CONTACT_SMTP_USER
  • CONTACT_SMTP_PASSWORD
  • CONTACT_MAIL_FROM (default: CONTACT_SMTP_USER)
  • CONTACT_MAIL_TO (default: CONTACT_SMTP_USER)
  • CONTACT_SMTP_USE_STARTTLS (default: true)

Optional behavior:

  • CONTACT_EMAIL_REQUIRED=true to make missing SMTP config raise an error (otherwise email is skipped)

Delivery detail:

  • The outgoing email uses CONTACT_MAIL_FROM as the sender and sets Reply-To to the visitor-typed email.

Deploy (production)

This is a standard WSGI app.

  • Entrypoint: wsgi:app
  • Example bind:
    • gunicorn --bind 0.0.0.0:30001 wsgi:app
  • Recommended (uses PORT):
    • gunicorn -c gunicorn.conf.py wsgi:app

Operational notes:

  • Ensure the process has write permission to var/server-instance/.
  • If behind a reverse proxy, X-Forwarded-For (when present) is used to include an IP in the SMTP message body.

Repository map

  • .vscode/ — VS Code tasks + interpreter setting
  • templates/ — Jinja templates
  • static/ — compiled CSS/JS and assets
  • var/server-instance/ — runtime data written by the contact form
  • server.py — Flask application
  • dev_server.py — local runner
  • wsgi.py — production WSGI entrypoint
  • gunicorn.conf.py — Gunicorn config
  • requirements.txt — Python dependencies

About

Space Portfolio is a full stack Flask web application that blends a space inspired visual theme with structured backend routing, reusable Jinja templates, responsive Bootstrap layout, and a contact system. The project demonstrates secure configuration practices and production readiness while showcasing my development work in an interactive space.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors