Commit Graph

235 Commits

Author SHA1 Message Date
Tudor
f4919db3b9 Add automatic schema versioning with startup migration
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 57s
On startup, the app now checks if the database schema version matches
the code. If there's a mismatch or no version exists, it automatically
runs a full data migration before starting.

- Add backend/version.py with SCHEMA_VERSION constant
- Add backend/migration.py with extracted migration logic
- Add SchemaVersion model to track DB version
- Add version check functions to database.py
- Update app.py lifespan to use check_and_migrate_if_needed()
- Simplify migrate_csv_to_db.py to use shared logic

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 10:23:02 +00:00
Tudor
352eeec2db Add pupil absence data to school details modal
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 58s
Display test absence percentages (reading, maths, GPS, writing, science)
in a new section in the school modal. Requires database re-import.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 09:58:11 +00:00
Tudor
5bd49d3a03 Add Compare button to map view school list
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 56s
- Add orange Compare button alongside Details button
- Toggle to Remove when school is in comparison
- Stack buttons vertically with consistent sizing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 12:02:21 +00:00
Tudor
1913af4e7f Fix map view layout and z-index issues
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 57s
- Move location-info banner above map view as full-width bar
- Set fixed height for map view container with equal map/list heights
- Add z-index to map to prevent overlap with sticky header
- Update mobile responsive styles for consistent heights

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 11:36:08 +00:00
Tudor
fb30f43ef7 Improve map view with compact school list and interactions
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 57s
- Add compact school list items on right side of map view
- Show school name, distance, type, authority, RWM %, and pupils
- Click list item to center map and highlight marker
- Click map marker to scroll and highlight list item
- Add "Details" button to open school modal from list
- Store markers by URN for map centering functionality

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 11:22:03 +00:00
Tudor
782c68a7ce Move school type filter inline in location search
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 11:13:59 +00:00
Tudor
e0e3bb788e Add list/map view toggle for location search results
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 56s
When searching by location, users can now toggle between list view
(school cards grid) and a split map view showing:
- Interactive map on left with all school markers
- Scrollable school list on right
- Blue marker for search location, default markers for schools
- Clicking a marker highlights and scrolls to the corresponding card

Mobile responsive with stacked layout on smaller screens.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 11:09:35 +00:00
Tudor
e843394d57 Show progress scores from most recent available year
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 57s
Progress scores aren't available for 2023-24 and 2024-25 due to KS1
SATs being cancelled in 2020-2021. Now the modal finds and displays
progress scores from the most recent year they're available, with
the correct year shown in the header.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 10:15:41 +00:00
Tudor
7919c7b8a5 Add year indicators to school modal sections
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 56s
Display the data year for Progress Scores and School Context sections
in the school details modal, matching the existing KS2 Results format.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 09:56:45 +00:00
Tudor
c27b31220e Replace contact form with mailto link
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 58s
Simplify footer by removing the FormSubmit integration and replacing
it with a direct email link to contact@schoolcompare.co.uk.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 09:45:16 +00:00
Tudor
75677f4252 Add contact form to footer and simplify footer content
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 59s
Replace footer note with a contact form that emails contact@schoolcompare.co.uk
via FormSubmit.co. Keep only the data source attribution. Update CSP to allow
form submissions to FormSubmit.co and add responsive styling for the form.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 20:01:47 +00:00
Tudor
9b6c37cda3 Improve school modal charts for mobile visualization
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 58s
- Make charts taller on mobile with better aspect ratios (0.9 for <480px, 1.1 for <768px)
- Shorten chart title and dataset labels on mobile
- Add responsive font sizes for legend, title, and axis ticks
- Add mobile-specific styling for chart container, stats grid, and modal
- Add extra-small screen breakpoint (480px) for very narrow devices

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 19:09:07 +00:00
Tudor
f2eec08bd4 Add Portainer webhook trigger to CI workflow
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 34s
Automatically redeploy the stack when new images are pushed to the registry.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 21:16:29 +00:00
Tudor
f7b9a4d28e bug fix
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 58s
2026-01-13 19:51:21 +00:00
Tudor
c23e12fc12 fixed add to compare button position
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 57s
2026-01-13 15:55:32 +00:00
Tudor
a8fe4477f1 Added warning about lack of progress results, moved add to compare button
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m26s
2026-01-13 15:12:11 +00:00
Tudor
1a9341eaf4 Simplify school types and persist selected schools
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m1s
- Add runtime normalization of cryptic school type codes to user-friendly names
  (e.g., AC/ACC/ACCS -> "Academy", CY/CYS -> "Community")
- Update SCHOOL_TYPE_MAP in schemas.py with consolidated mappings
- Add normalize_school_type() and get_school_type_codes_for_filter() helpers
- Persist selected schools in localStorage across page refreshes
- Move "Add to Compare" button from modal footer to header

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 15:55:23 +00:00
Tudor
708fbe83a0 fixing GA implementation race condition for account id retrieva
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 58s
2026-01-12 09:35:53 +00:00
Tudor
8e4802df93 fixing GA implementation race condition for account id retrieval
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 58s
2026-01-12 09:18:40 +00:00
Tudor
a18ec04227 fixing GA implementation race condition for account id retrieval
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 59s
2026-01-12 09:10:36 +00:00
Tudor
9cd36a0b15 Add Google Analytics 4 with cookie consent integration
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m2s
- Add GA4 measurement ID to config (default: G-J0PCVT14NY)
- Add /api/config endpoint to expose GA ID to frontend
- Update cookie consent with Analytics category (opt-in)
- Load GA4 only after user consents to analytics cookies
- Update CSP to allow Google Analytics domains

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 15:19:05 +00:00
Tudor
1f6b2dd773 align school cards
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m1s
2026-01-10 13:17:30 +00:00
Tudor
6597ee40fb bug fixing
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 58s
2026-01-10 11:40:02 +00:00
Tudor
bb58d607c2 bug fix
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 56s
2026-01-10 11:32:40 +00:00
Tudor
e1383b3432 Fix postcode search ValueError when calculating distances
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 59s
Use direct bracket indexing instead of .get() for pandas Series
row access in calc_distance function to ensure scalar values
are returned for pd.isna() checks.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 11:25:21 +00:00
Tudor
3c1e7b4b27 removing some stats
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 59s
2026-01-09 16:55:20 +00:00
Tudor
597a841d4d fixing appearance of stats on cards
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 58s
2026-01-09 15:58:36 +00:00
Tudor
ab45f66431 adding half mile search option
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 56s
2026-01-09 15:12:11 +00:00
Tudor
c63e0e2682 introducing tooltips
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 59s
2026-01-09 15:10:39 +00:00
Tudor
79cf16d6b3 Add higher standard display and trend indicators to school cards
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 57s
- Display RWM Higher % alongside RWM Expected % on school cards
- Add trend indicators (up/down/stable arrows) showing year-over-year change
- Backend calculates previous year's RWM for trend comparison
- Trend appears on cards and in school detail modal

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 14:36:01 +00:00
Tudor
e3fc031ecf addings details and map to modal
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 59s
2026-01-09 11:52:13 +00:00
Tudor
058a741b10 fixed map overlapping modals
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 56s
2026-01-09 08:52:51 +00:00
Tudor
ea3f65249e fixed map overlapping modals
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 57s
2026-01-09 08:42:38 +00:00
Tudor
b0e2a42acc fixed map overlapping modals
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 56s
2026-01-09 08:36:33 +00:00
Tudor
1e6019eac3 fixed map overlapping modals
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 56s
2026-01-09 08:25:19 +00:00
Tudor
3f118ef826 fixed map overlapping modals
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 58s
2026-01-09 08:13:19 +00:00
Tudor
8458d638ec bug fix
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 55s
2026-01-09 00:10:40 +00:00
Tudor
51836852e4 bug fix
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 59s
2026-01-09 00:07:51 +00:00
Tudor
116be294a3 bug fix
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 57s
2026-01-08 23:55:36 +00:00
Tudor
4b91eb403a bug fix
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 57s
2026-01-08 23:53:30 +00:00
Tudor
6623418dbe bug fix
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 59s
2026-01-08 23:48:56 +00:00
Tudor
3f8e1911aa bug fix
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 58s
2026-01-08 23:29:48 +00:00
Tudor
b7943e1042 implementing map on school card; adding more school details
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 59s
2026-01-08 23:20:42 +00:00
Tudor
34f40c0c1c Renaming dashboard to home
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 57s
2026-01-08 22:59:55 +00:00
Tudor
1d19c88e49 bug fix
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 56s
2026-01-08 16:18:11 +00:00
Tudor
40348cb1bd moving geocoding to a background task
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 57s
2026-01-08 15:30:33 +00:00
Tudor
73971a43f0 Add SVG favicon matching logo design
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m0s
Creates a scalable favicon with the same design as the header logo:
dark background with coral-colored circle, grid lines, and center dot.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 15:10:14 +00:00
Tudor
39d0de751b Add GDPR-compliant cookie consent banner using Silktide
Implements Silktide Consent Manager via jsDelivr CDN for GDPR compliance.
The banner informs users the site only uses essential cookies and allows
them to manage preferences.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 14:59:21 +00:00
Tudor
0aafdfa382 SEO improvements
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m0s
2026-01-08 11:47:38 +00:00
Tudor
71b05769ae Fix CSP connect-src to allow cdn.jsdelivr.net
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 58s
Allow connections to cdn.jsdelivr.net for Chart.js resources.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 11:13:07 +00:00