How aryamanhm/aryaexam works
Main Components
• Pages / Routing Structure: Separate areas under the “app” directory:
• Authentication module (in app/(auth)): Contains routes for sign-in and sign-up.
• Home / Root module (in app/(root)): Contains sub-routes such as home, meeting details (with dynamic [id]), personal room, previous meetings, compliance pages (privacy and terms), recordings, and upcoming events.
• UI Components: All reusable UI widgets are located in the “components” directory (e.g., Navbar, Footer, Buttons, Cards, Modals, etc.) including additional UI primitives in “components/ui”. These provide building blocks for the pages.
• Hooks & Utility Logic: Custom hooks (e.g., useAutoCloseOnTabSwitch, useGetCallByID, useGetCalls) and helper functions found in “lib” and “constants” which encapsulate logic and data handling.
• Providers & Contexts: Components (like StreamClientProvider in “providers”) handle global app state or service connectivity, probably managing streams or communication.
• Global Styles and Configuration: Notice global styling in app/globals.css, Tailwind CSS configuration (tailwind.config.ts), and various linting/formatting configuration files (e.g., .eslintrc.json, .prettierrc).
Relationships & Interactions
• The Next.js runtime acts as the entry point using the “app” directory. Each page component (e.g., authentication pages, meeting pages) depends on reusable UI components.
• The routing within Next.js is organized by directories. For example, the authentication pages render sign-in and sign-up components based on URL patterns.
• UI components connect to backend-like logic via hooks. These hooks encapsulate API calls or state management for meeting calls and related actions.
• Providers such as StreamClientProvider wrap parts of the application to supply context (for instance, streaming client functionality) to deeply nested components.
• Style and configuration files ensure consistency across the app, and third-party integrations such as next/font for font optimization add to the rendering pipeline.
Architectural Patterns and Technologies
• Component-Based Architecture: The directory structure enforces reusability by separating UI components from page definitions.
• Routing & Dynamic Pages: The app structure leverages Next.js’s file-based routing, including dynamic routes (e.g., [id] for meeting pages).
• Separation of Concerns: Logic is separated into UI (components), data fetching/logic (hooks and lib), and configuration (providers, middleware).
• Configuration and Linting: Use of ESLint, Prettier, and TypeScript (tsconfig.json) shows a commitment to code quality.
• Tailwind CSS Integration: Indicates a utility-first CSS approach driven by tailwind.config.ts and global styles.