mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-15 23:49:31 +00:00
Improve documentation clarity and fix outdated information (#1129)
* Initial plan * Improve documentation clarity, fix typos, and update outdated information Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com> * Replace LCSC with Mouser in cloud providers list per d-buchmann's review Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com> * Remove outdated Mouser API issue notice Removed outdated information about the Mouser API's current issues with datasheets and part specifications. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com> Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
This commit is contained in:
parent
d244400f4f
commit
02b1f7aa16
18 changed files with 95 additions and 97 deletions
|
|
@ -1,7 +1,7 @@
|
|||
# How to contribute
|
||||
|
||||
Thank you for consider to contribute to Part-DB!
|
||||
Please read the text below, so your contributed content can be contributed easily to Part-DB.
|
||||
Thank you for considering contributing to Part-DB!
|
||||
Please read the text below, so your contributed content can be incorporated into Part-DB easily.
|
||||
|
||||
You can contribute to Part-DB in various ways:
|
||||
* Report bugs and request new features via [issues](https://github.com/Part-DB/Part-DB-server/issues)
|
||||
|
|
@ -18,38 +18,38 @@ Part-DB uses translation keys (e.g. part.info.title) that are sorted by their us
|
|||
was translated in other languages (this is possible via the "Other languages" dropdown in the translation editor).
|
||||
|
||||
## Project structure
|
||||
Part-DB uses symfony's recommended [project structure](https://symfony.com/doc/current/best_practices.html).
|
||||
Part-DB uses Symfony's recommended [project structure](https://symfony.com/doc/current/best_practices.html).
|
||||
Interesting folders are:
|
||||
* `public`: Everything in this directory will be publicly accessible via web. Use this folder to serve static images.
|
||||
* `assets`: The frontend assets are saved here. You can find the javascript and CSS code here.
|
||||
* `src`: Part-DB's PHP code is saved here. Note that the sub directories are structured by the classes purposes (so use `Controller` Controllers, `Entities` for Database models, etc.)
|
||||
* `translations`: The translations used in Part-DB are saved here
|
||||
* `assets`: The frontend assets are saved here. You can find the JavaScript and CSS code here.
|
||||
* `src`: Part-DB's PHP code is saved here. Note that the subdirectories are structured by the classes' purposes (so use `Controller` for Controllers, `Entity` for Database models, etc.)
|
||||
* `translations`: The translations used in Part-DB are saved here.
|
||||
* `templates`: The templates (HTML) that are used by Twig to render the different pages. Email templates are also saved here.
|
||||
* `tests/`: Tests that can be run by PHPunit.
|
||||
* `tests/`: Tests that can be run by PHPUnit.
|
||||
|
||||
## Development environment
|
||||
For setting up an development you will need to install PHP, composer, a database server (MySQL or MariaDB) and yarn (which needs an nodejs environment).
|
||||
* Copy `.env` to `.env.local` and change `APP_ENV` to `APP_ENV=dev`. That way you will get development tools (symfony profiler) and other features that
|
||||
For setting up a development environment, you will need to install PHP, Composer, a database server (MySQL or MariaDB) and yarn (which needs a Node.js environment).
|
||||
* Copy `.env` to `.env.local` and change `APP_ENV` to `APP_ENV=dev`. That way you will get development tools (Symfony profiler) and other features that
|
||||
will simplify development.
|
||||
* Run `composer install` (without -o) to install PHP dependencies and `yarn install` to install frontend dependencies
|
||||
* Run `yarn watch`. The program will run in the background and compile the frontend files whenever you change something in the CSS or TypeScript files
|
||||
* For running Part-DB it is recommended to use [Symfony CLI](https://symfony.com/download).
|
||||
That way you can run a correct configured webserver with `symfony serve`
|
||||
* Run `composer install` (without -o) to install PHP dependencies and `yarn install` to install frontend dependencies.
|
||||
* Run `yarn watch`. The program will run in the background and compile the frontend files whenever you change something in the CSS or TypeScript files.
|
||||
* For running Part-DB, it is recommended to use [Symfony CLI](https://symfony.com/download).
|
||||
That way you can run a correctly configured webserver with `symfony serve`.
|
||||
|
||||
## Coding style
|
||||
Code should follow the [PSR12-Standard](https://www.php-fig.org/psr/psr-12/) and symfony's [coding standards](https://symfony.com/doc/current/contributing/code/standards.html).
|
||||
Code should follow the [PSR-12 Standard](https://www.php-fig.org/psr/psr-12/) and Symfony's [coding standards](https://symfony.com/doc/current/contributing/code/standards.html).
|
||||
|
||||
Part-DB uses [Easy Coding Standard](https://github.com/symplify/easy-coding-standard) to check and fix coding style violations:
|
||||
* To check your code for valid code style run `vendor/bin/ecs check src/`
|
||||
* To fix violations run `vendor/bin/ecs check src/` (please checks afterwards if the code is valid afterwards)
|
||||
* To check your code for valid code style, run `vendor/bin/ecs check src/`
|
||||
* To fix violations, run `vendor/bin/ecs check src/ --fix` (please check afterwards if the code is still valid)
|
||||
|
||||
## GitHub actions
|
||||
Part-DB uses GitHub actions to run various tests and checks on the code:
|
||||
Part-DB uses GitHub Actions to run various tests and checks on the code:
|
||||
* Yarn dependencies can compile
|
||||
* PHPunit tests run successful
|
||||
* Config files, translations and templates has valid syntax
|
||||
* Doctrine schema valid
|
||||
* PHPUnit tests run successfully
|
||||
* Config files, translations, and templates have valid syntax
|
||||
* Doctrine schema is valid
|
||||
* No known vulnerable dependencies are used
|
||||
* Static analysis successful (phpstan with `--level=2`)
|
||||
* Static analysis is successful (phpstan with `--level=2`)
|
||||
|
||||
Further the code coverage of the PHPunit tests is determined and uploaded to [CodeCov](https://codecov.io/gh/Part-DB/Part-DB-server).
|
||||
Further, the code coverage of the PHPUnit tests is determined and uploaded to [CodeCov](https://codecov.io/gh/Part-DB/Part-DB-server).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue