---
title: "Deploy School Timetable Generator"
description: "Build school timetables with an AI timetabler and OR-Tools solver"
category: "AI/ML"
url: https://railway.com/deploy/school-timetable-generator
---

# Deploy School Timetable Generator

Build school timetables with an AI timetabler and OR-Tools solver

**[Deploy School Timetable Generator on Railway](https://railway.com/template/school-timetable-generator)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/school-timetable-generator/manifest.json

- **Creator:** Joe Tay's Projects
- **Category:** AI/ML
- **Total deploys:** 1

## Template content

### timetable_generator

- **Source:** twahidin/timetable_generator
- **Public domain:** Yes

## Documentation

# Deploy and Host School Timetable Generator on Railway

School Timetable Generator is a web app that builds a whole-school timetable from a step-by-step setup of classes, teachers, rooms, subjects and student groups. An OR-Tools solver places the lessons while an AI timetabler talks the committee through any conflicts, then teachers and students open the published timetable and download PDFs.

## About Hosting School Timetable Generator

Each school runs its own deployment: one Python web service built from the included Dockerfile. Attach a volume at /data so the saved setup, generation runs and published timetable survive redeploys. Set SECRET_KEY and separate access codes for the committee, teachers and students, then choose an AI provider (Anthropic, OpenAI or OpenRouter) and add its API key, or set AI_PROVIDER=mock to try the whole flow without one. The solver uses every vCPU it is given, so more CPU gives better timetables in the same solve time; about 1 GB of memory is enough for a 1,500-student school.

## Common Use Cases

- Timetable committees generating a full secondary or primary school timetable, with the AI explaining and resolving clashes before publishing
- Teachers looking up any class, teacher, room or student timetable, searching lessons and checking who is free
- Students building their own timetable from their class and subject groups, or opening it with a personal access code, and downloading PDFs

## Dependencies for School Timetable Generator Hosting

- A Railway volume mounted at /data
- An API key from Anthropic, OpenAI or OpenRouter (optional: mock mode and Generate without AI work without one)

### Deployment Dependencies

- Google OR-Tools (CP-SAT solver), installed from requirements.txt
- Source code and docs: https://github.com/twahidin/timetable_generator

### Implementation Details

Set these service variables before the first deploy:

```
SECRET_KEY=
COMMITTEE_CODE=&lt;6+ letters or digits&gt;
TEACHER_CODE=&lt;6+ letters or digits, different from the others&gt;
STUDENT_CODE=&lt;6+ letters or digits, different from the others&gt;
AI_PROVIDER=anthropic   # or openai, openrouter, mock
AI_API_KEY=
AI_MODEL=claude-sonnet-5-5
SCHOOL_NAME=
SOLVE_SECONDS=300       # optional, time for one solve
```

Then go to Settings &gt; Networking &gt; Generate Domain, open it and sign in with the committee code. Keep one gunicorn worker (with threads), because a generation run lives in the web process.

## Why Deploy School Timetable Generator on Railway?


Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying School Timetable Generator on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius v0.1 Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.

Open this page in a browser: https://railway.com/deploy/school-timetable-generator
