How rohit7030/job-portal-web-application works
Purpose and Runtime
This is a Vite-served React job portal for two roles: job seekers browse/save/apply to jobs, while recruiters create companies, post jobs, and review applications. The frontend uses Tailwind/Shadcn UI, Clerk authentication, and Supabase/PostgreSQL as its backend service. Bootstrap begins at src/main.jsx, with the top-level application in src/App.jsx.
Application Shell and Routing
src/App.jsx defines the page-level application flow, while src/layouts/app-layout.jsx provides the authenticated/shared layout and src/components/Header.jsx exposes primary navigation and user controls. Public-facing landing and job discovery views are in src/pages/landing.jsx, src/pages/job-listing.jsx, and src/pages/job.jsx.
Authentication and Access Boundary
Clerk supplies registration/sign-in and user identity; its publishable key is injected through Vite environment configuration. src/components/protected-route.jsx is the main authorization boundary for restricted workflows, and src/pages/onboarding.jsx captures initial role/profile setup needed before role-specific actions. Client code should treat Clerk identity as the actor identity passed to database operations.
Supabase Data Access
Supabase is initialized in src/utils/supabase.js using VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY. Domain-specific API modules isolate database operations:
• Jobs: src/api/apiJobs.js
• Companies: src/api/apiCompanies.js
• Applications: src/api/apiApplication.js
This creates a clear boundary between page/component interaction code and Supabase queries, including PostgreSQL-backed and potentially realtime data behavior.
Job Discovery and Candidate Workflow
Candidates load listings through src/pages/job-listing.jsx, inspect a selected posting in src/pages/job.jsx, and submit an application through src/components/apply-job.jsx. Job presentation is encapsulated by src/components/job-card.jsx; saved-job behavior is represented by src/pages/saved-job.jsx. The primary flow is: job API fetch → listing/card UI → job-detail page → application API write → application status display.
Recruiter and Company Workflow
Recruiters create/select company context through src/components/add-company-drawer.jsx, then create job records from src/pages/post-job.jsx. Recruiter-owned postings are surfaced in src/pages/my-jobs.jsx and src/components/created-jobs.jsx. This flow establishes company ownership before job creation, then uses the job/application APIs to retrieve postings and associated candidates.
Application Management and Shared UI
Application records are rendered for recruiter review via src/components/created-applications.jsx and src/components/application-card.jsx; these are the core UI stage for tracking candidate status. Shared asynchronous request state is centralized in src/hooks/use-fetch.js. Reusable visual primitives under src/components/ui are Shadcn-style components, with global styling in src/index.css and src/App.css.
Main entry points: apiJobs.js Jobs API · supabase.js Supabase client · job-listing.jsx Job discovery · App.jsx App routing
Components 21
React frontend
- Vite bootstrap
src/main.jsx - App routing · Defines page-level flow.
src/App.jsx - Shared app layout · Authenticated shared shell.
src/layouts/app-layout.jsx - Header navigation
src/components/Header.jsx - Protected route · Guards restricted workflows.
src/components/protected-route.jsx - Role onboarding · Captures initial role and profile setup.
src/pages/onboarding.jsx - Request state hook · Centralizes asynchronous request state.
src/hooks/use-fetch.js
Candidate workflow
- Job discovery · Listing and job-detail views.
src/pages/job-listing.jsx - Job card · Presents jobs in discovery results.
src/components/job-card.jsx - Apply to job · Submits candidate applications.
src/components/apply-job.jsx - Saved jobs
src/pages/saved-job.jsx
Recruiter workflow
- Company context · Creates or selects recruiter company ownership.
src/components/add-company-drawer.jsx - Post job · Creates company-owned job records.
src/pages/post-job.jsx - Recruiter postings · Shows recruiter-owned jobs.
src/pages/my-jobs.jsx - Application review · Renders candidates and application status.
src/components/created-applications.jsx
Identity and data services
- Jobs API
src/api/apiJobs.js - Companies API
src/api/apiCompanies.js - Applications API
src/api/apiApplication.js - Supabase client · Uses Vite Supabase URL and anonymous key.
src/utils/supabase.js - Clerk identity · Provides sign-in and actor identity.
- Supabase PostgreSQL · Stores jobs, companies, and applications.
Connections 21
- Vite bootstrap → App routing: mounts
- App routing → Shared app layout: routes through
- Shared app layout → Header navigation: renders
- App routing → Protected route: guards workflows
- Protected route → Role onboarding: requires setup
- Protected route → Clerk identity: checks identity
- Job discovery → Job card: renders
- Job discovery → Jobs API: loads jobs
- Job discovery → Request state hook: uses
- Apply to job → Applications API: creates application
- Saved jobs → Jobs API: loads saved jobs
- Company context → Companies API: creates/selects company
- Post job → Company context: requires ownership
- Post job → Jobs API: creates job
- Recruiter postings → Jobs API: loads postings
- Application review → Applications API: loads applications
- Jobs API → Supabase client: queries
- Companies API → Supabase client: queries
- Applications API → Supabase client: queries
- Supabase client → Supabase PostgreSQL: persists data
- Clerk identity → Supabase client: identity acts on data