Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/alexjohntomy/you-eye-sea/llms.txt

Use this file to discover all available pages before exploring further.

YouEyeSea stores UIC grade distribution data in a PostgreSQL database managed by Prisma. The schema defines six models that capture departments, courses, professors, per-semester grade records, and user-generated content. Understanding these models helps you navigate the codebase, write queries, and seed your own database.

Overview of relationships

  • Course belongs to one Department (via departmentID).
  • CourseInstance links one Course to one Professor and stores the actual grade counts for a given semester. This is the central model for all grade data.
  • Comment can be attached to either a Course or a CourseInstance.
  • Review can be attached to either a Course or a Professor.
prisma/schema.prisma
generator client {
  provider = "prisma-client"
  output   = "../src/generated/prisma"
}

datasource db {
  provider = "postgresql"
}

model Department {
  code    Int      @id
  name    String
  courses Course[]
}

model Professor {
  id            Int              @id @default(autoincrement())
  name          String           @unique
  coursesTaught CourseInstance[]
  reviews       Review[]
}

model Course {
  subject        String
  number         Int
  title          String
  department     Department       @relation(fields: [departmentID], references: [code])
  departmentID   Int
  CourseInstance CourseInstance[]
  comments       Comment[]
  reviews        Review[]

  @@id(name: "courseName", fields: [subject, number])
}

// For example, the grade data for CS 342, taught by Professor Mark, in Fall 2025 at 8 AM
model CourseInstance {
  courseInstanceID Int       @id @default(autoincrement())
  course           Course    @relation(fields: [courseID, courseNumber], references: [subject, number])
  courseID         String
  courseNumber     Int
  professor        Professor @relation(fields: [professorID], references: [id])
  professorID      Int
  A                Int
  B                Int
  C                Int
  D                Int
  F                Int
  ADV              Int
  CR               Int
  DFR              Int
  I                Int
  NG               Int
  NR               Int
  O                Int
  PR               Int
  S                Int
  U                Int
  W                Int
  total_students   Int
  semester         String
  comments         Comment[]

  @@index([courseID, courseNumber])
  @@index([professorID])
}

model Comment {
  id               Int            @id @default(autoincrement())
  comment          String
  date             DateTime       @default(now())
  author           String?
  courseInstance   CourseInstance? @relation(fields: [courseInstanceID], references: [courseInstanceID])
  courseInstanceID Int?
  course           Course?        @relation(fields: [courseID, courseNumber], references: [subject, number])
  courseID         String?
  courseNumber     Int?

  @@index([courseID, courseNumber])
}

model Review {
  id           Int        @id @default(autoincrement())
  review       String
  stars        Int?
  date         DateTime   @default(now())
  author       String?
  professor    Professor? @relation(fields: [professorID], references: [id])
  professorID  Int?
  course       Course?    @relation(fields: [courseID, courseNumber], references: [subject, number])
  courseID     String?
  courseNumber Int?

  @@index([courseID, courseNumber])
  @@index([professorID])
}

Department

Represents an academic department at UIC. Each department has a numeric code used by UIC’s official data.
code
Int
required
Primary key. UIC’s numeric department code (e.g., 2650 for Computer Science).
name
String
required
Full human-readable department name (e.g., "Computer Science").
courses
Course[]
All courses that belong to this department. Populated via the Course.departmentID foreign key.

Professor

Represents a UIC instructor. Each professor record is unique by name and aggregates all course sections they have taught.
id
Int
required
Auto-incremented primary key.
name
String
required
Instructor’s full name. Must be unique across all records.
coursesTaught
CourseInstance[]
All CourseInstance records linked to this professor — one per course section per semester.
reviews
Review[]
User-submitted reviews targeting this professor.

Course

Represents a course offering at UIC, identified by its subject code and course number (e.g., CS 342). The composite primary key is [subject, number].
subject
String
required
Department subject abbreviation (e.g., "CS", "MATH", "ENGL"). Part of the composite primary key.
number
Int
required
Course number (e.g., 342). Part of the composite primary key.
title
String
required
Full course title (e.g., "Software Design").
department
Department
required
The department this course belongs to. Resolved via departmentID.
departmentID
Int
required
Foreign key referencing Department.code.
CourseInstance
CourseInstance[]
All historical grade records for this course across all professors and semesters.
comments
Comment[]
User-submitted comments attached to this course.
reviews
Review[]
User-submitted reviews attached to this course.
The composite @@id(name: "courseName", fields: [subject, number]) constraint means you must always supply both subject and number when querying or relating to a Course.

CourseInstance

The most important model in the schema. Each row represents grade data for one course section taught by one professor in one semester — for example, CS 342 taught by a specific instructor in Fall 2025. Grade counts are stored as raw integers for every UIC grade code.
courseInstanceID
Int
required
Auto-incremented primary key.
courseID
String
required
Subject abbreviation of the related course (e.g., "CS"). Foreign key component referencing Course.subject.
courseNumber
Int
required
Course number of the related course (e.g., 342). Foreign key component referencing Course.number.
professorID
Int
required
Foreign key referencing Professor.id.
A
Int
required
Number of students who received an A.
B
Int
required
Number of students who received a B.
C
Int
required
Number of students who received a C.
D
Int
required
Number of students who received a D.
F
Int
required
Number of students who received an F.
ADV
Int
required
Advanced standing / transfer credit count.
CR
Int
required
Credit (pass/fail passing) count.
DFR
Int
required
Deferred grade count.
I
Int
required
Incomplete grade count.
NG
Int
required
No grade reported count.
NR
Int
required
Not reported count.
O
Int
required
Other grade count.
PR
Int
required
In progress count.
S
Int
required
Satisfactory count.
U
Int
required
Unsatisfactory count.
W
Int
required
Withdrawal count.
total_students
Int
required
Total enrolled students in this section, as reported in UIC’s source data.
semester
String
required
Semester label (e.g., "Fall 2025" or "Spring 2024").
comments
Comment[]
User-submitted comments attached to this specific course instance.
Two composite indexes are defined on CourseInstance: @@index([courseID, courseNumber]) for course lookups and @@index([professorID]) for professor lookups. These are essential for query performance when aggregating grade data.

Comment

A user-submitted text comment. A comment targets either a specific CourseInstance (a particular semester/professor pairing) or a Course in general — both foreign key sets are nullable.
id
Int
required
Auto-incremented primary key.
comment
String
required
The comment text.
date
DateTime
required
Timestamp the comment was created. Defaults to the current time.
author
String
Optional display name for the comment author.
courseInstanceID
Int
Optional foreign key referencing CourseInstance.courseInstanceID. Set when the comment is tied to a specific semester section.
courseID
String
Optional subject abbreviation. Part of the composite foreign key referencing Course when the comment is tied to a course in general.
courseNumber
Int
Optional course number. Part of the composite foreign key referencing Course when the comment is tied to a course in general.

Review

A user-submitted review with an optional star rating. A review targets either a Course or a Professor — both foreign key sets are nullable.
id
Int
required
Auto-incremented primary key.
review
String
required
The review text.
stars
Int
Optional star rating (typically 1–5).
date
DateTime
required
Timestamp the review was created. Defaults to the current time.
author
String
Optional display name for the review author.
professorID
Int
Optional foreign key referencing Professor.id. Set when the review targets a professor.
courseID
String
Optional subject abbreviation. Part of the composite foreign key referencing Course when the review targets a course.
courseNumber
Int
Optional course number. Part of the composite foreign key referencing Course when the review targets a course.

Build docs developers (and LLMs) love