docs: README and architecture refresh#73
Draft
V-prajit wants to merge 2 commits into
Draft
Conversation
…peline diagrams Replace the short marketing-style README with an accurate description of what MavGrades does, how the Next.js app + bundled SQLite architecture works, and how the offline grade-data (FOIA CSV -> SQLite) and RMP scraping pipelines fit together. Adds problem statement, key technical decisions, setup/usage/testing/deployment sections, known limitations, and team attribution based on git history. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AgTQuyVtSaLeAFNSSXW4kv
- Correct LRU cache scope: only /api/grades and /api/professor-rating use lru-cache; /api/courses/search uses a persistent SQLite connection with PRAGMA cache_size/temp_store instead. Fixed both the architecture diagram edge and the Key technical decisions prose. - Reword the pull.yml deployment note: the hard-reset rule targets a master base on the upstream template, a separate branch from this repo's main default, not an active auto-sync of main. - Remove all em dashes per style guide, replacing with colons/commas.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why it matters
The previous README (about 1.5KB) was a generic tech-stack/quick-start list with no explanation of what MavGrades actually does, how data gets from UTA's public records office into the running app, or what the API surface looks like. New contributors and the ACM UTA team had no single accurate reference for the architecture.
Docs changed
README.md— full rewrite, plus a follow-up accuracy/style pass.Diagrams added
src/app/api/*/route.ts,src/lib/db.ts, and the components undersrc/app/components. Updated so/api/courses/searchconnects directly togrades.sqlitevia its persistent connection (PRAGMA cache_size/temp_store), not through the LRU-cache node — that route does not importlru-cache.csv_to_json.py->json_to_sqlite.cjs-> committedgrades.sqlite) plus the separatescrape_rmp.py->professors.dbpath, derived frompublic/data/*.py,public/data/*.cjs,package.json'sprocessscript, andpublic/data/README.md.Both diagrams are Mermaid
flowchart, checked for balanced brackets/quotes.Metadata changed
gh repo editdescription/topics update (see separate commit-less metadata step; recorded in the audit artifact for this repo). Homepage left unchanged (https://www.mavgrades.com, verified 200 today).Metrics used
public/data/raw/*.csvand the tables insidepublic/data/grades.sqlite.grades.sqlitesize (~21MB) — verified withdu -sh.curl -sIL https://www.mavgrades.com(200,server: Vercel).git shortlog -sn --all.Metrics softened or removed
lru-cache(/api/grades,/api/professor-rating), with/api/courses/search's SQLite-PRAGMA approach called out separately, after review found the original claim did not matchsrc/app/api/courses/search/route.ts.masterbase against the upstream template, a branch distinct from this repo'smaindefault.Validation performed
src/lib/db.ts, both data-pipeline scripts (csv_to_json.py,json_to_sqlite.cjs,scrape_rmp.py),package.json,.github/pull.yml,.gitignore, andLICENSE.md.public/data/grades.sqlitedirectly (sqlite3 .tables) to confirm semester-table coverage matches the raw CSVs.git log/git shortlog/git log --authoracross all branches to determine contributor history and confirm no commits from Prajit Viswanadha exist in this repo.https://www.mavgrades.comreturns HTTP 200 viacurl -sIL.pull.yml, and no.env/secret usage anywhere in the app code.src/app/api/*/route.tsforlru-cacheimports (confirmed onlygrades/route.tsandprofessor-rating/route.tsimport it) and forPRAGMAusage (confirmedcourses/search/route.tssetscache_size/temp_storeon a persistent connection instead); re-read.github/pull.ymlto confirm itsbase: master/upstream: lryanle:master/mergeMethod: hardresetfields before rewording the deployment note; grepped the full README for the em dash character (U+2014) and confirmed zero remaining after the edit.Known uncertainties
scrape_rmp.pyis still actively run/maintained, or was a point-in-time data pull, is not verifiable from the repo alone.professors.dbuses WAL mode toggling (turn off wal mode for dbcommit) is inferred from the commit message and Vercel read-only filesystem constraints insrc/app/api/professor-rating/route.ts, but the full reasoning isn't documented anywhere..github/pull.yml'slryanle:masterupstream (an earlier template/original author repo) is stated in the README as historical context; I did not attempt to characterize how much of the current app still resembles that template, since the git history shows extensive divergence from the first commit onward.Needs owner confirmation
scrape_rmp.pyshould get arequirements.txt(flagged as a known limitation, not fixed here since this PR is docs/metadata only).LICENSE.md+ CC BY-NC-SA 4.0 for data) is still accurate/desired; no license file was added or changed.Missing media
public/landing.jpeg,public/assets/UTA.png, and stock Next.js/Vercel SVGs). None were added since fabricating screenshots is out of scope; consider adding a real product screenshot in a follow-up.Security notes
git pushreported GitHub found 94 Dependabot alerts (2 critical, 43 high, 40 moderate, 9 low) on the default branch. Not investigated or remediated here (out of scope for a docs-only PR) — flagging for maintainer awareness. No secret values are referenced or exposed anywhere in this PR.