feat: indie status page MVP -- FastAPI + SQLite
- 8 DB models (services, incidents, monitors, subscribers, etc.) - Full CRUD API for services, incidents, monitors - Public status page with live data - Incident detail page with timeline - API key authentication - Uptime monitoring scheduler - 13 tests passing - TECHNICAL_DESIGN.md with full spec
This commit is contained in:
commit
902133edd3
4655 changed files with 1342691 additions and 0 deletions
22
app/templates/base.html
Normal file
22
app/templates/base.html
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}Status{% endblock %} — {{ site_name }}</title>
|
||||
<link rel="stylesheet" href="/static/css/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="container">
|
||||
<h1><a href="/">{{ site_name }}</a></h1>
|
||||
</div>
|
||||
</header>
|
||||
<main class="container">
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
<footer class="container">
|
||||
<p>© {{ now.year }} {{ site_name }}. Powered by Indie Status Page.</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
9
app/templates/confirm.html
Normal file
9
app/templates/confirm.html
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}Confirmed{% endblock %}
|
||||
{% block content %}
|
||||
<div class="confirm-page">
|
||||
<h1>✅ Subscription Confirmed</h1>
|
||||
<p>You're now subscribed to status updates. You'll receive notifications when incidents occur.</p>
|
||||
<a href="/">← Back to Status Page</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
26
app/templates/incident.html
Normal file
26
app/templates/incident.html
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}Incident: {{ incident.title }}{% endblock %}
|
||||
{% block content %}
|
||||
<div class="incident-detail">
|
||||
<a href="/">← Back to Status Page</a>
|
||||
<h1>{{ incident.title }}</h1>
|
||||
<div class="incident-meta">
|
||||
<span class="severity severity-{{ incident.severity }}">{{ incident.severity | title }}</span>
|
||||
<span class="incident-status">{{ incident.status | title }}</span>
|
||||
<p>Started: {{ incident.started_at }}</p>
|
||||
{% if incident.resolved_at %}
|
||||
<p>Resolved: {{ incident.resolved_at }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="timeline">
|
||||
{% for update in updates %}
|
||||
<div class="timeline-entry">
|
||||
<div class="timeline-status">{{ update.status | title }}</div>
|
||||
<div class="timeline-body">{{ update.body }}</div>
|
||||
<div class="timeline-time">{{ update.created_at }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
49
app/templates/status.html
Normal file
49
app/templates/status.html
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}Status{% endblock %}
|
||||
{% block content %}
|
||||
<div class="status-page">
|
||||
<section class="overall-status">
|
||||
{% if has_active_incidents %}
|
||||
<div class="status-banner status-banner--major">Active Incident</div>
|
||||
{% else %}
|
||||
<div class="status-banner status-banner--operational">All Systems Operational</div>
|
||||
{% endif %}
|
||||
</section>
|
||||
|
||||
<section class="services">
|
||||
{% for group_name, group_services in services_by_group.items() %}
|
||||
<h2>{{ group_name or "Services" }}</h2>
|
||||
{% for service in group_services %}
|
||||
<div class="service-row">
|
||||
<span class="service-name">{{ service.name }}</span>
|
||||
<span class="service-status {% if service.current_status == 'up' %}status-up{% elif service.current_status == 'down' %}status-down{% else %}status-degraded{% endif %}">
|
||||
{{ service.current_status | title }}
|
||||
</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</section>
|
||||
|
||||
{% if incidents %}
|
||||
<section class="incidents">
|
||||
<h2>Recent Incidents</h2>
|
||||
{% for incident in incidents %}
|
||||
<div class="incident-card">
|
||||
<h3><a href="/incident/{{ incident.id }}">{{ incident.title }}</a></h3>
|
||||
<span class="severity severity-{{ incident.severity }}">{{ incident.severity | title }}</span>
|
||||
<span class="incident-status">{{ incident.status | title }}</span>
|
||||
<p class="timestamp">{{ incident.started_at }}</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
<section class="subscribe">
|
||||
<p>Get notified when incidents occur:</p>
|
||||
<form action="/subscribe" method="POST">
|
||||
<input type="email" name="email" placeholder="you@example.com" required>
|
||||
<button type="submit">Subscribe</button>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
{% endblock %}
|
||||
12
app/templates/subscribe.html
Normal file
12
app/templates/subscribe.html
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}Subscribe{% endblock %}
|
||||
{% block content %}
|
||||
<div class="subscribe-page">
|
||||
<h1>Subscribe to Updates</h1>
|
||||
<p>Get email notifications when we create or update incidents.</p>
|
||||
<form action="/subscribe" method="POST">
|
||||
<input type="email" name="email" placeholder="you@example.com" required>
|
||||
<button type="submit">Subscribe</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue