2.8 KiB
Repository Guidelines
Project Structure & Module Organization
The application has a PHP/SQLite backend and a Vue 3 frontend. Backend code lives in backend/src/; database models are under backend/src/Models/, configuration is in backend/config/, and backend/public/API.php is the HTTP entry point. Frontend pages, reusable components, and shared assets live in frontend/src/views/, frontend/src/components/, and frontend/src/assets/. Static files belong in frontend/public/. Development documentation is kept in doc/. Runtime SQLite databases and uploaded files are under data/; treat them as application state, not fixtures.
Build, Test, and Development Commands
cd backend && composer installinstalls PHP dependencies and configures PSR-4 autoloading.cd frontend && npm ciinstalls the locked frontend dependency set.cd frontend && npm run devstarts the Vite development server.dev.batstarts PHP's local server athttp://localhost:8080from the repository root.cd frontend && npm run buildcreates the production frontend and generated.htaccess.build.batbuilds both layers, recreatesdist/, and packages a versioned ZIP inbuild/on Windows.php backend/tests/testDB.php 1runs one numbered backend smoke check.
Coding Style & Naming Conventions
Follow the surrounding code: use tabs for indentation in PHP, JavaScript, and Vue files; use double quotes in JavaScript and trailing commas in multiline structures. Name Vue components and PHP classes in PascalCase (ReportBox.vue, Attachments.php), JavaScript functions in camelCase, and database fields in snake_case (report_status). Keep PHP classes in the TPsoft\BugreportBackend namespace and paths aligned with Composer PSR-4 autoloading. No formatter or linter is configured, so keep diffs focused and match local style.
Testing Guidelines
The repository currently uses a numbered PHP smoke-test script rather than a test framework or coverage gate. Run relevant cases from backend/tests/testDB.php and exercise changed UI flows with the Vite server. Cases 6-8 update, insert, or delete database records; use a disposable copy of data/database.db. For new automated tests, place backend tests in backend/tests/ and use descriptive *Test.php names.
Commit & Pull Request Guidelines
Recent commits use short, lowercase Slovak or English summaries such as pridany build skript and fixed sanitizeFilename. Keep each commit scoped to one change and use an imperative, concrete subject; use release X.Y.Z only for releases. Pull requests should explain behavior and verification, link the relevant issue, call out database or configuration changes, and include screenshots for visible UI changes. Do not commit secrets, local credentials, generated frontend/dist/, or production database contents.