Portfolio

Colegio Aragón Website

Website for Colegio Aragón with its own admin panel: the school's staff publish content, build the timetable, manage room bookings by QR code, run the TV display screens and review traffic, all without touching code. Flask, MySQL and Celery, live at colegioaragon.cl.

In production Tech lead
Python Flask MySQL

Leer en español

Colegio Aragón Website

Colegio Aragón: school website and custom management panel

A school website is often a static page nobody updates. For Colegio Aragón I built something different: a fast, responsive public site, backed by a private admin panel where the school's staff publish content, build the school timetable, manage room bookings by QR code, answer messages and review traffic, all without touching code.

It is live at colegioaragon.cl. This is the technical overview of what's behind it.

Colegio Aragón home page: hero with an admissions call to action and a menu by area

Overview
RoleLead full-stack developer (around 83% of the 160 commits), with contributions from another developer on the team
TimelineMay – September 2026
TypeSchool website + admin panel + internal tools (timetable, bookings, screens)
StatusIn production
CodePrivate, so this case study uses screenshots and short snippets

Stack

LayerTechnologies
BackendPython, Flask 3, SQLAlchemy 2, Flask-Login, Flask-Mail, Flask-Migrate, MySQL
Background jobsCelery 5 + Redis (emails and scheduled reminders)
FrontendJinja templates with per-section CSS on the public site; Bootstrap 5.3 + AdminLTE 4 in the panel; Chart.js for charts
IntegrationsCloudflare Turnstile, Meta Pixel + Conversions API, geoip2fast (offline geolocation), qrcode
FilesCustom storage layer with a local or S3 driver
DeploymentGunicorn and a Celery worker as systemd services, behind a reverse proxy

Architecture

 Visitors, parents and teachers (browser or QR code)
        |
        v
 +-------------------------------+     queue (Redis)    +------------------------+
 |  Flask 3 + Gunicorn           | -------------------> |  Celery worker         |
 |  public site + /admin         |                      |  emails and reminders  |
 +-------------------------------+                      +------------------------+
        |                   |                                       |
        v                   v                                       v
      MySQL        Local or S3 storage                            SMTP

 Integrations: Cloudflare Turnstile | Meta Pixel + Conversions API | geoip2fast (offline)

It is a Flask monolith with a create_app() factory, blueprints per section (public site, authentication, and an admin panel with sub-blueprints such as the timetable one), and a service layer for shared logic. Anything that can wait (sending an email, a booking reminder) goes to Celery, so no page ever waits on the mail server.

Features

AreaWhat it doesTechnical detail
Public siteAbout 30 pages: about us, educational project, levels, facilities, regulations, admissions, calendar, timetables, supplies, uniforms, reading planContent editable from the panel; SEO metadata; the admissions year is computed from the semester settings
NewslettersNews for parents with thumbnails and searchAdmin and "publisher" roles; publishers can only edit their own content
School timetableSchool day, breaks, periods, classes, teachers, subjects, fixed lessons and special workshopsPeriods computed automatically; weekly view shared with the public site; printable version
Resource bookingRooms and equipment (computer lab, library, Chromebooks) bookable per periodPublic link + QR per resource, no accounts; one set of clash rules for admin and public flows
Screens and kiosksFull-screen image carousel on a school TVTwo-word access code, one device at a time, heartbeat
ContactContact form answered from the panelTurnstile, attempt limits with automatic blocking, replies by email
AnalyticsIn-house visit tracking by day, source and countryCustom middleware, offline geolocation, server-side Meta events
AdministrationUsers, backups, dark modeRandom password sent by email, password reset, backups to local disk or S3

The "Educational project" section of the public site

Deep dives

1. QR-code bookings, no accounts

Every bookable resource has a public link with a token and a QR code rendered server-side as SVG, plus a printable version to stick on the room door. A teacher scans the code, sees the week's availability and books a free period without logging in. If the link leaks, it can be regenerated from the panel and the old one stops working.

Public booking view for the computer lab: week with fixed lessons, breaks and free periods

The key point is that the public flow and the admin flow apply the same rules. A single function decides whether a period is free and, if it isn't, explains why:

def bloque_estado(fecha, recurso_id, bloque, excluir_reserva_id=None):
    # 1. Is there an active fixed lesson that day covering this period?
    # 2. Is there a special workshop overlapping in time?
    # 3. Is there already another booking for this resource in this period?
    # Returns (available, reason): the reason names the lesson, class and teacher in the way.

When a fixed lesson that clashes with existing one-off bookings is activated, the system removes those bookings and reports how many, instead of leaving the timetable in an impossible state.

Public link and QR page for a resource, with copy, print and regenerate options

2. School timetable: from the school day to the grid

The timetable starts from the school day and its breaks, which can be set per weekday. From there, the panel proposes class periods automatically: it covers the whole day skipping the breaks and splits each free stretch into parts as even as possible, up to 45 minutes each, instead of fixed 45-minute periods with a small leftover at the end.

School day settings: general schedule, breaks and rest periods

The weekly grid comes from a single service used by both the admin view and the public QR view. That service:

  • Places fixed lessons, workshops and bookings on the clock, with breaks marked.
  • Lays out overlapping events side by side in columns, like a calendar, sweeping through clusters of events that overlap.
  • Merges back-to-back bookings for the same resource, teacher and class into a single visual block.

Weekly timetable view in dark mode: fixed lessons and bookings across all resources

3. Emails and reminders with Celery

For email I wrote a base class modeled after Laravel's Mailables: each email type declares its subject and template, and .queue() renders the HTML right away and hands SMTP delivery to the Celery worker. There are 8 types: welcome, password reset and change, contact messages, replies and booking notices.

Bookings notify a configurable group of admins twice: when they are made (a single email even when several periods are booked at once) and right at the start time. That second notice is scheduled with eta:

send_reserva_hora_reminder.apply_async(
    kwargs={'reserva_id': reserva.id, 'expected_start_iso': inicio.isoformat(), 'dashboard_url': url},
    eta=inicio,
)

Instead of revoking the task when someone edits or deletes the booking, the task carries the start time it expects. When it runs, if the booking no longer exists or its time changed, it does nothing; the edit already scheduled its own reminder. No need to keep track of task IDs.

4. Screens for kiosks

A "room" here is a full-screen image carousel meant for a TV at the school. To connect the TV, the panel issues a code made of two simple Spanish words with no accents or ñ (for example gatito-manzana), easy to type with a remote control. Lookup tolerates uppercase, spaces and underscores.

  • One device at a time: the first browser that opens the link "claims" it with a secret stored in a cookie, compared in constant time.
  • Heartbeat: the screen periodically reports that it is still alive. Since the project has no scheduler for this, the status is recomputed lazily: after 45 seconds without a heartbeat, the session is marked as expired the next time it is read.

The site on a phone: QR booking, home page and the screen to enter a room code

5. A contact form without spam

The contact form verifies a Cloudflare Turnstile token on the server and logs every submission. If the same email or IP goes over 3 attempts in 10 minutes, it is blocked automatically, and the panel has a blocked-senders list to review. Messages are answered from the panel and the reply arrives by email using a school-branded template.

6. In-house analytics and Meta

Visits are recorded by a custom middleware: one per IP every 24 hours, with UTM parameters and country. The country comes from geoip2fast, an offline database bundled with the library: no network calls and no licenses to manage, loaded once per process.

The panel charts visits per day (7, 30 or 90 days), traffic sources and countries with Chart.js. For ad campaigns, every page view is also sent server-side to Meta's Conversions API, with an event ID shared with the browser Pixel so Meta doesn't count it twice. The call runs in the background with a 3-second timeout, so the page never waits on Meta.

Visits panel: visits per day, traffic sources and visits by country

7. The admin panel

  • AdminLTE 4 + Bootstrap 5.3, with light and dark modes remembered per browser and a filter to search the menu.
  • Users: creating an account generates a random password that can be emailed; there is token-based password reset and a guard against deleting your own account.
  • Backups: a data dump (INSERT statements only) generated from the panel or by script, saved to the configured storage (local or S3), and downloadable or deletable from there.
  • Swappable storage: a common interface with local and S3 drivers, so moving from disk to a bucket is a config change.

Admin panel: summary of messages, visits, users, last backup and published content

By the numbers

MetricValue
Commits (May – September 2026)160, around 83% mine
SQLAlchemy models38
Jinja templates115
Python code~8,700 lines across 113 files
Public pages~30
Email types8

What I take away

This project taught me to build for people who will never read a manual: a teacher with a phone in front of a door, someone at the school setting up a TV with a remote, a team that needs to publish a newsletter without asking for help. My favorite technical decisions came from there: a single source of truth for booking rules, reminders that look after themselves instead of revoking tasks, and lazy expiration instead of adding infrastructure that wasn't needed.

Admin panel screenshots come from my local environment: teacher and user names were replaced with fictional ones and IP addresses are masked.

Project screenshots

Screenshot 1 Screenshot 2 Screenshot 3 Screenshot 4 Screenshot 5 Screenshot 6 Screenshot 7 Screenshot 8 Screenshot 9
← All projects