How shuvrotokumar/halalhire-frontend works
1. Overall shape
- This is a Next.js App Router frontend for HalalHire, not a backend service.
- The repository is organized primarily by route folders under app/, with each route owning its page entrypoint, local components, and CSS Modules.
2. Composition root
- app/layout.tsx is the app shell where the major cross-cutting providers are mounted.
- The important global layers are:
- Redux provider
- i18n provider
- global styling via app/globals.css
- This is the boundary where app-wide state, localization, and styling become available to all routes.
3. Main product domains
- The UI splits into a few large domains:
- Marketing/content pages: home, about, industries, resources, FAQ, contact, legal pages
- Jobs marketplace: job listings and job detail pages
- Companies marketplace: company listing and company detail pages
- User/company account flows: auth, onboarding, profiles, verification, settings, subscriptions
- These domains are mostly isolated as route-level feature trees.
4. Public marketing and information pages
- Routes like app/page.tsx, about, industries, resources, contact, faq, privacy, terms, imprint, cookies, and accessibility are mostly informational.
- They are composed from reusable section components under the same route subtree, which suggests a content-driven frontend with strong page composition rather than a monolithic CMS layer.
5. Job marketplace subsystem
- app/jobs and app/jobs/[id] implement the job browsing and job detail experience.
- Shared building blocks live in app/components/Job*:
- search and filtering
- job cards and detail sections
- sidebar, match, and feature panels
- modals for edit/delete/application actions
- User-facing job actions also connect to saved/applied jobs pages, indicating a workflow from browse → inspect → act → track.
6. Company marketplace subsystem
- app/companies and app/companies/[id] cover company discovery and company profile detail pages.
- The company detail page is split into focused sections like hero, stats, about, sidebar, and CTA blocks.
- Related company lifecycle pages exist separately: onboarding, verification, subscription, team management, active subscriptions, profile, and requirements.
7. Authenticated user and onboarding flows
- Routes such as auth, completed_auth, forgot_pass, reset_pass, forgot_code, create_user_verify, identity_doc, personal_info, professional_info, and photos_finalize form a staged account setup and recovery flow.
- user_profile, user_settings, user_saved_jobs, and user_applied_jobs represent the post-auth user account area.
- This suggests the frontend supports multi-step identity and profile completion, not just simple login/logout.
8. Company admin/workflow flows
- Routes like company_profile, company_team, company_ver, company_req, company_subscription, company_active_subscriptions, and company_on indicate a parallel company-side administration area.
- These screens are likely tied to subscription, verification, team membership, and job request/approval workflows.
- The presence of request detail routes and decision modals points to a review/approval process for employer-side actions.
9. Shared interaction layer
- app/components/ contains reusable UI primitives and cross-route interaction components such as:
- navbar, footer, hero/feature blocks
- job and company cards
- modal dialogs for apply/chat/confirm/edit/delete/accept/reject
- forms and side panels
- app/context/ModalContext.tsx, AuthContext.tsx, and RegistrationContext.tsx provide local UI/workflow state that sits above individual pages but below the Redux data layer.
10. State management and backend boundary
- The persistent application state is handled with Redux Toolkit, with slices in redux/Slice/ for auth and registration.
- Server data is fetched through RTK Query endpoint modules in redux/api/.
- redux/api/baseApi.js is the key integration boundary: it reads the API base URL from config/envConfig.js, so the frontend is configured to talk to an external backend rather than hosting business logic itself.
- services/auth.service.js, Utils/decode-access-token.js, Utils/local-storage.js, and redux/TokenCleanup.jsx handle token/storage concerns around authentication.
11. Localization subsystem
- Internationalization is a first-class architectural concern.
- i18n.ts and i18next.config.ts define the locale setup, while translation files live in public/locales/<lang>/translation.json.
- Supported languages include Arabic, German, English, and Turkish.
- The selected language is persisted via the i18next cookie, making localization state part of the client-side session experience.
12. Static assets and delivery
- public/ holds static assets, including locale JSON and a demo video.
- Styling is primarily through CSS Modules colocated with each component, with global styles reserved for app-wide defaults.
- The repo also includes standard frontend tooling: TypeScript, ESLint, PostCSS/Tailwind support, and Next.js build/runtime configuration.
13. Architecture in one sentence
- The app is a localized, Redux-powered Next.js frontend that routes users through public content, job/company browsing, and authenticated employer/candidate workflows, while all remote data comes from an external API layer behind RTK Query.
Main entry points: Navbar.tsx Shared UI · layout.tsx App shell · authSlice.js Redux slices · baseApi.js RTK Query APIs
Components 25
Platform shell
App-wide composition root, providers, localization, and shared infrastructure
- App shell · Root layout that mounts the global providers and styles
app/layout.tsx - Redux provider · Global Redux wiring for app state
redux/ReduxProvider.jsx - I18n provider · Client-side localization provider used across routes
app/components/I18nProvider.tsx - Global styles · App-wide baseline styling
app/globals.css - Shared UI · Cross-route navigation, cards, sections, forms, and modals
app/components/Navbar/Navbar.tsx - Translations · Language JSON files for Arabic, German, English, and Turkish
public/locales/en/translation.json
Public content
Informational and promotional routes composed from local section components
- Home page · Primary landing page and top-level entry route
app/page.tsx - About page · Company story and mission content
app/about/page.tsx - Industries page · Industry-focused marketing content
app/industries/page.tsx - Resources page · Guides and supporting information for users
app/resources/page.tsx - Contact page · Contact form, map, and support routes
app/contact/page.tsx - Legal pages · Privacy, terms, imprint, cookies, and accessibility routes
app/privacy/page.tsx
Marketplaces
Job and company discovery experiences
- Jobs browse · Job search, filtering, and listing experience
app/jobs/page.tsx - Job details · Single-job detail route with action panels and modals
app/jobs/[id]/page.tsx - Companies browse · Company discovery and featured company browsing
app/companies/page.tsx - Company details · Single-company profile route with stats, sidebar, and CTA
app/companies/[id]/page.tsx
Accounts and workflows
Authentication, onboarding, profile, verification, and admin flows
- Auth flow · Login, password recovery, and auth completion routes
app/auth/page.tsx - Onboarding flow · Multi-step identity, personal, professional, and photo completion routes
app/create_user_verify/page.tsx - User account · Saved jobs, applied jobs, profile, and settings routes
app/user_profile/page.tsx - Company admin · Company profile, team, verification, subscription, and request routes
app/company_profile/page.tsx
State and API
Redux state, RTK Query boundary, and external backend integration
- UI context · Modal, auth, and registration workflow state
app/context/AuthContext.tsx - Redux slices · Auth and registration slices for persistent client state
redux/Slice/authSlice.js - RTK Query APIs · Feature endpoint modules that fetch remote data
redux/api/baseApi.js - API config · External API base URL configuration
config/envConfig.js - Auth service · Token decoding, local storage, and auth service helpers
services/auth.service.js
Connections 26
- App shell → Redux provider: mounts · Root layout wraps the app in Redux
- App shell → I18n provider: mounts · Root layout enables localization
- App shell → Global styles: loads · Global CSS is applied application-wide
- App shell → Shared UI: uses · Layout composes shared navigation and shell UI
- I18n provider → Translations: reads · Provider resolves translations from locale files
- Shared UI → Home page: composes · Shared components assemble marketing pages
- Shared UI → Jobs browse: composes · Shared components power job browsing UI
- Shared UI → Companies browse: composes · Shared components power company browsing UI
- Shared UI → Company details: composes · Shared components support company detail sections
- Shared UI → Job details: composes · Shared components support job detail panels
- Jobs browse → Job details: navigates · Listing leads into job detail flow
- Companies browse → Company details: navigates · Listing leads into company detail flow
- Auth flow → Onboarding flow: feeds · Authentication hands off into staged onboarding
- Onboarding flow → User account: completes · Completed profiles enter the user account area
- Company admin → Company details: supports · Employer admin state aligns with company profile data
- UI context → Shared UI: coordinates · Modals and workflow state drive shared interactions
- UI context → Redux slices: augments · Local workflow state sits above persisted Redux state
- Redux slices → RTK Query APIs: consumes · Slices are paired with server data fetched through RTK Query
- RTK Query APIs → API config: configured by · Base API uses external backend configuration
- Auth service → Redux slices: supports · Token and storage helpers support auth state
- Auth service → RTK Query APIs: supports · Auth helpers integrate with API calls and session handling
- Legal pages → Resources page: extends · Policy and compliance pages complement informational content
- About page → Shared UI: uses · About route composes local section components
- Industries page → Shared UI: uses · Industries route composes local section components
- Resources page → Shared UI: uses · Resources route composes local section components
- Contact page → Shared UI: uses · Contact route composes local sections and form UI