How itshenrywu/mcut-course works
1. What this repository is
- This is a Nuxt 2 / Vue 2 frontend application for Ming Chi University of Technology’s course selection helper.
- The app’s core jobs are: browse the full course catalog, inspect class schedules, plan a schedule, detect conflicts, and check graduation/selection rules.
2. Top-level architecture
- The project is organized as a standard Nuxt app:
- pages/ defines the routed screens.
- layouts/ provides the app shell and error handling.
- components/ contains reusable UI blocks.
- store/ holds shared application state.
- plugins/ injects client/runtime utilities.
- static/ and asset/ hold deployable assets, styles, icons, and helper scripts.
3. Routing model and page boundaries
- The app is page-driven, with several functional areas:
- General info pages: index, about, info, terms, more.
- Schedule/planning pages: calendar, saved, my.
- Course browsing pages: course/index, course/_term/_dept/_id.
- Class detail pages: class/_term/_dept/_class.
- Graduation/rule pages: rule/_year/_dept/_id.
- Account/auth-related pages: login, logout, passport.
- The dynamic route structure shows the domain hierarchy is centered on term, department, course/class ID, and graduation year.
4. Data flow through the app
- The UI is likely driven by remote course and rule data fetched through the axios plugin.
- Data then flows into the Vuex store for app-wide state such as selected courses, saved plans, and user-facing filters.
- Pages and components read from the store to render lists, details, and conflict/schedule views.
5. State persistence and client-side sync
- plugins/storage-sync.client.js indicates a browser-only persistence layer, likely syncing local storage with app state.
- This is important for features like saved schedules / favorites / pre-planned courses, which need to survive refreshes and possibly sync across tabs.
6. Reusable UI components
- components/CourseList.vue is the central list-rendering component for course browsing.
- components/loading.vue, components/profile.vue, and components/top-menu.vue support the app shell and common interaction states.
- These components are shared across multiple route pages rather than being tied to a single screen.
7. Layout and shell
- layouts/default.vue is the main application frame used across most pages.
- layouts/error.vue provides fallback behavior for route/data failures.
- This suggests a conventional Nuxt shell where pages supply content and layouts supply global navigation and structure.
8. UI system and styling
- The app uses Tocas UI heavily, bundled locally under asset/tocas/.
- That folder contains the CSS for many UI primitives and patterns: grids, forms, tabs, modals, dropdowns, tables, tooltips, sidebar/navbar, etc.
- The app also ships icon fonts and flag assets, so the visual system is largely self-contained and static.
9. Client-side behavior libraries
- asset/tocas/scripts/ includes Tocas runtime scripts such as dropdown, dialog, popover, tooltip, tabs, and responsive helpers.
- These scripts handle interactive UI behavior on the client without requiring a separate backend service.
10. Static/public assets and entry points
- static/ contains deployment-facing files like robots.txt, ads.txt, site.webmanifest, icomoon.css, fonts, and a github.html page.
- static/import.js and static/scriptable.js suggest support files for external embedding or scripting integration.
- This indicates the app is designed to be a fully hosted frontend with a rich static asset footprint.
11. Build and deployment
- nuxt.config.js defines the Nuxt build/runtime behavior.
- .github/workflows/deploy.yml shows automated deployment via GitHub Actions.
- asset/utils/ contains build helpers such as sitemap.js and minify-icons.js, implying some asset preprocessing during release.
12. Architecture boundary to keep in mind
- There is no obvious server-side application code in this repo.
- The main architectural boundary is between:
- the Nuxt/Vue frontend in this repository, and
- the external data source(s) that provide course, schedule, and graduation-rule information.
- So the repo should be drawn as a client application with local state, remote data access, and static asset/runtime dependencies rather than as a backend system.
Main entry points: default.vue Main shell · index.js Vuex store · nuxt.config.js Nuxt config · tocas.css Tocas UI
Components 23
Routes
Page-driven functional areas
- Home · Landing page and overview entry point
pages/index.vue - Info pages · General information and static content screens
pages/about.vue - Planner pages · Calendar, saved plans, and personal schedule views
pages/calendar.vue - Course browser · Catalog entry page for browsing courses
pages/course/index.vue - Course detail · Dynamic course detail route by term, department, and id
pages/course/_term/_dept/_id.vue - Class detail · Dynamic class section route by term, department, and class
pages/class/_term/_dept/_class.vue - Rule detail · Dynamic graduation-rule route by year, department, and id
pages/rule/_year/_dept/_id.vue - Auth pages · Login, logout, and passport/account flows
pages/login.vue
Shared UI
Reusable components and layouts
- Main shell · Primary app frame used across most pages
layouts/default.vue - Error shell · Fallback layout for route and data failures
layouts/error.vue - Course list · Central list renderer for course browsing
components/CourseList.vue - Top menu · Primary navigation for the app shell
components/top-menu.vue - Profile card · User/account summary block
components/profile.vue - Loading view · Common loading and empty-state feedback
components/loading.vue
State & Plugins
Vuex store and runtime helpers
- Vuex store · Shared client state for plans, selections, and filters
store/index.js - Axios plugin · Injected client for remote course and rule requests
plugins/axios.js - Storage sync · Browser-only state synchronization with local storage
plugins/storage-sync.client.js
Static Assets
Local CSS, icons, scripts, and generated utilities
- Tocas UI · Bundled local UI system for layout, controls, and interactions
asset/tocas/tocas.css - Asset utils · Sitemap generation and icon minification helpers
asset/utils/sitemap.js - Static bundle · Deployable icons, fonts, manifest, and embed helpers
static/site.webmanifest
Delivery
Build and deployment configuration
- Nuxt config · Runtime and build settings for the Nuxt app
nuxt.config.js - Deploy workflow · GitHub Actions deployment pipeline
.github/workflows/deploy.yml
External Data
Remote course and rule sources consumed by the client
- Course data · External course, schedule, and graduation-rule providers
Connections 27
- Nuxt config → Main shell: configures · Declares app-wide Nuxt runtime behavior
- Nuxt config → Axios plugin: loads · Registers HTTP client behavior
- Nuxt config → Storage sync: loads · Registers browser-only persistence sync
- Deploy workflow → Nuxt config: builds · Automated deployment uses the Nuxt build output
- Main shell → Top menu: uses · Provides global navigation and shell structure
- Main shell → Loading view: uses · Displays global loading feedback
- Error shell → Loading view: falls back · Shares common status presentation patterns
- Home → Main shell: renders in · Home page is placed inside the app shell
- Info pages → Main shell: renders in · Static/info pages use the main shell
- Planner pages → Main shell: renders in · Planning views use the main shell
- Course browser → Course list: uses · Catalog browsing is driven by the central list component
- Course browser → Main shell: renders in · Course browser is part of the main shell
- Course detail → Course list: drills into · Course detail builds on list/browse flows
- Course detail → Main shell: renders in · Dynamic course detail page uses the main shell
- Class detail → Main shell: renders in · Class detail page uses the main shell
- Rule detail → Main shell: renders in · Graduation-rule page uses the main shell
- Auth pages → Profile card: uses · Authentication/account screens surface user identity
- Auth pages → Main shell: renders in · Account pages use the main shell
- Vuex store → Course list: feeds · Shared state drives catalog and selection views
- Vuex store → Planner pages: persists · Saved plans and user selections live in shared state
- Vuex store → Storage sync: syncs through · Client storage keeps state across refreshes and tabs
- Axios plugin → Course data: fetches from · Remote data is brought into the client via HTTP
- Vuex store → Axios plugin: requests · State and pages rely on fetched course data
- Tocas UI → Main shell: styles · Provides the app's visual system and interactive primitives
- Tocas UI → Top menu: styles · Shared navigation and controls use Tocas UI
- Asset utils → Static bundle: prepares · Build-time helpers process shipped assets
- Static bundle → Tocas UI: ships with · Public assets complement the bundled UI system