Department app platform · London School of Economics

Pigeonhole

One backend, one web portal for department staff, and one phone app that shows each student their own departments. These pages describe everything it does, for the three groups of people who use it, with screenshots of the real application running against its demonstration data.

Built, hardened and merged: 1,846 tests passing Live since 4 November 2026 (v0.1.9) iOS on TestFlight; Android and the stores to come

What it is

A department talks to its students by email and SharePoint. A newsletter sent on Monday is buried by Wednesday; SharePoint keeps documents safe rather than findable; and neither gives a student a way to reach other people on their degree without already knowing them.

Pigeonhole replaces neither. It is the place where what a department publishes to its students is findable, current and acknowledged, and where students on the same programme can find and organise each other without a member of staff in the loop. It has four parts:

  • Publishing. Staff drop a file on a web page, or copy a department email address into the email they already send, and students get a searchable library that works offline, with search inside the documents. Pinned notices, expiry dates, versions and view counts mean nothing gets lost.
  • Community. Students post to the whole department, to chosen programmes or years, or to groups they start themselves (reading groups, socials, study groups). Real names, no private messages, report, block and mute built in, and a moderation queue for staff.
  • Events, people and questions. Events and key dates with RSVP, reminders and add-to-calendar; a staff directory with office hours and "ask me about" topics; polls; "Ask the department", anonymously if the student wants, with answers published as FAQs; push notifications with per-category settings, quiet hours and a weekly digest.
  • Many departments, one app. Each department is a separate tenant with its own branding, programmes, categories, staff and inbound email address. A joint-degree student sees both departments in one app and switches with a tap. The same code can produce a department's own branded app.

The first department is Philosophy, Logic and Scientific Method (PLSM). The demonstration data adds the Department of Government, so that the joint-degree case is real: Sam Student, a second-year BSc Philosophy, Politics and Economics student, belongs to both.

Who it is for

There is one page for each group of people. Each walks through every screen they will meet, in the order they meet it.

Students

Undergraduates, taught postgraduates and research students. They use the phone app: library, community, events, people, questions, inbox and settings.

For students →

Department staff

Professional services staff run the department in the web portal: publishing, moderation, the roster, events, settings and analytics. Academic staff mostly use the app.

For department staff →

The platform owner

Whoever runs the server: adding departments, deployment on the droplet, backups, keys, monitoring, upgrades, branded builds and store submission.

For the platform owner →

Anyone who wants the detail

Architecture, how departments are kept apart, the publishing pipeline, notifications, live updates, search, security, privacy, and how it was built.

How it works →

Decisions taken

Design decisions
QuestionDecision
DistributionOne app in the App Store and Google Play, branded per department after sign-in. A department that wants its own store listing gets a white-label build from the same code.
Sign-inA 6-digit code sent to the university email address; no passwords. Each university chooses whether the email also carries a sign-in link: LSE's carries the code only, because Microsoft 365 held link-bearing email for a minute or two. The department's roster CSV decides programme and year. Microsoft Entra ID can be added later behind the same interface.
MessagingAn open department board, automatic programme and year channels, and student-created groups. No private direct messages, so staff can see everything students can.
Who is a memberAll students (BSc, MSc, PhD), academic staff and professional services staff. Staff with an admin role also use the portal.
PublishingUpload in the portal, email-in, scheduled publications and recurring "slots". SharePoint synchronisation is out of scope.
StackTypeScript throughout: a Fastify API on Postgres 16, a React portal, an Expo (React Native) app, in one repository.
HostingDocker Compose on the owner's existing 2 GB Digital Ocean droplet, behind the nginx that already serves other websites, with the database and uploads on an encrypted block volume and nightly encrypted backups (to a Spaces bucket once one exists). No Redis, no search engine, no message broker: Postgres does all three jobs at department scale.

How the pieces fit

Students and staff reach one server over HTTPS. Everything runs as four containers on one droplet; email and push notifications go through two outside services. Backups are taken every night; until a Spaces bucket is set up they stay on the droplet.

Pigeonhole architecture The phone app and the admin portal talk over HTTPS to the droplet's web server, which passes requests to the stack's Caddy. Caddy serves the portal and the app's web build and forwards API calls to the API. The API and the background worker share Postgres, which holds the data, the search index and the job queue, and the uploads, whose files are encrypted; both sit on a LUKS2-encrypted block volume. The worker sends email through Mailgun (EU region) and push notifications through Expo to Apple and Google. Mailgun posts inbound email to the API. Every night the database and the files are backed up, encrypted, with restic: for now to a repository on the droplet, later to a Digital Ocean Spaces bucket. Phone app Expo: iOS, Android and web students and academic staff Admin portal React, in the browser department staff Digital Ocean droplet · Docker Compose nginx (host) → Caddy (stack) TLS, the portal and app web build, universal-link files API Fastify, 138 routes live updates (server-sent events) Worker background jobs: documents, notifications, digests, reminders, email-in Postgres 16 data, row-level security, full-text search, job queue, live-event bus Uploads volume every file encrypted (AES-256-GCM) with its department's own key Postgres data and uploads sit on a LUKS2-encrypted block volume, unlocked by hand after every reboot. Memory limits add up to 1.2 GB in shared mode; migrations run as a one-shot container before each start. Office-to-PDF conversion is off on the 2 GB host. Mailgun (EU) sign-in and digest email; inbound email-in Expo push to Apple (APNs) and Google (FCM) Spaces bucket nightly restic backups (to come; kept locally) HTTPS webhook 03:00

The API and the worker are the same Node image with different entry points. They talk to each other through Postgres: jobs go through the pg-boss queue, and live events (a new post, a notification) through Postgres NOTIFY, so an event raised in the worker reaches a phone connected to the API. How it works has the detail.

Status, 5 November 2026

The build ran as parallel Claude Code agents from a written design: one agent wrote the contract (database, API routes, mock server, seed data), eight built the slices in parallel, one integrated them, and a third phase of specialist agents hardened the result. All of that is merged into main, and the system has been running on the owner's droplet since 4 November.

StageStateEvidence
DesignDoneSeven design documents in docs/
Phase 0: the contractDoneSchema, migrations, row-level security, API route manifest, mock server, seed data
Phase 1: eight agentsDoneAPI (identity, publications, community, events), portal, app (two agents), infrastructure
Phase 2: integrationDoneFive end-to-end flows pass against the real API; every route implemented; a cross-tenant audit of 108 routes found and fixed one leak
Phase 3: hardeningDoneMerged on 4 November: Mailgun email, the security review, white-label and store assets, accessibility. Merged on 5 November: TeX maths, then media players. On main 1,846 tests pass. The load test and the setup-wizard documentation have not been run
Visual editor for the portalIn progressA visual (Tiptap) editor for Markdown bodies, being built on branch agent/P8; not on main
DeploymentLiveapi., admin. and app.pigeonhole.jmckalex.org on the jmck-web droplet in shared-host mode, with Let's Encrypt certificates and Mailgun (EU) sending and receiving email; v0.1.0 on 4 November, v0.1.1 to v0.1.9 on 5 November
iPhone appTestFlightBuild 2 (runtime 1.0.0) is on TestFlight; the owner has installed it and signed in. App changes since then reach it as over-the-air updates on the preview channel
Android appNot yetConfigured, never built
Store listingsNot yetListing text, privacy answers and screenshots are prepared; nothing has been submitted, and the public name is still to be chosen

How it works: the build lists every agent and its results, and For the platform owner lists each release.

What works

Everything in the version 1 scope runs against the real API: sign-in with refresh rotation, rosters with lapsing, publishing (upload, PDF processing, email-in, scheduling, versions, slots), the library with search inside documents, community (feed, channels, groups, polls, mentions, reactions, reports with automatic hiding, moderation, blocks and mutes), events with recurrence, RSVP, reminders and calendar files, notifications with preferences, quiet hours and a digest, the people directory, Ask with anonymous questions and FAQs, analytics, the setup wizard and the command-line tools. Since the first deployment: sign-in emails that carry only the code, where a university's mail filter delays links; TeX maths in event titles and in every Markdown body; video and audio players for a link on a line of its own; and a reader with full-screen reading and text reflowed into paragraphs.

Known gaps

  • Backups run every night but stay on the droplet until a Spaces bucket is set up: an open item.
  • Word, PowerPoint and Excel are not converted to PDF on the 2 GB server. Word files are still searchable and shown as text; PowerPoint and Excel can be downloaded.
  • The Android app has never been built or run, so its native PDF viewer is untested.
  • Push notifications go through Expo, but delivery to a real phone is not yet recorded; VoiceOver and TalkBack have not yet been tried by a person on a device.
  • On the app's web build a page reload signs you out, because tokens are kept in memory there.
  • Microsoft Entra ID sign-in and S3 file storage are stubs; virus scanning exists behind a switch but is untested.

About the screenshots

The screenshots were taken on 4 November 2026 from the code on main, running against the real API, worker and a freshly seeded Postgres database. Nothing is mocked. On 5 November the screens that had changed since were taken again in the same way: signing in (now code only for LSE), the reader (full screen, reflowed text, the new Close button) and two new events showing maths and media players. The phone screenshots come from the app in Expo Go on an iPhone 16 Pro simulator (iOS 18.6); the portal screenshots from Chromium at 1440 by 900. Both are shown in the theme your device uses: switch your system to dark mode to see the dark versions. They show the demonstration data, not the live server, which holds only the real department.

The demonstration data is fictional apart from the department names. Staff include Priya Shah (Department Manager, the owner), Kemi Adebayo (Programme Officer, admin) and Dr Adaeze Okafor (Associate Professor); the student used throughout is Sam Student. Some things in the screenshots were done for this documentation: Priya published a careers bulletin through the Publish page (it appears afterwards in the app); the platform administrator created a Department of Economic History to show the setup wizard; Kemi created two events, "Bayes for philosophers" and "Sigma Club recordings: watch and discuss", to show maths and media players (the recording is a real one from the department's Sigma Club series on YouTube); and LSE's sign-in emails were switched to code only, as they are on the live server.