How isd-sgcu/oph-67-frontend works
Main Components
• UI (Presentation) Layer:
• Next.js “app” directory structures: Notice the segregation into (admin) and (app) directories. The admin section includes routes like profile, role, and QR-code scanning, while the app section provides pages for faculties, events, registers, workshops, etc.
• Public Assets and Fonts: The “public” directory holds images and fonts that the UI consumes.
• Business Logic / Actions Layer:
• The “src/app/actions” folder clearly defines business functions such as authentication, profile editing, login, register, and more. These actions likely coordinate with external backend APIs (even if not directly part of this frontend repo).
• Integration Layer:
• The “src/lib/liff” files and the “components/liff” folder imply integration with the LIFF framework, enabling authentication or additional linking with external services (possibly related to the LINE ecosystem).
• Configuration & Utility Layer:
• Configuration files like next.config.ts, tailwind.config.ts, tsconfig.json, and various utility files in “src/utils” provide essential support, styling, and type-checks.
• Data Handling:
• The “data” folder holds an Excel file and a script to extract data. Even though minor, it indicates some pre-processing to be used within the app.
Relationships and Interactions
• Next.js routing orchestrates rendering layouts and pages. Show the flow from the global layout (src/app/layout.tsx) to individual route groups ((admin) and (app)).
• Data flow goes from public assets and constants (in “src/const”) into UI components. Similarly, configuration files (next.config.ts, tailwind.config.ts) influence the entire system behavior.
Architectural Patterns
• The use of a modularized folder structure is typical of modern Next.js applications following the App Router approach. Note the separation between presentation (pages, components) and business logic (actions).
Relevant Technologies and Frameworks
• Next.js for application routing and rendering.
• TypeScript for type safety.
• Tailwind CSS (configured in tailwind.config.ts) for styling.
• ESLint, Prettier, Husky, and Conventional Commits for code quality and developer workflows.
• LIFF for integrating with LINE services.
• Node.js and pnpm for the runtime and package management.
Elements
• UI components to actions (user interactions triggering business logic).
• Actions calling external APIs or interacting with helper modules.
• Global layout components passing data to sub-pages.
• LIFF modules interfacing between external services and your application.
• Pages (e.g., rounded rectangles),
• Components (e.g., squares),
Putting It All Together
• Top-level layout divided into “(admin)” and “(app)” branches.
• UI components connected with their respective pages.
• Link the “actions” with utility libraries (under “lib”, “hooks”, “utils”) which assist in data validation, date manipulation, etc.
• External integrations (such as LIFF) outside the core but with connections to both the UI and the business logic.
• Finally, include configuration nodes (like next.config.ts and tailwind.config.ts) and static resources (from /public and /data) on the periphery or as supporting systems.