Better Intra — Campus Data
How to add your campus
- Find your campus ID from the campus list
- Create a
{name-slug}_clusters.jsonfile using the lowercase-hyphenated campus name (e.g.,belgium_clusters.json,le-havre_clusters.json) - Update
campuses.jsonto include your campus — thenamefield determines the filename - Submit a pull request
Seat definitions can be added later — start with just "definitions": {}.
File structure
campuses/
├── README.md
├── campuses.json Campus list (id → name mapping)
├── belgium_clusters.json
├── le-havre_clusters.json
└── ...
campuses.json format
{
"campuses": [
{ "id": "12", "name": "Belgium" },
{ "id": "67", "name": "Warsaw" }
]
}
id— numeric campus ID from the 42 API (as a string)name— display name, determines the cluster filename ({lowercase-hyphenated}_clusters.json)
{name-slug}_clusters.json format
{
"clusters": [
{ "id": "20", "name": "shi" },
{ "id": "21", "name": "fu" }
],
"definitions": {
"shi": {
"rows": [
{ "range": "r1-r5", "pos": [1, 3, 5], "dir": "UP" }
],
"manual": [
{ "row": "r6", "pos": [1, 2, 3], "dir": "DOWN" }
],
"overrides": {
"r1-p2": "LEFT"
}
}
}
}
Fields
clusters[]— list of clusters on this campusid— cluster ID from the 42 APIname— short lowercase name (used for seat matching)
definitions— map of cluster name → seating layoutrows[]— range-based seatingrange— row range like"r2-r11"pos— position numbers-
dir— screen direction:"UP""DOWN""LEFT""RIGHT""NONE"
manual[]— per-row seating without rangerow— row name like"r1"or"c1"pos— position numbersdir— same as above
overrides— per-seat direction overrides- Key format:
"{row}-p{pos}"(e.g.,"r1-p2") - Value: same direction as above
- Key format: