Welcome to the TypeDoc documentation for the Metropolia Attendance App frontend. This application is a convenient solution for teachers and students to take attendance during classes. It's designed to streamline the attendance process, making it easier for teachers to keep track of student attendance and for students to check in to their classes.
The frontend follows SOLID principles and clean code practices, with a component-based architecture designed for maintainability and scalability.
The frontend is built with modular components, each serving a specific function in the user interface. These components contribute to a cohesive and responsive design, ensuring a consistent and engaging experience for both teachers and students.
Views define the different pages and screens within the application. Each view is tailored to provide a distinct functionality, whether it's the student check-in screen or the teacher's attendance dashboard.
The frontend includes a collection of assets, such as fonts and images, that contribute to the overall visual appeal of the application. These assets are carefully selected to enhance the user experience.
font-heading
for all heading elementsfont-body
for main contentmetropolia-main-orange
(#ff5000
) - Primary brand color
metropolia-main-orange-dark
(#cc4000
) - Dark mode/hover statesmetropolia-secondary-orange
(#e54b00
) - Secondary actions
metropolia-secondary-orange-dark
(#b63b00
) - Dark mode/hover statesmetropolia-main-grey
(#53565a
) - Text and UI elements
metropolia-main-grey-dark
(#2d2e30
) - Dark mode variantmetropolia-support-white
(#ffffff
) - Backgrounds and light elementsmetropolia-support-black
(#000000
) - Text and bordersmetropolia-support-red
(#cb2228
) - Error states and alertsmetropolia-support-blue
(#4046a8
) - Information and linksmetropolia-support-yellow
(#fff000
) - Warnings and highlightsmetropolia-trend-pink
(#e384c4
) - Accent elementsmetropolia-trend-light-blue
(#5db1e4
) - Secondary informationmetropolia-trend-green
(#3ba88f
) - Success statesTailwind CSS is utilized to style and design the frontend. The Tailwind config file defines the customization and configuration settings for the CSS framework, ensuring a cohesive and visually appealing layout.
Each component in the frontend is documented to provide a clear understanding of its purpose, props, and usage. This documentation helps developers quickly grasp the functionality of each component and how to integrate it into the application.
The frontend uses a state management solution to handle the application's state. This ensures that the state is managed in a predictable and efficient manner, allowing for a smooth user experience.
The application uses several custom React hooks to handle common functionality:
useIsMobile
: Detects mobile viewport sizes for responsive layouts
src/hooks/useIsMobile.ts
useMemoized
: Optimized memoization hook with proper dependency trackinguseAsyncEffect
: Safe handling of async operations in effects with cleanupuseAbortableRequest
: Network requests with proper AbortController integrationuseTranslation
: Extended i18next hook with proper typinguseDateFormatter
: Locale-aware date formattinguseNumberFormatter
: Locale-aware number formattingThe frontend includes a comprehensive suite of tests to ensure the reliability and stability of the application. These tests cover various aspects of the frontend, including unit tests for individual components, integration tests for interactions between components, and end-to-end tests for the overall user experience.
Navigate through the documentation to understand the structure and functionality of the frontend codebase. Each module, class, interface, type, and function is documented in detail to provide a comprehensive understanding of the code.
Happy coding and attendance tracking!