Open-access digital publishing comes to the middle ages.
Pope Gregory's Dialogues is one of many rare manuscripts in the University of Rochester's River Campus Libraries.
by Zach Davis
The Middle English Text Series (METS) partnered with Cast Iron Coding to modernize its digital platform. Using modular architecture, TEI workflows, and accessible design, the project ensured long-term scalability and usability. The new platform preserves METS’ mission of open access to Middle English literature for diverse academic and public audiences.
The Middle English Text Series (METS), housed at the Rossell Hope Robbins Library at the University of Rochester, was established in 1990 with the goal of providing authoritative and accessible editions of Middle English literature to the widest possible audience.
Since its inception, METS has published over one hundred high-quality print and digital editions of texts. In many cases, these texts had been available only in rare, expensive editions that students, scholars, and the general public could not easily access. As the internet increasingly moves toward paywalls, machine-generated content, and walled gardens, groups like METS are doing critical work to ensure these carefully edited literary artifacts remain open and accessible.
METS approached Cast Iron after receiving a grant from the National Endowment for the Humanities that included funding to significantly improve their digital editions. Our experience with digital publishing technologies, approaches, and workflows made us a natural fit for the project, and after a competitive RFP process, METS selected Cast Iron as its design and development partner.
We liked the values of CIC, the work they had done previously, their understanding of the needs and niche, and overall we just like talking to them - we have good conversations.
Anna Siebach-LarsenDirector, Rossell Hope Robbins Library
Our team was excited to dig into the more challenging parts of the project. Through our work on Manifold we’d learned a lot about how to build browser-based reading interfaces, and we were eager to apply those lessons to METS’ varied collection of texts, which includes poetry, prose, drama, and even musical scores.
The METS site, running on an old instance of Drupal CMS, faced issues with accessibility, design, and organization due to inconsistent HTML markup and insufficient metadata. Stakeholders agreed that a comprehensive rebuild and platform migration were needed.
Previously, the METS team had invested time and resources in incorporating TEITEI, short for Text Encoding Initiative, is a standardized markup language for representing texts in digital form, particularly in the humanities. Based on XML, TEI provides a framework for encoding structural, linguistic, and semantic features of texts, making them machine-readable and preserving their complexity. into their production workflow. This workflow starts with TEI documents, which are transformed into typeset InDesign files for the print edition. The METS team needed a platform that could ingest these same TEI files and transform them into digital publications.
Indesign
Print Edition
TEI Documents
TEI Processor
Digital Edition
Indesign
Print Edition
TEI Documents
TEI Processor
Digital Edition
As we worked through discovery, the problems we needed to solve began to become clear:
Look and Feel. The METS brand and the overall aesthetic, untouched for many years, needed to be updated and modernized.
Organization. METS editions often collect distinct texts with prefatory, explanatory, and reference sections. We needed to develop information architecture that fully supported the structure of METS editions.
Discoverability. Readers needed more robust tools to find texts across all the editions and to filter texts and editions by genre, period, category, keyword, and language.
Reader Experience. The reading interface was clunky and outdated, and the site wasn’t following current best practices around responsiveness and accessibility.
Staff Experience. The METS team needed to be able build editions, ingest TEI and HTML sections, and manage metadata.
The project budget was tight, and it was clear that there wasn’t an off-the-shelf product that would address the requirements. Luckily, Cast Iron has years of experience building scalable, sustainable, custom software within constrained academic budgets.
The Drupal site that we were replacing was fundamentally composed of blocks of HTML entered into the content management system (CMS). As such, it lacked a clear separation between content and its presentation, nor was there a single source of truth for each piece of content. Platforms that do not decouple content from presentation tend to be rigid and difficult to update and scale.
Rather than repeat the approach of building the entire platform in a CMS, our team proposed using targeted technologies for each part of the platform. We would use a headless CMSA headless CMS is a CMS that provides a content editing interface and asset management but is not responsible for presenting that content on the frontend. Instead, a separate frontend application pulls content from the CMS via an API and displays it. This approach increases flexibility, performance, scalability, and developer experience. for editorial and marketing content. Editions, on the other hand, would need to be stored in a stand-alone application that provided API endpoints for creating, updating, ingesting, and deleting edition content. We used Rails, a mature and robust framework, for the Editions API which was more scalable and cost-effective than trying to build application-level functionality in a CMS.
Editions API
Keycloak
Craft CMS
Frontend (Next.js)
Editions Admin (Next.js)
Editions API
Keycloak
Craft CMS
Frontend (Next.js)
Editions Admin (Next.js)
Our experience on this and other projects has been that modular architectures enable us to make smart technology selections for each functional requirement. This approach decreases development time while increasing scalability, since components can be updated or replaced independently of other components. Container technologiesA container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably., such as Docker, reduce the overhead that can come with deploying and hosting more components, since they outsource maintenance of much of the underlying infrastructure to community maintainers and hosting providers.
The Craft Content Management System (CMS)
For editorial content such as submission guidelines, staff information, and about pages, we used Craft CMS, an open source, PHP content management system that can be used headlessly. Our team modelled pages and content blocks in Craft, which METS staff use to build visually consistent pages on the website. While most of the site content is in the form of full text editions, Craft gives us tools to easily model new types of content in the future, such as events, press releases, and blog posts.
API-powered Digital Editions
Why not host the full text METS digital editions in Craft as well? The texts themselves were too complex to store in Craft (or in any CMS), and CMSs are generally trying to solve different problems. The ingestion process needed to parse TEI documents, transform them into data structures that could be easily rendered in the reader, and intelligently cache the results. To accomplish this, we built an API-only Rails application that could ingest, store, and manage the editions content while making it readable and writable over a GraphQL API.A GraphQL API is a flexible and efficient query language and runtime that allows clients to request exactly the data they need from a server, using a single endpoint.
Front-end Experience
The platform is backed by two APIs: the content API and the editions API. But we wanted end users to have a unified experience. The third component in the stack, the frontend, was a React and Next.js application that queried both APIs. This application was also responsible for rendering the reader, which is visually distinct from the rest of the site.
Administering and Editing the Editions
We also needed to expose an editing interface for METS editions, which we called the Editions Admin. To create an edition, METS needed a drag and drop interface to define the nested structure of a text and its table of contents. They also needed interfaces to ingest TEI documents as text sections, and tools for editing metadata and managing related records such as contributors, genres, periods, languages, etc.
Authentication and Single Sign-On
METS staff needed to login to Craft to manage editorial content and to the Editions Admin to manage the editions themselves. Because the same users were accessing both systems, we incorporated Keycloak, an open-source identity and access management solution that provides features like single sign-on, user authentication, and authorization for web and mobile applications. Delegating the complexity that comes with authentication and authorization to a mature, actively maintained third-party component helps reduce the total cost of ownership while increasing security.
Projects like this often exist outside of the core mission of University IT departments, and as such can suffer from neglect or lack of maintenance over time. The last thing we want to do is deploy a new project on servers that ultimately won’t be patched or supported. We wanted what we were building to be sustainable, which is why we proposed a relatively stateless architectureStateless hosting architecture refers to a design approach where servers or infrastructure components do not store application state locally. This ensures that individual servers or nodes remain stateless, making the architecture highly scalable, resilient, and easy to manage. with a managed hosting provider.
We advised the METS team to host the entire stack in the Digital Ocean App Platform with a managed PostgreSQL database, and we worked with the University’s IT staff to get buy-in on this approach and to help them establish a relationship with Digital Ocean.
With the App Platform our team defines a specification for the app that includes each of the components described above. The project’s source code repositories each include Docker files that are used to build a Docker image for each component. Whenever a developer commits a change to the stack, Github Actions are used to automatically build images for the changed component and push them to a private Docker image repository. This in turn triggers a deployment of the application on the App Platform. Failed deployments are automatically rolled back.
This approach—we’ve used it on many projects now—allows our team to deploy multiple small changes per day without having to spend time on deployment, which ensures that METS budget can be spent on new features instead of managing deployments. Failed deployments are automatically rolled back, and there’s zero downtime when new versions of the platform are deployed. In addition, we can easily scale the environment up or down as needed. The cost is reasonable, and while not as robust as AWS, Digital Ocean’s offering is much simpler and easier to manage, making it an appropriate choice for the small METS team.
The App Platform provides intuitive monitoring and allows us to easily scale the platform up or down as needed.
The new METS platform stores all persistent data in S3Amazon S3 (Simple Storage Service) is a scalable, cloud-based object storage service that enables users to store and retrieve large amounts of data securely. compatible buckets and in a managed database that is automatically backed up and upgraded by the hosting provider. Because the rest of the platform is stateless, it can be completely torn down and recreated in a matter of minutes.
In practice, this means that aside from unavoidable updates to dependencies within each component, there is very little ongoing maintenance. The METS team can rest assured that much of the hosting complexity has been outsourced to a reliable, affordable provider like Digital Ocean, and that their site will continue to function as expected. University IT doesn’t need to worry about patching servers or updating operating systems because everything runs in containerized environments on infrastructure managed by the upstream host.
After the discovery process and developing a strategy with the METS team, our design team began working on high-level navigation and architecture. We put together a high-level sitemap to better visualize navigation.
A simple, high-level sitemap helped the team focus on what content would need to be produced.
From there we performed an analysis of different editions to better understand how METS editions could be structured. The goal was to come up with a sufficiently abstract data model that would support current and future editions, ensuring this solution would grow with the project. This visualization of the basic structure was a helpful tool when working with the METS project manager, and evolved over the course of the project.
Meanwhile, the backend team worked with stakeholders to identify the exact range of TEI tags that we would need to support and to define how they should present in the reader. They also worked on identifying what properties and taxonomies would need to be present on each of the core data types.
After a couple rounds of iterating over wireframes, our design team presented concepts showing distinct typography and color choices. Our design team paid particular attention to common accessibility requirements during this phase to ensure all concepts had sufficient text size, contrast, etc. The design evolved through multiple rounds followed by production design.
The first round of design included three distinct concepts.
After design was completed, the team started on development.
Backend Work: Our backend team was responsible for building the API application. After creating the core models, they built services to ingest TEI files and transform them into a nested data structure that was exposed in the GraphQL API.
Frontend Work: Meanwhile, our frontend team was building the METS reader, the Editions Admin application, and the frontend editorial views.
Building the reader was one of the more challenging aspects of this project. Publishing a digital edition begins with the TEI produced by the METS team. TEI is just XML that describes textual content. In the following example, you can see the first three lines of a Middle English poem that's meant to be rendered on the verso (left) page, followed by the same lines translated into modern English on the rect (right) page.
The Editions API ingests this TEI and transforms it into a JSON tree structure, which is stored in the database and delivered to the reader (or to scholars wishing to do textual analysis) through the Editions GraphQL API. Feel free to explore the following slightly condensed JSON for this short poem. The snippet is expanded to view the second verso line.
json
{1 item
"nodeSet":[3 items
0:{...}5 items
1:{6 items
"tag":string"div"
"kind":string"VERSOTEXT"
"type":string"versotext"
"children":[1 item
0:{5 items
"tag":string"lg"
"kind":string"VERSE_LINE_GROUP"
"children":[3 items
0:{...}5 items
1:{5 items
"tag":string"l"
"kind":string"VERSE_LINE"
"children":[2 items
0:{5 items
"tag":string"space"
"kind":string"SPACE"
"rend":string"indent1"
"position":int1
"contentMode":string"PRIMARY"
}
1:{4 items
"kind":string"TEXT"
"content":string"And thi strengthe woketh,"
"position":int2
"contentMode":string"PRIMARY"
}
]
"position":int2
"contentMode":string"PRIMARY"
}
2:{...}5 items
]
"position":int1
"contentMode":string"PRIMARY"
}
]
"position":int2
"contentMode":string"PRIMARY"
}
2:{...}6 items
]
}
When a user reads a text section, the reader recursively loops through this JSON data structure and maps each element (VERSOTEXT, VERSE_LINE_GROUP, VERSE_LINE, TEXT, etc) to a React component. The end result is this simple, elegant reading experience:
The METS reading interface
Using React components to render the TEI nodes allowed us to incorporate dynamic functionality such as tool tips for glosses and the ability to change how the text is presented on the fly. This component-based approach also makes it possible to support the METS team as they incorporate new parts of the TEI spec into the process. New TEI nodes can be added to texts and our team can easily create corresponding React components to present the new node types.
As development wrapped up, it was time to start migrating content from the Drupal site into the new platform. Our team built a service that allowed METS staff to create an archive that included either TEI or HTML source documents, cover images, and a json file with metadata about the edition. These archives could then be imported into the Editions Admin interface and extracted into completed editions.
METS was fortunate to have assistance from a library developer to assist with content migration. To speed this process up, Cast Iron built a service in the editions API that allowed an edition to be ingested from an archive file that included source documents and metadata about the edition. METS’ developers created an export service that extracted content from Drupal and transformed it into archives that could be ingested. Our two teams worked together to document and refine this approach until all editions had been migrated.
Along the way, our team met with the METS team every couple of weeks to review progress, address blockers, and collaboratively solve problems as they arose. After content was imported, we worked closely with METS on testing, quality assurance, and revisions.
The impact of this project has been overwhelmingly positive, with feedback from both users and the METS team highlighting its transformative effect. Readers have praised the new site’s design, usability, and enhanced functionality, describing it as a “game-changer.” Specific features such as the search functionality and the ability to toggle notes on and off have been particularly well received.
The project has notably elevated METS' online presence, which has in turn led to a significant increase in interest from potential contributors. More authors are now reaching out, with many specifically asking to publish directly on the platform—a promising sign of the site’s positive reception. Internally, the METS staff has also experienced a profound shift in how they operate. Instead of constantly troubleshooting, the team can now focus on long-term growth, new initiatives, and expanding their publication schedule. Training has also improved dramatically—what once took nearly a year can now be accomplished quickly with prerecorded training sessions and documentation.
We are finally able to meet the needs of our users in a proactive way, and work in a way that is sustainable on our end. Rather than just always thinking about putting out fires, we can think about how we want to grow and develop in the future.
Anna Siebach-LarsenDirector, Rossell Hope Robbins Library
Looking ahead, the METS team is eager to continue collaborating with our team to further develop the platform. They anticipate expanding its functionality, incorporating new types of works such as music, and refining the user experience based on ongoing feedback. The METS team emphasized that while the initial project was guided by a clear set of needs, future work would benefit from even closer collaboration with Cast Iron, allowing for innovative problem-solving from the outset. With strong momentum and a clear vision for growth, this project has set the stage for an exciting next phase—one that both METS and CIC are excited to explore together.
xml
<text> <body> <anchor xml:id="Fein-Owl-089-Art22-Signs-Death-FP-Verse" /> <div type="versotext" xml:lang="enm"> <lg> <l> <locus type="foliation">fol. 189r</locus> <space rend="indent1" /> Hwenne <note type="tnote-indicator" n="1">T</note> thin heou bloketh, </l> <l> <space rend="indent1" /> And thi strengthe woketh, </l> <l> <space rend="indent1" /> And thi neose coldeth, </l> <!-- truncated --> </lg> </div> <div type="rectotext" xml:lang="en"> <lg> <l> <locus type="foliation">fol. 189r</locus> <space rend="indent1" /> When your hue grows pale, </l> <l> <space rend="indent1" /> And your strength weakens, </l> <l> <space rend="indent1" /> And your nose grows cold, </l> <!-- truncated --> </lg> </div> </body></text>
<text> <body> <anchor xml:id="Fein-Owl-089-Art22-Signs-Death-FP-Verse" /> <div type="versotext" xml:lang="enm"> <lg> <l> <locus type="foliation">fol. 189r</locus> <space rend="indent1" /> Hwenne <note type="tnote-indicator" n="1">T</note> thin heou bloketh, </l> <l> <space rend="indent1" /> And thi strengthe woketh, </l> <l> <space rend="indent1" /> And thi neose coldeth, </l> <!-- truncated --> </lg> </div> <div type="rectotext" xml:lang="en"> <lg> <l> <locus type="foliation">fol. 189r</locus> <space rend="indent1" /> When your hue grows pale, </l> <l> <space rend="indent1" /> And your strength weakens, </l> <l> <space rend="indent1" /> And your nose grows cold, </l> <!-- truncated --> </lg> </div> </body></text>