How ohiayame/gsc-portal works
Project type and purpose
• This is a full-stack web application: a university department portal that combines a Vue 3 frontend (Vite, Pinia, Vue Router, Axios) with an Express.js backend and MySQL database.
• It offers role-based access (student, professor, admin), timetable management, level assignment, notices, Google Calendar integration, LINE notifications, and government holiday API integration.
File structure
• Top-level “vue-project/” directory splits into “backend/” (Express server) and “src/” (Vue frontend), matching a clear frontend–backend separation.
• Backend:
• controllers/ (business logic per feature)
• routes/ (REST endpoints)
• models/ (SQL query modules)
• middleware/ (authentication via JWT & Google OAuth)
• utils/ (external API wrappers: Google Calendar, LINE, holiday API)
• server.js (app entry)
• Frontend:
• App.vue & main.js (entry, router/store init)
• pages/ (Vue Router views)
• components/ (reusable UI)
• stores/ (Pinia state modules)
• router/ (route definitions)
• services/ (Axios API helpers)
• External configuration files: .env (dotenv), CORS, package.json, vite.config.js
Extract key architecture insights from README
• Auth flow: Google OAuth2 → backend issues JWT + refresh token, cookie-based refresh.
• Data flows: Vue UI ↔ Express REST API ↔ MySQL; backend ↔ Google Calendar API; backend ↔ LINE Messaging API; backend ↔ government holiday API.
• No ORM: models use raw SQL.
• Drag & drop UI indicates client-side state and event handling.