diff --git a/.paul/PROJECT.md b/.paul/PROJECT.md new file mode 100644 index 0000000..a4dd033 --- /dev/null +++ b/.paul/PROJECT.md @@ -0,0 +1,29 @@ +# Project: globelus.pl + +## Description +Portal ogloszeniowy do publikacji i wyszukiwania ofert pracy, z panelami dla kandydatow i pracodawcow oraz filtrowaniem ofert po wielu kryteriach. + +## Core Value +Kandydaci szybko znajduja dopasowane oferty pracy, a pracodawcy latwo docieraja do odpowiednich kandydatow. + +## Requirements + +### Must Have +- [To be defined during planning] + +### Should Have +- [To be defined during planning] + +### Nice to Have +- [To be defined during planning] + +## Constraints +- [To be identified during planning] + +## Success Criteria +- Kandydaci szybko znajduja dopasowane oferty pracy, a pracodawcy latwo docieraja do odpowiednich kandydatow. +- [To be refined during planning] + +--- +*Created: 2026-04-25 16:39* + diff --git a/.paul/ROADMAP.md b/.paul/ROADMAP.md new file mode 100644 index 0000000..adc703e --- /dev/null +++ b/.paul/ROADMAP.md @@ -0,0 +1,23 @@ +# Roadmap: globelus.pl + +## Overview +Rozwoj projektu obejmuje stabilizacje kluczowych flow ofert pracy, poprawy jakosci danych i filtrowania, a nastepnie kolejne usprawnienia UX oraz procesu publikacji i aplikowania. + +## Current Milestone +**v0.1 Initial Release** (v0.1.0) +Status: Not started +Phases: 0 of TBD complete + +## Phases + +| Phase | Name | Plans | Status | Completed | +|-------|------|-------|--------|-----------| +| 1 | TBD | TBD | Not started | - | + +## Phase Details + +Phases will be defined during `$paul-plan`. + +--- +*Roadmap created: 2026-04-25 16:39* + diff --git a/.paul/STATE.md b/.paul/STATE.md new file mode 100644 index 0000000..8a3845c --- /dev/null +++ b/.paul/STATE.md @@ -0,0 +1,49 @@ +# Project State + +## Project Reference + +See: .paul/PROJECT.md (updated 2026-04-25 16:39) + +**Core value:** Kandydaci szybko znajduja dopasowane oferty pracy, a pracodawcy latwo docieraja do odpowiednich kandydatow. +**Current focus:** Project initialized - ready for planning + +## Current Position + +Milestone: v0.1 Initial Release +Phase: Not yet defined +Plan: None yet +Status: Ready to create roadmap and first PLAN +Last activity: 2026-04-25 16:39 - Project initialized + +Progress: +- Milestone: [----------] 0% + +## Loop Position + +Current loop state: +``` +PLAN --> APPLY --> UNIFY + o o o [Ready for first PLAN] +``` + +## Accumulated Context + +### Decisions +None yet. + +### Deferred Issues +None yet. + +### Blockers/Concerns +None yet. + +## Session Continuity + +Last session: 2026-04-25 16:39 +Stopped at: Project initialization complete +Next action: Run $paul-plan to define phases and first plan +Resume file: .paul/PROJECT.md + +--- +*STATE.md - Updated after every significant action* + diff --git a/.paul/config.md b/.paul/config.md new file mode 100644 index 0000000..e08fb22 --- /dev/null +++ b/.paul/config.md @@ -0,0 +1,34 @@ +# Project Config + +**Project:** globelus.pl +**Created:** 2026-04-25 16:39 + +## Project Settings + +```yaml +project: + name: globelus.pl + version: 0.0.0 +``` + +## Integrations + +### SonarQube + +```yaml +sonarqube: + enabled: false + reason: "Skipped during init" +``` + +## Preferences + +```yaml +preferences: + auto_commit: false + verbose_output: false +``` + +--- +*Config created: 2026-04-25 16:39* + diff --git a/.paul/docs/API.md b/.paul/docs/API.md new file mode 100644 index 0000000..f2728cf --- /dev/null +++ b/.paul/docs/API.md @@ -0,0 +1,5 @@ +# API + +> Endpointy, kontrakty request/response, autentykacja. +> Uzupelnij gdy projekt bedzie udostepnial API. + diff --git a/.paul/docs/ARCHITECTURE.md b/.paul/docs/ARCHITECTURE.md new file mode 100644 index 0000000..3aad0a0 --- /dev/null +++ b/.paul/docs/ARCHITECTURE.md @@ -0,0 +1,5 @@ +# Architecture + +> Struktura klas, modulow, przeplywow i zaleznosci w projekcie. +> Uzupelnij po pierwszej fazie implementacji. + diff --git a/.paul/docs/DB_SCHEMA.md b/.paul/docs/DB_SCHEMA.md new file mode 100644 index 0000000..f56c19d --- /dev/null +++ b/.paul/docs/DB_SCHEMA.md @@ -0,0 +1,5 @@ +# Database Schema + +> Schemat bazy danych - tabele, kolumny, FK, indeksy. +> Uzupelnij gdy projekt bedzie korzystac z bazy danych. + diff --git a/.paul/docs/DECISIONS.md b/.paul/docs/DECISIONS.md new file mode 100644 index 0000000..3b45667 --- /dev/null +++ b/.paul/docs/DECISIONS.md @@ -0,0 +1,5 @@ +# Architecture Decision Records + +> Kluczowe decyzje techniczne i ich uzasadnienia. +> Dodawaj wpisy recznie, gdy podejmujesz istotne decyzje architektoniczne. + diff --git a/.paul/docs/STACK.md b/.paul/docs/STACK.md new file mode 100644 index 0000000..a47e8de --- /dev/null +++ b/.paul/docs/STACK.md @@ -0,0 +1,5 @@ +# Stack + +> Stack technologiczny, wersje, zaleznosci, srodowisko. +> Uzupelnij po inicjalizacji projektu. + diff --git a/.paul/docs/TECH_CHANGELOG.md b/.paul/docs/TECH_CHANGELOG.md new file mode 100644 index 0000000..456be13 --- /dev/null +++ b/.paul/docs/TECH_CHANGELOG.md @@ -0,0 +1,5 @@ +# Tech Changelog + +> Chronologiczny log zmian technicznych - co i dlaczego. +> Aktualizowany automatycznie po kazdej fazie PAUL. + diff --git a/.paul/docs/TODO.md b/.paul/docs/TODO.md new file mode 100644 index 0000000..98cafed --- /dev/null +++ b/.paul/docs/TODO.md @@ -0,0 +1,5 @@ +# TODO + +> Luzny parking pomyslow, rzeczy do sprawdzenia i pomyslow na pozniej. +> Nie wymaga formalnosci. + diff --git a/.vscode/ftp-kr.json b/.vscode/ftp-kr.json index 9942ae6..b05c1ad 100644 --- a/.vscode/ftp-kr.json +++ b/.vscode/ftp-kr.json @@ -15,6 +15,7 @@ "/.vscode", "/.serena", "/.claude", - "CLAUDE.md" + "CLAUDE.md", + ".paul" ] } \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..3cc119f --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,33 @@ +# Projektowe zasady dla globelus.pl + +## Stack +- **Jezyk:** PHP +- **Framework:** Wlasny system MVC + szablony PHP +- **Wersja:** legacy/custom + +## Zasady kodu +- Stosuj PSR-12 dla formatowania kodu PHP. +- Nazewnictwo: PascalCase dla klas, camelCase dla metod, snake_case dla pol DB. +- Unikaj zagniezdzen > 3 poziomy; wydzielaj metody pomocnicze. +- Komentarze tylko gdy wyjasniaja "dlaczego", nie "co". + +## Baza danych +- Schemat dokumentowany w `.paul/docs/DB_SCHEMA.md`. +- Kazda zmiana schematu wymaga migracji lub udokumentowanej procedury SQL. +- Nie modyfikuj historycznych migracji/skryptow bez uzasadnienia. + +## Testy +- Ustal i udokumentuj komende testowa dla projektu (brak standardowej konfiguracji testow). + +## Dokumentacja +- Dokumentacja techniczna w `.paul/docs/`. +- Przy kazdej zmianie aktualizuj odpowiednie pliki docs. +- `TECH_CHANGELOG.md` aktualizowany po kazdej fazie. + +## Wdrazanie +- Ustal i dopisz procedure deploy dla produkcji/staging. + +## UI/Frontend +- Projekt korzysta z szablonow PHP i assets statycznych; utrzymuj spojnosc z istniejacym stylem. +- Zmiany UX w listingu ofert testuj na flow filtrowania i paginacji. + diff --git a/autoload/front/factory/class.GlobelusAdverts.php b/autoload/front/factory/class.GlobelusAdverts.php index 344f292..a6e6bfa 100644 --- a/autoload/front/factory/class.GlobelusAdverts.php +++ b/autoload/front/factory/class.GlobelusAdverts.php @@ -331,14 +331,24 @@ class GlobelusAdverts if ( $values['keyword'] ) $filtr .= 'AND ( ' . 'title_nopl LIKE :title_nopl ' + . 'OR ' + . 'title LIKE :title ' . 'OR ' . 'firm_name_profile_nopl LIKE :firm_name_profile_nopl ' + . 'OR ' + . 'firm_name_profile LIKE :firm_name_profile ' . 'OR ' . 'text_nopl LIKE :text_nopl ' + . 'OR ' + . 'text LIKE :text ' . 'OR ' . 'country_nopl LIKE :country_nopl ' + . 'OR ' + . 'country LIKE :country ' . 'OR ' . 'city_nopl LIKE :city_nopl ' + . 'OR ' + . 'city LIKE :city ' . ') '; if ( is_array( $values['countries'] ) and count( $values['countries'] ) == 1 and $values['countries'][0] == 75 ) @@ -453,7 +463,12 @@ class GlobelusAdverts ':title_nopl' => '%' . \S::seo( $values['keyword'], true ) . '%', ':text_nopl' => '%' . \S::seo( $values['keyword'], true ) . '%', ':country_nopl' => '%' . \S::seo( $values['keyword'], true ) . '%', - ':city_nopl' => '%' . \S::seo( $values['keyword'], true ) . '%' + ':city_nopl' => '%' . \S::seo( $values['keyword'], true ) . '%', + ':title' => '%' . trim( (string)$values['keyword'] ) . '%', + ':firm_name_profile' => '%' . trim( (string)$values['keyword'] ) . '%', + ':text' => '%' . trim( (string)$values['keyword'] ) . '%', + ':country' => '%' . trim( (string)$values['keyword'] ) . '%', + ':city' => '%' . trim( (string)$values['keyword'] ) . '%' ] ) -> fetch(); } catch ( \Throwable $t ) @@ -493,14 +508,24 @@ class GlobelusAdverts if ( $values['keyword'] ) $filtr .= 'AND ( ' . 'title_nopl LIKE :title_nopl ' + . 'OR ' + . 'title LIKE :title ' . 'OR ' . 'firm_name_profile_nopl LIKE :firm_name_profile_nopl ' + . 'OR ' + . 'firm_name_profile LIKE :firm_name_profile ' . 'OR ' . 'text_nopl LIKE :text_nopl ' + . 'OR ' + . 'text LIKE :text ' . 'OR ' . 'country_nopl LIKE :country_nopl ' + . 'OR ' + . 'country LIKE :country ' . 'OR ' . 'city_nopl LIKE :city_nopl ' + . 'OR ' + . 'city LIKE :city ' . ') '; if ( is_array( $values['countries'] ) and count( $values['countries'] ) == 1 and $values['countries'][0] == 75 ) @@ -616,7 +641,12 @@ class GlobelusAdverts ':firm_name_profile_nopl' => '%' . \S::seo( $values['keyword'], true ) . '%', ':text_nopl' => '%' . \S::seo( $values['keyword'], true ) . '%', ':country_nopl' => '%' . \S::seo( $values['keyword'], true ) . '%', - 'city_nopl' => '%' . \S::seo( $values['keyword'], true ) . '%' + ':city_nopl' => '%' . \S::seo( $values['keyword'], true ) . '%', + ':title' => '%' . trim( (string)$values['keyword'] ) . '%', + ':firm_name_profile' => '%' . trim( (string)$values['keyword'] ) . '%', + ':text' => '%' . trim( (string)$values['keyword'] ) . '%', + ':country' => '%' . trim( (string)$values['keyword'] ) . '%', + ':city' => '%' . trim( (string)$values['keyword'] ) . '%' ] ) -> fetchAll( \PDO::FETCH_ASSOC ); } catch ( \Throwable $t ) @@ -654,4 +684,4 @@ class GlobelusAdverts global $mdb; return $mdb -> select( 'globelus_adverts_categories', [ 'id', 'name' ], [ 'ORDER' => [ 'name' => 'ASC' ] ] ); } -} \ No newline at end of file +} diff --git a/autoload/front/factory/class.GlobelusCron.php b/autoload/front/factory/class.GlobelusCron.php index c4e3686..b59348d 100644 --- a/autoload/front/factory/class.GlobelusCron.php +++ b/autoload/front/factory/class.GlobelusCron.php @@ -61,21 +61,21 @@ class GlobelusCron { global $mdb; - $results = $mdb -> query( 'SELECT id, title FROM globelus_adverts WHERE title_nopl IS NULL' ) -> fetchAll( \PDO::FETCH_ASSOC ); + $results = $mdb -> query( 'SELECT id, title FROM globelus_adverts WHERE title_nopl IS NULL OR title_nopl = \'\'' ) -> fetchAll( \PDO::FETCH_ASSOC ); if ( is_array( $results ) and !empty( $results ) ) foreach ( $results as $row ) { $mdb -> update( 'globelus_adverts', [ 'title_nopl' => \S::seo( $row['title'], true ) ], [ 'id' => $row['id'] ] ); echo( '
Generuje wartość nopl - ogłoszenia.
' ); } - $results = $mdb -> query( 'SELECT id, firm_name_profile FROM globelus_firms_data WHERE firm_name_profile_nopl IS NULL' ) -> fetchAll( \PDO::FETCH_ASSOC ); + $results = $mdb -> query( 'SELECT id, firm_name_profile FROM globelus_firms_data WHERE firm_name_profile_nopl IS NULL OR firm_name_profile_nopl = \'\'' ) -> fetchAll( \PDO::FETCH_ASSOC ); if ( is_array( $results ) and !empty( $results ) ) foreach ( $results as $row ) { $mdb -> update( 'globelus_firms_data', [ 'firm_name_profile_nopl' => \S::seo( $row['firm_name_profile'], true ) ], [ 'id' => $row['id'] ] ); echo( 'Generuje wartość nopl - firmy.
' ); } - $results = $mdb -> query( 'SELECT id, text FROM globelus_adverts WHERE text_nopl IS NULL' ) -> fetchAll( \PDO::FETCH_ASSOC ); + $results = $mdb -> query( 'SELECT id, text FROM globelus_adverts WHERE text_nopl IS NULL OR text_nopl = \'\'' ) -> fetchAll( \PDO::FETCH_ASSOC ); if ( is_array( $results ) and !empty( $results ) ) foreach ( $results as $row ) { $mdb -> update( 'globelus_adverts', [ 'text_nopl' => \S::seo( $row['text'], true ) ], [ 'id' => $row['id'] ] ); @@ -89,7 +89,7 @@ class GlobelusCron echo( 'Generuje wartość nopl - kraje.
' ); } - $results = $mdb -> query( 'SELECT id, city FROM globelus_adverts WHERE city_nopl IS NULL' ) -> fetchAll( \PDO::FETCH_ASSOC ); + $results = $mdb -> query( 'SELECT id, city FROM globelus_adverts WHERE city_nopl IS NULL OR city_nopl = \'\'' ) -> fetchAll( \PDO::FETCH_ASSOC ); if ( is_array( $results ) and !empty( $results ) ) foreach ( $results as $row ) { $mdb -> update( 'globelus_adverts', [ 'city_nopl' => \S::seo( $row['city'], true ) ], [ 'id' => $row['id'] ] ); diff --git a/autoload/front/factory/class.GlobelusFirms.php b/autoload/front/factory/class.GlobelusFirms.php index f8c065b..bce12f2 100644 --- a/autoload/front/factory/class.GlobelusFirms.php +++ b/autoload/front/factory/class.GlobelusFirms.php @@ -1083,9 +1083,9 @@ class GlobelusFirms 'outside_ue' => $values['outside_ue'], 'without_driving_license' => $values['without_driving_license'], 'aplication_link' => $aplication_link ? $aplication_link : null, - 'title_nopl' => '', - 'city_nopl' => '', - 'text_nopl' => '' + 'title_nopl' => \S::seo($values['title'], true), + 'city_nopl' => \S::seo($values['city'], true), + 'text_nopl' => \S::seo(\S::clear_advert_text($values['text']), true) ]); $advert_id = $mdb->id(); } @@ -1120,9 +1120,9 @@ class GlobelusFirms 'outside_ue' => $values['outside_ue'], 'without_driving_license' => $values['without_driving_license'], 'aplication_link' => $aplication_link ? $aplication_link : null, - 'title_nopl' => '', - 'city_nopl' => '', - 'text_nopl' => '' + 'title_nopl' => \S::seo($values['title'], true), + 'city_nopl' => \S::seo($values['city'], true), + 'text_nopl' => \S::seo(\S::clear_advert_text($values['text']), true) ], [ 'AND' => [ 'user_id' => $values['user_id'], diff --git a/temp/3/a/s_cache_3af17bb640bbb102a77a6031d37e93bf b/temp/3/a/s_cache_3af17bb640bbb102a77a6031d37e93bf new file mode 100644 index 0000000..58df337 Binary files /dev/null and b/temp/3/a/s_cache_3af17bb640bbb102a77a6031d37e93bf differ diff --git a/temp/4/b/s_cache_4b916ae533b4ded88ddc3edfe99de1be b/temp/4/b/s_cache_4b916ae533b4ded88ddc3edfe99de1be new file mode 100644 index 0000000..75ca4d2 Binary files /dev/null and b/temp/4/b/s_cache_4b916ae533b4ded88ddc3edfe99de1be differ diff --git a/temp/d/f/s_cache_df8e16882b112ce2c0739934bd19b578 b/temp/d/f/s_cache_df8e16882b112ce2c0739934bd19b578 new file mode 100644 index 0000000..5ff6264 Binary files /dev/null and b/temp/d/f/s_cache_df8e16882b112ce2c0739934bd19b578 differ