Daniel Bae
Menu

Concept art from Arcane

UCLA’s official directory is the obvious place to start and the wrong place to stop. Bruin Clubs merges it with the groups that live on other pages.

Bruin Clubs lists 1,863 UCLA student groups in one searchable place. It is independent: UCLA does not run it, and for anything official UCLA’s own organization search is the tiebreaker. The first question was where the list should come from. UCLA publishes a registry of registered campus organizations, and it is the obvious source. It is also not the whole list.

What the registry leaves out

Of the 1,863 entries, 1,614 are registered organizations, every entry in UCLA’s public registry except its test records. The other 249 come from pages the registry does not cover:

  • 143 school clubs. Professional schools and departments list these on their own sites and not in the central registry: Anderson’s MBA clubs, Dentistry, Medicine, Luskin, Education and Information Studies, Nursing, Engineering, Public Health, Arts, and several departments’ graduate student associations.
  • 60 club sports, from UCLA Recreation’s pages.
  • 35 campus ensembles, the Bruin Marching Band and the School of Music ensembles that are open to students outside the major.
  • 11 government, media and other groups: student government, residence councils, the Daily Bruin and a few more.

Anything that lives only on a school’s or Recreation’s own pages is invisible to a list built from the registry, which is how a list that starts and ends there ends up missing whole categories.

The Bruin Clubs home page: a search box, the count of groups by type, and the start of the browse-by-area list.
The home page. The table on the right is the breakdown above; the grid below it starts the browse-by-area list.

Five kinds of entry, one shape

Whatever its source, a group becomes one entry in a single dataset. An entry has a type (the five kinds above, with the last one split into government, media and other), one of 15 browse areas, categories, who can join (undergraduates, graduates, both, or staff), a description, its email and social links and website, any sign-up form or group chat, a “how to join” text, and former names. The description carries a label for where it came from, and the club page shows that label, so a reader can tell the club’s own words from a summary written elsewhere.

Registered organizations are identified by their registry ID and everything else by a slug made from its name. When the registry renames a group, saved lists keep working and the old name’s address redirects to the new page. 220 groups are marked as new this year. Registration renews every fall, so the dataset has to be rebuilt after each round.

Some of the data is untidy, and the dataset keeps it that way. A few entries look like the same group registered twice. UCLA lists both, so both stay, and the build prints a warning and does not choose for UCLA. Some registered organizations have no description anywhere public, and those pages show only what exists, such as a category, an email and an Instagram account.

Rebuilding the dataset

The dataset is built by Python scripts. One re-pulls the registry and the club sports pages. The school clubs and ensembles are curated by hand and do not refresh on their own. build.py merges the sources and validates them before it writes anything, and it refuses to write at all if the data is broken: an unknown category or member type, duplicate names, malformed URLs or emails, leftover HTML or garbled text, or a registry with implausibly few organizations. Things that deserve a look but are not wrong, such as possible duplicates and dead links, are printed as warnings and kept.

The output is one JSON file that the server loads, plus the same data as an offline page, a spreadsheet and a CSV. A --check mode compares the committed files with a fresh build.

A Go server with SQLite

Apart from a pure-Go SQLite driver and golang.org/x/crypto, the server is the Go standard library: net/http routes written as method and path, html/template, and embed for the templates and static files. The dataset is read into memory when the server starts, and search and browsing run over it there. SQLite is for the parts that belong to a visitor, such as accounts and the clubs they have saved.

Every page is rendered on the server. A small script adds instant search, one-tap saving and a search palette on top; its first comment says every feature works without it.

Search folds case and accents, and each word of a query has to appear somewhere in a group’s name, description, categories, area or type. A short hand-written table of aliases widens a few common words, so “premed” also finds “pre-health”. A match in the name outranks one in the description. Filters cover the area, the type, who can join, whether the group is new this year, and whether it lists a sign-up form or a group chat.

The 15 browse areas include Tech & Engineering, Medicine & Dental, Greek Life and Sports & Recreation, and each club belongs to exactly one.

How to join

Each club page has a “How to join” section. Where specific, current details are known they are shown. For the rest the page gives the usual process for that kind of group, such as tryouts for club sports, auditions for performing groups and recruitment for Greek chapters, and it says that this is the typical process and not that club’s own. The links are listed in order of how direct they are: sign-up forms first, then Discord and other group chats, then mailing lists and event calendars.

Speed and reach

A page takes about 1 ms to render on the server, and the median page load for real visitors is about 0.24 seconds. More than 800 students have visited without any paid promotion, and 63% of them arrived from Google.

Share

TopicsGoPython

Written by Daniel Bae

Computer science student at UCLA. I build desktop, web and command-line software in Rust, Go and Python, and write here about how it is made. About this site