Skip to main content

Should we rebuild our research prototype or refactor it before a school pilot?

Usually, refactor. Keep the research core and replace the layers a pilot exposes: saving, logins, deployment and logging. A focused refactor takes 3–6 weeks of engineering. A full rewrite takes 10–16 weeks, and most pilot calendars can’t fit that in before the school year starts.

Signs to refactor and signs to rewrite

In a research prototype, the valuable part is usually the core: the task design, the scoring logic and the prompts. The weak part is usually the plumbing, and a pilot puts pressure on exactly that.

Question Points to refactor Points to rewrite
Can the data model hold what the study measures? Yes, with new fields or an event log beside it. No. Outcomes live in free text, local storage or screenshots.
How does student work get saved? To a real database, though saves sometimes fail or race. In the browser only, or in files on one laptop.
Can someone other than the author deploy it? Yes, with a written list of steps. No. Only the graduate student can, and they are leaving.
What happens when you fix one bug? It stays fixed. Two others appear, and there are no tests to catch them.
How much of the code is the research? Most of it, and it is readable. Very little. Most of it is scaffolding.

If most answers fall in the middle column, refactor. If three or more fall in the right column, plan a partial or full rebuild, but keep the prototype running for demos and as the reference the new version must match.

How long each path takes, and what it costs

These are general ranges for one web app with a student flow and a teacher view, at our rate of $85 an hour.

Path What it covers Calendar time Cost at $85/hour
Targeted refactor Reliable saves, SSO, event logging, one deployment pipeline, tests on risky paths 3–6 weeks $10,200–$20,400
Partial rebuild Keep the research core, replace the data layer and authentication 6–10 weeks $20,400–$34,000
Full rewrite New codebase, with the prototype as the reference version 10–16 weeks $34,000–$54,400

Four things move a project within its range: the number of user roles, the SSO provider the district requires, how much data has to be migrated, and whether the study design is still changing. A changing design costs the most, because it keeps resetting the work.

We once took a research prototype to a district-approved classroom pilot in under 30 days, with 20 teachers in two districts. That timeline worked because the core was sound, so the sprint could go to reliability and the district review. Thirty days is not enough for a rewrite and a district review together.

What breaks first on a school network

  1. Content filters block a domain the app depends on, such as a CDN, a WebSocket endpoint or an LLM API.
  2. Managed Chromebooks clear local storage or block third-party cookies, so anything saved only in the browser is lost.
  3. Login fails because districts expect Google Workspace or Clever sign-in, and the prototype supports neither.
  4. Concurrency breaks when 30 students start at once: saves race, and free-tier databases or model APIs start rate-limiting.
  5. Device policy blocks microphone or camera access, and audio tasks fail without a clear error.

Almost all of these can be fixed with a refactor. Give the district’s IT reviewer a list of every domain the app uses, confirm every save on the server, add SSO, and load-test at full classroom size before the first teacher logs in.

When a graduate student should keep building

  • The work is design-based research or usability testing, and the interaction changes week to week.
  • There is no pilot date, no data use agreement and no outcome data a funder will audit.
  • The student has a year or more left and their thesis depends on the system.

Bring in a team once there is a fixed pilot date, data from minors under a data use agreement, a graduating student, or a funder expecting a production platform. At that point reliability is research validity: a save that fails one time in fifty is missing outcome data.

Keep the student involved as the domain expert. FERPA and, for children under 13, COPPA shape the privacy design, and your institution’s counsel or compliance office decides what they require.

Frequently asked questions

How do I know if my research prototype needs a full rewrite?
Rewrite when the core can’t be trusted. That means the data model can’t represent what the study measures, student work is saved only in the browser, or every bug fix breaks something else. If the problems are in saving, login and deployment, a 3–6 week refactor is usually enough.

How long does it take to make a prototype ready for a school pilot?
A targeted refactor typically takes 3–6 weeks. A partial rebuild takes 6–10 weeks, and a full rewrite takes 10–16. Add time for the district’s IT review, and keep the study design fixed while the work is under way.

What usually breaks when research software runs on a school network?
The usual culprits are content filters blocking a domain, managed Chromebooks clearing browser storage, missing Google or Clever sign-in, and saves colliding when a whole class starts at once. Most of these can be fixed without rewriting the research logic.

Should our graduate student keep developing the software?
Yes, while the work is exploratory and there is no fixed pilot date or data use agreement. Once a pilot date, a funder’s production expectations or the student’s graduation is on the calendar, bring in engineers to own deployment and data integrity. Keep the student involved as the domain expert.

Can we rebuild the platform while the pilot is running?
It’s risky, because it can change the intervention partway through the study. The safer pattern is to refactor for the current pilot and freeze the version students use. Then build the next version in parallel for the following cohort.

Related answers

Deciding between a refactor and a rebuild before your pilot?

We offer a free 30-minute review of your pilot plan or the technical section of your proposal. Bring the prototype’s repository or a demo, your pilot timeline and your funder’s requirements. Start a conversation.