mirror of
https://github.com/asimonson1125/asimonson1125.github.io.git
synced 2026-02-24 21:09:49 -06:00
d21a8ec27888010c8da9e95945da1dd9e4a41c2c
Personal Portfolio & Service Monitor
A Flask-based website for my personal portfolio and a service monitoring dashboard. This project handles dynamic project showcases, automated service health tracking, and production-ready optimizations.
Features
- Content Management: Pages like projects, books, and skills are managed via JSON files in the
staticdirectory. - Service Monitoring: Background health checks for external services with uptime statistics stored in PostgreSQL.
- Optimizations:
- HTML, CSS, and JS minification via
Flask-Minify. - MD5-based cache busting for static assets.
- Configurable cache-control headers.
- HTML, CSS, and JS minification via
- Security: Pre-configured headers for XSS protection and frame security.
- Deployment: Ready for containerized deployment with Docker and Gunicorn.
Tech Stack
- Backend: Python 3.12, Flask
- Frontend: Vanilla CSS/JS, Jinja2
- Database: PostgreSQL (optional, for monitoring history)
- Infrastructure: Docker, docker-compose
Project Structure
.
├── src/
│ ├── app.py # Application entry point
│ ├── monitor.py # Service monitoring logic
│ ├── config.py # Environment configuration
│ ├── templates/ # HTML templates
│ ├── static/ # CSS, JS, and JSON data
│ └── requirements.txt # Python dependencies
├── Dockerfile # Container definition
├── docker-compose.yml # Local stack orchestration
└── STATUS_MONITOR_README.md # Monitoring system documentation
Getting Started
Using Docker
To run the full stack (App + PostgreSQL):
-
Clone the repository:
git clone https://github.com/asimonson1125/asimonson1125.github.io.git cd asimonson1125.github.io -
Start services:
docker-compose up --build -
Access the site: Visit http://localhost:8080.
Local Development
To run the Flask app without Docker:
-
Set up a virtual environment:
python3 -m venv .venv source .venv/bin/activate -
Install dependencies:
pip install -r src/requirements.txt -
Run the application:
cd src python3 app.pyNote: status monitor is by default disabled outside of its container cluster
Service Monitoring
The monitoring system in src/monitor.py tracks service availability. It:
- Runs concurrent health checks every hour.
- Calculates uptime for various windows (24h, 7d, 30d).
- Provides a status UI at
/statusand a JSON API at/api/status.
See STATUS_MONITOR_README.md for more details.
License
This project is personal property. All rights reserved.
Description
Languages
CSS
35.2%
HTML
24.9%
Python
21.1%
JavaScript
16.5%
SCSS
1.2%
Other
1.1%