How yeasin2002/sugary-react-recruitment works
Project type and purpose
• This is a single-page frontend application built with Next.js and Tailwind CSS.
• Purpose: a recruitment task for “Sugary,” featuring login/authentication, a protected dashboard with infinite-scrolling material listings, and responsive UI interactions.
File structure
• Top-level: Next.js config files (next.config.js, tsconfig.json), package.json, public/assets, and core folders:
• app/ – Next.js App Router pages (auth, dashboard, homepage, layout, providers)
• components/ – UI components grouped by feature (dashboard, homepage, shared, ui)
• lib/ – shared utilities (API client, auth context, types, helpers)
• hooks/ – custom React hooks (debounce, intersection observer, toast)
• helper/ and data/ – data-fetching helpers and type definitions
• assets/, fonts/, public/ – static resources
• Configuration: axios interceptors for token refresh, Tailwind + PostCSS, eslint, bun.lock.
README for additional insights
• Uses authentication with access & refresh tokens (via Axios interceptors)
• Protected routes under /dashboard (guarded by auth-context)
• Infinite scroll for material list (lazy loading with intersection observer)
• Integration with external APIs: AdminAccount/Login, Account/RefreshToken, Materials/GetAll, plus image CDN.