Skip to main content

Overview

The Job Manager frontend is built using a Headless UI Architecture with Next.js, separating business logic (hooks) from visual presentation (UI components). This page provides detailed C4 component diagrams for each feature module.
All feature modules share common infrastructure: Fetcher Utilities for API calls, Constants Manager for URLs, and the bamboo-ui shared component library.

Architecture Pattern

Headless Hooks

Encapsulate business logic, state management, and event handlers without rendering UI

UI Components

Reusable visual primitives from bamboo-ui that consume hooks for behavior

Feature Services

API integration layer using Fetcher Utilities for backend communication

Validation Schemas

Zod schemas for client-side validation of form inputs

Common Infrastructure

All feature components connect to these shared containers:
ContainerTechnologyPurpose
PageNext.jsRoot page container and routing
Fetcher UtilitiesTypeScriptHTTP/HTTPS requests to backend
Constants ManagerTypeScriptCentralized URL and config management
bamboo-uiReact + TailwindCSSShared UI component library

Signup Component

Implements multi-path registration flow with credentials and Google SSO support. By leveraging a Headless UI pattern, the Next.js page remains a pure composition layer that delegates validation and API interactions to specialized hooks and services.
Signup Component Diagram

Component Breakdown

Encapsulates the specific business logic for creating a new company account. Prepares the data payload and manages success/error redirection.
  • Internal: Calls Fetcher Utilities to submit data
  • External: Indirectly communicates with the Identity Provider via the fetcher to persist the new user
Renders the visual registration form elements (Company Name, Email, Password, Country Listbox).
  • Internal: Consumes ValidateSchema for validation rules and passes specific field children/styles to the generic Headless UI Form wrapper
  • Displays real-time validation feedback
Defines the strict Zod validation rules for registration (e.g., “Password must have 1 special char”, “Phone must be digits”).
  • Internal: Used strictly by Signup UI Form to validate form state before submission is allowed, isolating validation logic from UI rendering
Manages the OAuth 2.0 handshake logic for third-party providers. Constructs the correct authorization URLs.
  • Internal: Calls Fetcher Utilities to retrieve provider-specific redirect URLs
  • External: Initiates the browser redirect to external Identity Providers (e.g., Google)
Renders the branded “Sign up with Google” button.
  • Internal: Consumes the generic Headless UI Button for interaction behavior but applies provider-specific branding styles
  • Triggers the SSO Service on click events

Reusable Components

ComponentHookPurpose
Headless UI ButtonHeadless Button HookConsistent button behavior, preventing double-clicks while loading
Headless UI FormHeadless Form HookForm state, isDirty, isSubmitting flags, handleSubmit handlers
Headless UI ComboboxHeadless Combobox HookCountry selection dropdown with search

Login Component

Facilitates secure authentication with credentials and Google SSO. Mirroring the signup architecture, the Next.js page functions as a strict composition layer, delegating complex authentication state and token management to specialized Services and Headless Hooks.
Login Component Diagram

Component Breakdown

Centralizes the business logic for user authentication. It manages the lifecycle of JWS/JWE tokens (storage and retrieval) and handles navigation upon successful login.
  • Internal: Calls Fetcher Utilities to verify credentials; interacts with the session state
  • External: Indirectly communicates with the Backend Auth Service to validate credentials and retrieve session tokens
Renders the login credential fields (Email and Password).
  • Internal: Consumes ValidateSchema for input validation and passes specific styling/children to the generic Headless UI Form wrapper
  • Displays authentication errors (e.g., “Invalid credentials” or “Account locked”)
Defines the Zod schema specifically for login (e.g., Email syntax validation and non-empty Password checks).
  • Internal: Used by Signin UI Form to validate inputs in real-time before the API request is formed, reducing unnecessary network traffic
Manages the OAuth 2.0 login flow for existing users. Constructs the authorization URL and handles the callback for token exchange.
  • Internal: Calls Fetcher Utilities to get provider URLs
  • External: Redirects the user to the Identity Provider (Google) for authentication
Renders the “Sign in with Google” button.
  • Internal: Consumes the generic Headless UI Button for consistent behavior (loading states, accessibility) while applying branding-specific styles
  • Invokes SSO Service on click

Reusable Components

ComponentHookPurpose
Headless UI ButtonHeadless Button HookButton behavior and loading states
Headless UI FormHeadless Form HookForm submission and validation

Dashboard Component

Central operational hub aggregating KPIs, recent job posts, notifications, and quick actions. It orchestrates multiple data streams, simultaneously fetching KPI metrics, recent job postings, and system notifications. It utilizes a modular widget architecture, allowing distinct data cards to load independently to optimize the “First Contentful Paint” performance metrics.
Dashboard Component Diagram

Component Breakdown

Renders high-level company metrics (e.g., Total Views, New Applicants) in a widget format.
  • Internal: Consumes the generic Headless UI Card for layout and style consistency
  • Displays data provided by the getCompanyKpisData service
Encapsulates the logic for retrieving analytical data.
  • Internal: Calls Fetcher Utilities to request aggregated metrics
  • External: Fetches real-time statistical data from the Backend Analytics Service
Renders a summary snapshot of the latest active job postings.
  • Internal: Uses the Headless UI Table to display structured data (Title, Posted Date, Status)
  • Consumes data from getJobPostsData
Manages the retrieval of the company’s job posting history.
  • Internal: Calls Fetcher Utilities with specific pagination or limit parameters (e.g., limit=5) for the dashboard view
Renders a real-time feed of system alerts (e.g., “Subscription expiring soon”, “New Applicant match”).
  • Internal: Consumes the Headless UI List to render individual notification items fetched by getNewNotification
Encapsulates the logic for fetching or polling user-specific alerts.
  • Internal: Calls Fetcher Utilities to check for unread messages
Renders lists of quick-access operations (e.g., “Upgrade Plan”, “Resume Draft”).
  • Internal: Consumes the Headless UI List to display actionable items
  • Delegates execution logic to their respective services (Premium/Draft Action Services)

Reusable Components

ComponentHookPurpose
Headless UI CardHeadless Card HookDashboard widget containers, loading states
Headless UI ListHeadless List HookNotification and action feeds, virtualization
Headless UI TableHeadless Table HookJob posts data table with sorting

Profile Component

Manages the Company Profile capabilities, allowing users to view and edit their public presence. The architecture splits the profile into logical sections: Header (Branding), Info (Contact Details), and Media (Gallery), orchestrated by a thin Next.js page.
Profile Component Diagram

Component Breakdown

Encapsulates business logic for media management, such as uploading company culture videos or event photos.
  • Internal: Calls Fetcher Utilities to handle multipart file uploads
  • External: Interacts with the Backend (and potentially object storage like GCS) to persist media assets
A specialized service component responsible for retrieving high-level branding data (Logo, Name, Bio).
  • Internal: Calls Fetcher Utilities with the company ID
  • External: Sends a GET request to the backend profile summary endpoint
Renders the public-facing company header, including the logo and “About Us” section.
  • Internal: Consumes the Headless UI Card for layout and style
  • Displays data fetched by getPublicProfileSummaryInfo
A specialized service component responsible for fetching detailed contact and operational information.
  • Internal: Calls Fetcher Utilities to populate the Profile Info Form with existing data
Renders the editable form for core company details (Email, Phone, Address, City).
  • Internal: Consumes ValidateSchema for input rules and passes specific fields to the generic Headless UI Form
  • Binds submission events to the update logic
Defines strict Zod validation rules for profile fields (e.g., “Phone number must start with a valid dial code”, “City is required”).
  • Internal: Used strictly by Profile Info Form to validate state before submission

Reusable Components

ComponentHookPurpose
Headless UI CardHeadless Card HookProfile section containers, collapsible sections
Headless UI ButtonHeadless Button HookEdit/Share action buttons
Headless UI FormHeadless Form HookProfile editing form

Subscription Component

Facilitates the monetization workflow, allowing companies to upgrade their accounts to unlock premium features such as real-time notifications and advanced headhunting tools. The architecture handles sensitive payment flows securely by isolating the transaction logic within the Payment Service.
Subscription Component Diagram

Component Breakdown

Encapsulates the logic for retrieving the company’s current subscription status (Free vs. Premium), expiration date, and transaction history.
  • Internal: Calls Fetcher Utilities to request account data
Renders the pricing details ($30/month), plan benefits, and status.
  • Internal: Consumes the Headless UI Card for layout consistency
  • Displays data provided by getSubscriptionInfo
Centralizes the business logic for initiating transactions. It handles the “Upgrade” workflow, interacting with the backend to generate checkout sessions for third-party gateways (e.g., Stripe/PayPal).
  • Internal: Calls Fetcher Utilities to post payment requests
  • External: Redirects the user to the secure payment gateway URL upon success

Reusable Components

ComponentHookPurpose
Headless UI CardHeadless Card HookPlan comparison cards, loading states
Headless UI ButtonHeadless Button Hook”Upgrade Now” with loading state to prevent double-charging

Payment Flow

1

Fetch Plans

getSubscriptionInfo retrieves available plans from backend
2

Display Options

SubscriptionInfoCard renders Free vs Premium comparison
3

Initiate Payment

Payment Service prepares checkout payload
4

Redirect

User redirected to Stripe checkout page

Job Post Management Component

Handles the core recruitment workflow: creation, editing, skill tagging, and application tracking. The architecture orchestrates three distinct functional areas—Job Information (Metadata), Skill Tagging (Taxonomy), and Application Tracking (Candidate Review)—within a unified interface.
Job Post Component Diagram

Component Breakdown

Encapsulates the business logic for the job lifecycle (Create, Update, Publish, Archive).
  • Internal: Calls Fetcher Utilities with the payload from the form
  • External: Communicates with the Backend to persist job data and trigger Kafka events for applicant matching
Renders the primary job details fields (Title, Description, Salary Range, Employment Type).
  • Internal: Consumes JobPostSchemaValidation for rules and passes specific field children to the generic Headless Form wrapper
Defines strict Zod validation rules for job posts (e.g., “Salary Max must be greater than Min”, “Expiry date must be in the future”).
  • Internal: Used strictly by Job Post Form to validate state before submission
Manages the taxonomy of technical skills.
  • Internal: Calls Fetcher Utilities to search or retrieve standard skill tags (e.g., “Python”, “React”)
Renders the multi-select interface for tagging required competencies.
  • Internal: Consumes the Headless TagInput to allow users to add/remove skills dynamically
Manages the retrieval of candidate applications for a specific job post.
  • Internal: Calls Fetcher Utilities to get the list of applicants, their CVs, and status (Pending/Archived)
Renders the list of applicants, allowing recruiters to review and filter candidates.
  • Internal: Consumes the Headless Table to display data
  • Provides actions to view CVs or change application status

Reusable Components

ComponentHookPurpose
Headless TagInputHeadless TagInput HookSkill tag management (add, remove, duplicate prevention)
Headless FormHeadless Form HookJob creation form state
Headless SelectHeadless Select HookEmployment type dropdown (single/multi-select)
Headless TableHeadless Table HookApplication data table with sorting, pagination

Applicant Search Component

Powers the “Headhunting” engine, enabling companies to discover talent by filtering across technical skills, location, and education. The architecture centralizes complex query logic within the Search Orchestrator Service, which aggregates criteria from various UI inputs.
Applicant Search Component Diagram

Component Breakdown

Encapsulates the business logic for building and executing complex search queries. It aggregates state from the Search Bar, Filters, and Skill Tags into a single payload.
  • Internal: Calls Fetcher Utilities to perform the search
  • External: Communicates with the Backend (optimized for Full-Text Search) to retrieve matching candidates
Renders secondary criteria inputs (Location, Education, Experience).
  • Internal: Consumes the generic Headless Input for text fields
  • Binds changes to the search state
Manages the retrieval of available technical skill tags for the filter.
  • Internal: Calls Fetcher Utilities to get the list of standard skills (e.g., “React”, “Java”) to populate autocomplete suggestions
Renders the multi-select interface for filtering candidates by tech stack.
  • Internal: Consumes the Headless TagInput to allow users to select multiple competencies (e.g., “Python” AND “Kafka”)

Reusable Components

ComponentHookPurpose
Headless SearchBarHeadless SearchBar HookDebouncing (delay API call until typing stops), history
Headless TagInputHeadless TagInput HookMulti-select skill filtering (add, remove, clear all)
Headless InputHeadless Input HookStandard text filter fields (validation, state binding)

Search Flow

1

User Input

SearchBar captures keyword, SkillsFilter captures skills
2

Debounce

Headless SearchBar Hook delays API calls until typing stops
3

Orchestrate

Search Orchestrator Service aggregates all filter criteria
4

Execute

Fetcher Utilities sends search request to backend

Headless UI Component Library

All feature modules share these reusable headless components from bamboo-ui:
ComponentHookUse Cases
Headless UI ButtonHeadless Button HookAll clickable actions
Headless UI FormHeadless Form HookAll form submissions
Headless UI CardHeadless Card HookDashboard widgets, profile sections
Headless UI ComboboxHeadless Combobox HookCountry selection
Headless SelectHeadless Select HookDropdown menus
Headless TagInputHeadless TagInput HookSkill tag management
Headless SearchBarHeadless SearchBar HookSearch inputs with debounce
Headless InputHeadless Input HookStandard text inputs
Headless ListHeadless List HookNotification feeds
Headless TableHeadless Table HookData tables with sorting