# peviitor-ro/search-engine architecture

> Architecture diagram of the GitHub repository peviitor-ro/search-engine, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/peviitor-ro/search-engine
- Repository: https://github.com/peviitor-ro/search-engine

## Overview

Pe Viitor is a Romanian job-search web application. Users search by job title and location, refine results with filters, and browse paginated job listings; they can also open company profiles and informational pages. The graph separates routing, search and filtering, job data/state, and shared page content. Relationships are based on the supplied excerpts and SOURCE INDEX; API endpoints and some implementation details are not visible, so external service links are shown only where fetch behavior is evidenced.

Main entry points: [`src/components/Results.jsx`](https://github.com/peviitor-ro/search-engine/blob/main/src/components/Results.jsx) (Job results), [`src/components/Search.jsx`](https://github.com/peviitor-ro/search-engine/blob/main/src/components/Search.jsx) (Search form), [`src/App.jsx`](https://github.com/peviitor-ro/search-engine/blob/main/src/App.jsx) (App router), [`src/utils/fetchData.js`](https://github.com/peviitor-ro/search-engine/blob/main/src/utils/fetchData.js) (Job API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["Routes and pages"]
  node_app["App router<br/>[App.jsx]"]
  node_landing["Landing page<br/>[Landing.jsx]"]
  node_results_page["Results page<br/>[Rezultate.jsx]"]
  node_company["Company profile<br/>[CompanyProfile.jsx]"]
  node_legal["Legal pages<br/>[Privacy.jsx]"]
  node_not_found["Not found<br/>[Page404.jsx]"]
end

subgraph group_search["Search and filters"]
  node_search_ui["Search form<br/>[Search.jsx]"]
  node_tag_context["Filter context<br/>[TagsContext.jsx]"]
  node_filter_group["Filter controls<br/>[FiltreGrup.jsx]"]
  node_city_filter["City filter<br/>[FiltreCities.jsx]"]
  node_company_filter["Company filter"]
  node_url_utils["URL parameters<br/>[urlManipulation.js]"]
  node_commune_data["Commune data<br/>[getCommuneName.js]"]
end

subgraph group_jobs["Job results and data"]
  node_results["Job results<br/>[Results.jsx]"]
  node_job_card["Job card<br/>[Job.jsx]"]
  node_no_results["Empty results<br/>[NoResults.jsx]"]
  node_fetch_data["Job API client<br/>[fetchData.js]"]
  node_job_state[("Jobs state<br/>[jobsSlice.js]")]
  node_query_builder["Query builder"]
end

subgraph group_shared["Shared content"]
  node_footer["Footer links<br/>[Footer.jsx]"]
  node_custom_links["Custom links<br/>[CustomLinks.jsx]"]
end

node_visitor(("Visitor"))
node_api(("Jobs API"))

node_visitor -->|"opens"| node_app
node_app -->|"routes to"| node_landing
node_app -->|"routes to"| node_results_page
node_app -->|"routes to"| node_company
node_app -->|"routes to"| node_legal
node_app -->|"routes to"| node_not_found
node_landing -->|"renders"| node_search_ui
node_landing -->|"fetches counts"| node_fetch_data
node_results_page -->|"renders"| node_search_ui
node_results_page -->|"renders"| node_results
node_search_ui -->|"requests jobs"| node_fetch_data
node_search_ui -->|"reads filters"| node_tag_context
node_search_ui -->|"renders"| node_filter_group
node_search_ui -->|"dispatches updates"| node_job_state
node_search_ui -->|"updates URL"| node_url_utils
node_filter_group -->|"reads filter state"| node_tag_context
node_filter_group -->|"renders"| node_city_filter
node_filter_group -->|"renders"| node_company_filter
node_filter_group -.->|"uses locations"| node_commune_data
node_results -->|"requests pages"| node_fetch_data
node_results -->|"builds query"| node_query_builder
node_results -->|"reads page URL"| node_url_utils
node_results -->|"reads state"| node_job_state
node_results -->|"renders jobs"| node_job_card
node_results -->|"renders empty state"| node_no_results
node_fetch_data -->|"fetches data"| node_api
node_fetch_data -->|"dispatches results"| node_job_state
node_company -->|"loads listings"| node_fetch_data
node_company -->|"renders jobs"| node_job_card
node_legal -->|"renders"| node_footer
node_legal -->|"uses links"| node_custom_links

click node_app "https://github.com/peviitor-ro/search-engine/blob/main/src/App.jsx"
click node_landing "https://github.com/peviitor-ro/search-engine/blob/main/src/pages/Landing.jsx"
click node_results_page "https://github.com/peviitor-ro/search-engine/blob/main/src/pages/Rezultate.jsx"
click node_company "https://github.com/peviitor-ro/search-engine/blob/main/src/pages/CompanyProfile.jsx"
click node_legal "https://github.com/peviitor-ro/search-engine/blob/main/src/pages/Privacy.jsx"
click node_not_found "https://github.com/peviitor-ro/search-engine/blob/main/src/pages/Page404.jsx"
click node_search_ui "https://github.com/peviitor-ro/search-engine/blob/main/src/components/Search.jsx"
click node_tag_context "https://github.com/peviitor-ro/search-engine/blob/main/src/context/TagsContext.jsx"
click node_filter_group "https://github.com/peviitor-ro/search-engine/blob/main/src/components/FiltreGrup.jsx"
click node_city_filter "https://github.com/peviitor-ro/search-engine/blob/main/src/components/FiltreCities.jsx"
click node_company_filter "https://github.com/peviitor-ro/search-engine/blob/main/src/components/FiltreCompanies.jsx"
click node_results "https://github.com/peviitor-ro/search-engine/blob/main/src/components/Results.jsx"
click node_job_card "https://github.com/peviitor-ro/search-engine/blob/main/src/components/Job.jsx"
click node_no_results "https://github.com/peviitor-ro/search-engine/blob/main/src/components/NoResults.jsx"
click node_fetch_data "https://github.com/peviitor-ro/search-engine/blob/main/src/utils/fetchData.js"
click node_job_state "https://github.com/peviitor-ro/search-engine/blob/main/src/reducers/jobsSlice.js"
click node_query_builder "https://github.com/peviitor-ro/search-engine/blob/main/src/utils/createSearchString.js"
click node_url_utils "https://github.com/peviitor-ro/search-engine/blob/main/src/utils/urlManipulation.js"
click node_commune_data "https://github.com/peviitor-ro/search-engine/blob/main/src/utils/getCommuneName.js"
click node_footer "https://github.com/peviitor-ro/search-engine/blob/main/src/components/Footer.jsx"
click node_custom_links "https://github.com/peviitor-ro/search-engine/blob/main/src/components/CustomLinks.jsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_landing,node_results_page,node_company,node_legal,node_not_found toneBlue
class node_search_ui,node_tag_context,node_filter_group,node_city_filter,node_company_filter,node_url_utils,node_commune_data toneAmber
class node_results,node_job_card,node_no_results,node_fetch_data,node_job_state,node_query_builder,node_api toneMint
class node_footer,node_custom_links toneRose
class node_visitor toneIndigo
```

## Components

### Routes and pages

- [App router](https://github.com/peviitor-ro/search-engine/blob/main/src/App.jsx): `src/App.jsx`
- [Landing page](https://github.com/peviitor-ro/search-engine/blob/main/src/pages/Landing.jsx): `src/pages/Landing.jsx`
- [Results page](https://github.com/peviitor-ro/search-engine/blob/main/src/pages/Rezultate.jsx): `src/pages/Rezultate.jsx`
- [Company profile](https://github.com/peviitor-ro/search-engine/blob/main/src/pages/CompanyProfile.jsx): `src/pages/CompanyProfile.jsx`
- [Legal pages](https://github.com/peviitor-ro/search-engine/blob/main/src/pages/Privacy.jsx): `src/pages/Privacy.jsx`
- [Not found](https://github.com/peviitor-ro/search-engine/blob/main/src/pages/Page404.jsx): `src/pages/Page404.jsx`

### Search and filters

- [Search form](https://github.com/peviitor-ro/search-engine/blob/main/src/components/Search.jsx): `src/components/Search.jsx`
- [Filter context](https://github.com/peviitor-ro/search-engine/blob/main/src/context/TagsContext.jsx): `src/context/TagsContext.jsx`
- [Filter controls](https://github.com/peviitor-ro/search-engine/blob/main/src/components/FiltreGrup.jsx): `src/components/FiltreGrup.jsx`
- [City filter](https://github.com/peviitor-ro/search-engine/blob/main/src/components/FiltreCities.jsx): `src/components/FiltreCities.jsx`
- [Company filter](https://github.com/peviitor-ro/search-engine/blob/main/src/components/FiltreCompanies.jsx): `src/components/FiltreCompanies.jsx`
- [URL parameters](https://github.com/peviitor-ro/search-engine/blob/main/src/utils/urlManipulation.js): `src/utils/urlManipulation.js`
- [Commune data](https://github.com/peviitor-ro/search-engine/blob/main/src/utils/getCommuneName.js): `src/utils/getCommuneName.js`

### Job results and data

- [Job results](https://github.com/peviitor-ro/search-engine/blob/main/src/components/Results.jsx): `src/components/Results.jsx`
- [Job card](https://github.com/peviitor-ro/search-engine/blob/main/src/components/Job.jsx): `src/components/Job.jsx`
- [Empty results](https://github.com/peviitor-ro/search-engine/blob/main/src/components/NoResults.jsx): `src/components/NoResults.jsx`
- [Job API client](https://github.com/peviitor-ro/search-engine/blob/main/src/utils/fetchData.js): `src/utils/fetchData.js`
- [Jobs state](https://github.com/peviitor-ro/search-engine/blob/main/src/reducers/jobsSlice.js): `src/reducers/jobsSlice.js`
- [Query builder](https://github.com/peviitor-ro/search-engine/blob/main/src/utils/createSearchString.js): `src/utils/createSearchString.js`

### Shared content

- [Footer links](https://github.com/peviitor-ro/search-engine/blob/main/src/components/Footer.jsx): `src/components/Footer.jsx`
- [Custom links](https://github.com/peviitor-ro/search-engine/blob/main/src/components/CustomLinks.jsx): `src/components/CustomLinks.jsx`

### Other components

- **Visitor**
- **Jobs API**

## Connections

- Visitor → App router: opens (evidence: `src/App.jsx`)
- App router → Landing page: routes to (evidence: `src/App.jsx`)
- App router → Results page: routes to (evidence: `src/App.jsx`)
- App router → Company profile: routes to (evidence: `src/App.jsx`)
- App router → Legal pages: routes to (evidence: `src/App.jsx`)
- App router → Not found: routes to (evidence: `src/App.jsx`)
- Landing page → Search form: renders (evidence: `src/pages/Landing.jsx`)
- Landing page → Job API client: fetches counts (evidence: `src/pages/Landing.jsx`)
- Results page → Search form: renders (evidence: `src/pages/Rezultate.jsx`)
- Results page → Job results: renders (evidence: `src/pages/Rezultate.jsx`)
- Search form → Job API client: requests jobs (evidence: `src/components/Search.jsx`)
- Search form → Filter context: reads filters (evidence: `src/components/Search.jsx`)
- Search form → Filter controls: renders (evidence: `src/components/Search.jsx`)
- Search form → Jobs state: dispatches updates (evidence: `src/components/Search.jsx`)
- Search form → URL parameters: updates URL (evidence: `src/components/Search.jsx`)
- Filter controls → Filter context: reads filter state (evidence: `src/components/FiltreGrup.jsx`)
- Filter controls → City filter: renders (evidence: `src/components/FiltreGrup.jsx`)
- Filter controls → Company filter: renders (evidence: `src/components/FiltreGrup.jsx`)
- Filter controls → Commune data: uses locations
- Job results → Job API client: requests pages (evidence: `src/components/Results.jsx`)
- Job results → Query builder: builds query (evidence: `src/components/Results.jsx`)
- Job results → URL parameters: reads page URL (evidence: `src/components/Results.jsx`)
- Job results → Jobs state: reads state (evidence: `src/components/Results.jsx`)
- Job results → Job card: renders jobs (evidence: `src/components/Results.jsx`)
- Job results → Empty results: renders empty state (evidence: `src/components/Results.jsx`)
- Job API client → Jobs API: fetches data (evidence: `src/utils/fetchData.js`)
- Job API client → Jobs state: dispatches results (evidence: `src/utils/fetchData.js`)
- Company profile → Job API client: loads listings (evidence: `src/pages/CompanyProfile.jsx`)
- Company profile → Job card: renders jobs (evidence: `src/pages/CompanyProfile.jsx`)
- Legal pages → Footer links: renders (evidence: `src/pages/Privacy.jsx`)
- Legal pages → Custom links: uses links (evidence: `src/pages/Privacy.jsx`)
