mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-06 11:09:29 +00:00
Merge 10032ebac5 into 0000cd7a02
This commit is contained in:
commit
04ca735bdb
18 changed files with 98 additions and 96 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
# How to contribute
|
# How to contribute
|
||||||
|
|
||||||
Thank you for consider to contribute to Part-DB!
|
Thank you for considering contributing to Part-DB!
|
||||||
Please read the text below, so your contributed content can be contributed easily 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:
|
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)
|
* 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).
|
was translated in other languages (this is possible via the "Other languages" dropdown in the translation editor).
|
||||||
|
|
||||||
## Project structure
|
## 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:
|
Interesting folders are:
|
||||||
* `public`: Everything in this directory will be publicly accessible via web. Use this folder to serve static images.
|
* `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.
|
* `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.)
|
* `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
|
* `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.
|
* `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
|
## 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).
|
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
|
* 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.
|
will simplify development.
|
||||||
* Run `composer install` (without -o) to install PHP dependencies and `yarn install` to install frontend dependencies
|
* 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
|
* 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).
|
* 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`
|
That way you can run a correctly configured webserver with `symfony serve`.
|
||||||
|
|
||||||
## Coding style
|
## 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:
|
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 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 fix violations, run `vendor/bin/ecs check src/ --fix` (please check afterwards if the code is still valid)
|
||||||
|
|
||||||
## GitHub actions
|
## 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
|
* Yarn dependencies can compile
|
||||||
* PHPunit tests run successful
|
* PHPUnit tests run successfully
|
||||||
* Config files, translations and templates has valid syntax
|
* Config files, translations, and templates have valid syntax
|
||||||
* Doctrine schema valid
|
* Doctrine schema is valid
|
||||||
* No known vulnerable dependencies are used
|
* 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).
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ There you will find various methods to support development on a monthly or a one
|
||||||
|
|
||||||
## Built with
|
## Built with
|
||||||
|
|
||||||
* [Symfony 5](https://symfony.com/): The main framework used for the serverside PHP
|
* [Symfony 6](https://symfony.com/): The main framework used for the serverside PHP
|
||||||
* [Bootstrap 5](https://getbootstrap.com/) and [Bootswatch](https://bootswatch.com/): Used as website theme
|
* [Bootstrap 5](https://getbootstrap.com/) and [Bootswatch](https://bootswatch.com/): Used as website theme
|
||||||
* [Fontawesome](https://fontawesome.com/): Used as icon set
|
* [Fontawesome](https://fontawesome.com/): Used as icon set
|
||||||
* [Hotwire Stimulus](https://stimulus.hotwired.dev/) and [Hotwire Turbo](https://turbo.hotwired.dev/): Frontend
|
* [Hotwire Stimulus](https://stimulus.hotwired.dev/) and [Hotwire Turbo](https://turbo.hotwired.dev/): Frontend
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ See [Authentication chapter]({% link api/authentication.md %}) for more details.
|
||||||
|
|
||||||
The API is split into different endpoints, which are reachable under the `/api/` path of your Part-DB instance (
|
The API is split into different endpoints, which are reachable under the `/api/` path of your Part-DB instance (
|
||||||
e.g. `https://your-part-db.local/api/`).
|
e.g. `https://your-part-db.local/api/`).
|
||||||
There are various endpoints for each entity type (like `part`, `manufacturer`, etc.), which allow you to read and write data, and some special endpoints like `search` or `statistics`.
|
There are various endpoints for each entity type (like `parts`, `manufacturers`, etc.), which allow you to read and write data, and some special endpoints like `search` or `statistics`.
|
||||||
|
|
||||||
For example, all API endpoints for managing categories are available under `/api/categories/`. Depending on the exact
|
For example, all API endpoints for managing categories are available under `/api/categories/`. Depending on the exact
|
||||||
path and the HTTP method used, you can read, create, update or delete categories.
|
path and the HTTP method used, you can read, create, update or delete categories.
|
||||||
|
|
@ -56,7 +56,7 @@ For most entities, there are endpoints like this:
|
||||||
* **POST**: `/api/categories/` - Create a new category
|
* **POST**: `/api/categories/` - Create a new category
|
||||||
* **GET**: `/api/categories/{id}` - Get a specific category by its ID
|
* **GET**: `/api/categories/{id}` - Get a specific category by its ID
|
||||||
* **DELETE**: `/api/categories/{id}` - Delete a specific category by its ID
|
* **DELETE**: `/api/categories/{id}` - Delete a specific category by its ID
|
||||||
* **UPDATE**: `/api/categories/{id}` - Update a specific category by its ID. Only the fields which are sent in the
|
* **PATCH**: `/api/categories/{id}` - Update a specific category by its ID. Only the fields which are sent in the
|
||||||
request are updated, all other fields are left unchanged.
|
request are updated, all other fields are left unchanged.
|
||||||
Be aware that you have to set the [JSON Merge Patch](https://datatracker.ietf.org/doc/html/rfc7386) content type
|
Be aware that you have to set the [JSON Merge Patch](https://datatracker.ietf.org/doc/html/rfc7386) content type
|
||||||
header (`Content-Type: application/merge-patch+json`) for this to work.
|
header (`Content-Type: application/merge-patch+json`) for this to work.
|
||||||
|
|
|
||||||
|
|
@ -23,14 +23,14 @@ each other so that it does not matter which one of your 1000 things of Part you
|
||||||
A part entity has many fields, which can be used to describe it better. Most of the fields are optional:
|
A part entity has many fields, which can be used to describe it better. Most of the fields are optional:
|
||||||
|
|
||||||
* **Name** (Required): The name of the part or how you want to call it. This could be a manufacturer-provided name, or a
|
* **Name** (Required): The name of the part or how you want to call it. This could be a manufacturer-provided name, or a
|
||||||
name you thought of yourself. Each name needs to be unique and must exist in a single category.
|
name you thought of yourself. Each name needs to be unique and must exist in a single category only.
|
||||||
* **Description**: A short (single-line) description of what this part is/does. For longer information, you should use
|
* **Description**: A short (single-line) description of what this part is/does. For longer information, you should use
|
||||||
the comment field or the specifications
|
the comment field or the specifications
|
||||||
* **Category** (Required): The category (see there) to which this part belongs to.
|
* **Category** (Required): The category (see there) to which this part belongs to.
|
||||||
* **Tags**: The list of tags this part belongs to. Tags can be used to group parts logically (similar to the category),
|
* **Tags**: The list of tags this part belongs to. Tags can be used to group parts logically (similar to the category),
|
||||||
but tags are much less strict and formal (they don't have to be defined beforehand) and you can assign multiple tags to
|
but tags are much less strict and formal (they don't have to be defined beforehand) and you can assign multiple tags to
|
||||||
a part. When clicking on a tag, a list with all parts which have the same tag, is shown.
|
a part. When clicking on a tag, a list with all parts which have the same tag, is shown.
|
||||||
* **Min Instock**: *Not really implemented yet*. Parts where the total instock is below this value, will show up for
|
* **Min Instock**: *Not fully implemented yet*. Parts where the total instock is below this value will show up for
|
||||||
ordering.
|
ordering.
|
||||||
* **Footprint**: See there. Useful especially for electronic parts, which have one of the common electronic footprints (
|
* **Footprint**: See there. Useful especially for electronic parts, which have one of the common electronic footprints (
|
||||||
like DIP8, SMD0805 or similar). If a part has no explicitly defined preview picture, the preview picture of its
|
like DIP8, SMD0805 or similar). If a part has no explicitly defined preview picture, the preview picture of its
|
||||||
|
|
@ -48,9 +48,9 @@ A part entity has many fields, which can be used to describe it better. Most of
|
||||||
completely trustworthy.
|
completely trustworthy.
|
||||||
* **Favorite**: Parts with this flag are highlighted in parts lists
|
* **Favorite**: Parts with this flag are highlighted in parts lists
|
||||||
* **Mass**: The mass of a single piece of this part (so of a single transistor). Given in grams.
|
* **Mass**: The mass of a single piece of this part (so of a single transistor). Given in grams.
|
||||||
* **Internal Part number** (IPN): Each part is automatically assigned a numerical ID that identifies a part in the
|
* **Internal Part Number** (IPN): Each part is automatically assigned a numerical ID that identifies a part in the
|
||||||
database. This ID depends on when a part was created and cannot be changed. If you want to assign your own unique
|
database. This ID depends on when a part was created and cannot be changed. If you want to assign your own unique
|
||||||
identifiers, or sync parts identifiers with the identifiers of another database you can use this field.
|
identifiers, or sync parts identifiers with the identifiers of another database, you can use this field.
|
||||||
|
|
||||||
### Stock / Part lot
|
### Stock / Part lot
|
||||||
|
|
||||||
|
|
@ -99,12 +99,12 @@ possible category tree could look like this:
|
||||||
|
|
||||||
### Supplier
|
### Supplier
|
||||||
|
|
||||||
A Supplier is a vendor/distributor where you can buy/order parts. Price information of parts is associated with a
|
A supplier is a vendor/distributor where you can buy/order parts. Price information of parts is associated with a
|
||||||
supplier.
|
supplier.
|
||||||
|
|
||||||
### Manufacturer
|
### Manufacturer
|
||||||
|
|
||||||
A manufacturer represents the company that manufacturers/builds various parts (not necessarily sell them). If the
|
A manufacturer represents the company that manufactures/builds various parts (not necessarily sells them). If the
|
||||||
manufacturer also sells the parts, you have to create a supplier for that.
|
manufacturer also sells the parts, you have to create a supplier for that.
|
||||||
|
|
||||||
### Storage location
|
### Storage location
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ nav_order: 5
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
|
|
||||||
Part-DBs behavior can be configured to your needs. There are different kinds of configuration options: Options, which are
|
Part-DB's behavior can be configured to your needs. There are different kinds of configuration options: Options that are
|
||||||
user-changeable (changeable dynamically via frontend), options that can be configured by environment variables, and
|
user-changeable (changeable dynamically via frontend), options that can be configured by environment variables, and
|
||||||
options that are only configurable via Symfony config files.
|
options that are only configurable via Symfony config files.
|
||||||
|
|
||||||
|
|
@ -40,8 +40,8 @@ The following configuration options can only be changed by the server administra
|
||||||
variables, changing the `.env.local` file or setting env for your docker container. Here are just the most important
|
variables, changing the `.env.local` file or setting env for your docker container. Here are just the most important
|
||||||
options listed, see `.env` file for the full list of possible env variables.
|
options listed, see `.env` file for the full list of possible env variables.
|
||||||
|
|
||||||
Environment variables allow to overwrite settings in the web interface. This is useful, if you want to enforce certain
|
Environment variables allow you to overwrite settings in the web interface. This is useful if you want to enforce certain
|
||||||
settings to be unchangable by users, or if you want to configure settings in a central place in a deployed environment.
|
settings to be unchangeable by users, or if you want to configure settings in a central place in a deployed environment.
|
||||||
On the settings page, you can hover over a setting to see, which environment variable can be used to overwrite it, it
|
On the settings page, you can hover over a setting to see, which environment variable can be used to overwrite it, it
|
||||||
is shown as tooltip. API keys or similar sensitive data which is overwritten by env variables, are redacted on the web
|
is shown as tooltip. API keys or similar sensitive data which is overwritten by env variables, are redacted on the web
|
||||||
interface, so that even administrators cannot see them (only the last 2 characters and the length).
|
interface, so that even administrators cannot see them (only the last 2 characters and the length).
|
||||||
|
|
@ -106,9 +106,9 @@ bundled with Part-DB. Set `DATABASE_MYSQL_SSL_VERIFY_CERT` if you want to accept
|
||||||
* `part_create`: Creation of a new part
|
* `part_create`: Creation of a new part
|
||||||
* `part_stock_operation`: Stock operation on a part (therefore withdraw, add or move stock)
|
* `part_stock_operation`: Stock operation on a part (therefore withdraw, add or move stock)
|
||||||
* `datastructure_edit`: Edit operation of an existing data structure (e.g. category, manufacturer, ...)
|
* `datastructure_edit`: Edit operation of an existing data structure (e.g. category, manufacturer, ...)
|
||||||
* `datastructure_delete`: Delete operation of a existing datastructure (e.g. category, manufacturer, ...)
|
* `datastructure_delete`: Delete operation of an existing data structure (e.g. category, manufacturer, ...)
|
||||||
* `datastructure_create`: Creation of a new data structure (e.g. category, manufacturer, ...)
|
* `datastructure_create`: Creation of a new data structure (e.g. category, manufacturer, ...)
|
||||||
* `CHECK_FOR_UPDATES` (default `1`): Set this to 0, if you do not want Part-DB to connect to GitHub to check for new
|
* `CHECK_FOR_UPDATES` (default `1`): Set this to 0 if you do not want Part-DB to connect to GitHub to check for new
|
||||||
versions, or if your server cannot connect to the internet.
|
versions, or if your server cannot connect to the internet.
|
||||||
* `APP_SECRET` (env only): This variable is a configuration parameter used for various security-related purposes,
|
* `APP_SECRET` (env only): This variable is a configuration parameter used for various security-related purposes,
|
||||||
particularly for securing and protecting various aspects of your application. It's a secret key that is used for
|
particularly for securing and protecting various aspects of your application. It's a secret key that is used for
|
||||||
|
|
@ -262,9 +262,9 @@ markdown (and even some subset of HTML) syntax to format the text.
|
||||||
|
|
||||||
## parameters.yaml
|
## parameters.yaml
|
||||||
|
|
||||||
You can also configure some options via the `config/parameters.yaml` file. This should normally not need,
|
You can also configure some options via the `config/parameters.yaml` file. This should normally not be needed,
|
||||||
and you should know what you are doing, when you change something here. You should expect, that you will have to do some
|
and you should know what you are doing when you change something here. You should expect that you will have to do some
|
||||||
manual merge, when you have changed something here and update to a newer version of Part-DB. It is possible that
|
manual merges when you have changed something here and update to a newer version of Part-DB. It is possible that
|
||||||
configuration options here will change or be completely removed in future versions of Part-DB.
|
configuration options here will change or be completely removed in future versions of Part-DB.
|
||||||
|
|
||||||
If you change something here, you have to clear the cache, before the changes will take effect with the
|
If you change something here, you have to clear the cache, before the changes will take effect with the
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,9 @@ It is installed on a web server and so can be accessed with any browser without
|
||||||
* Inventory management of your electronic parts. Each part can be assigned to a category, footprint, manufacturer,
|
* Inventory management of your electronic parts. Each part can be assigned to a category, footprint, manufacturer,
|
||||||
and multiple store locations and price information. Parts can be grouped using tags. You can associate various files
|
and multiple store locations and price information. Parts can be grouped using tags. You can associate various files
|
||||||
like datasheets or pictures with the parts.
|
like datasheets or pictures with the parts.
|
||||||
* Multi-language support (currently German, English, Russian, Japanese and French (experimental))
|
* Multi-language support (currently German, English, Russian, Japanese, French, Czech, Danish, and Chinese)
|
||||||
* Barcodes/Labels generator for parts and storage locations, scan barcodes via webcam using the builtin barcode scanner
|
* Barcodes/Labels generator for parts and storage locations, scan barcodes via webcam using the built-in barcode scanner
|
||||||
* User system with groups and detailed (fine granular) permissions.
|
* User system with groups and detailed (fine-grained) permissions.
|
||||||
Two-factor authentication is supported (Google Authenticator and Webauthn/U2F keys) and can be enforced for groups.
|
Two-factor authentication is supported (Google Authenticator and Webauthn/U2F keys) and can be enforced for groups.
|
||||||
Password reset via email can be set up.
|
Password reset via email can be set up.
|
||||||
* Optional support for single sign-on (SSO) via SAML (using an intermediate service
|
* Optional support for single sign-on (SSO) via SAML (using an intermediate service
|
||||||
|
|
@ -37,21 +37,21 @@ It is installed on a web server and so can be accessed with any browser without
|
||||||
* Import/Export system
|
* Import/Export system
|
||||||
* Project management: Create projects and assign parts to the bill of material (BOM), to show how often you could build
|
* Project management: Create projects and assign parts to the bill of material (BOM), to show how often you could build
|
||||||
this project and directly withdraw all components needed from DB
|
this project and directly withdraw all components needed from DB
|
||||||
* Event log: Track what changes happens to your inventory, track which user does what. Revert your parts to older
|
* Event log: Track what changes happen to your inventory, track which user does what. Revert your parts to older
|
||||||
versions.
|
versions.
|
||||||
* Responsive design: You can use Part-DB on your PC, your tablet and your smartphone using the same interface.
|
* Responsive design: You can use Part-DB on your PC, your tablet, and your smartphone using the same interface.
|
||||||
* MySQL, SQLite and PostgreSQL are supported as database backends
|
* MySQL, SQLite and PostgreSQL are supported as database backends
|
||||||
* Support for rich text descriptions and comments in parts
|
* Support for rich text descriptions and comments in parts
|
||||||
* Support for multiple currencies and automatic update of exchange rates supported
|
* Support for multiple currencies and automatic update of exchange rates supported
|
||||||
* Powerful search and filter function, including parametric search (search for parts according to some specifications)
|
* Powerful search and filter function, including parametric search (search for parts according to some specifications)
|
||||||
* Easy migration from an existing PartKeepr instance (see [here]({%link partkeepr_migration.md %}))
|
* Easy migration from an existing PartKeepr instance (see [here]({%link partkeepr_migration.md %}))
|
||||||
* Use cloud providers (like Octopart, Digikey, Farnell or TME) to automatically get part information, datasheets and
|
* Use cloud providers (like Octopart, Digikey, Farnell, Mouser, or TME) to automatically get part information, datasheets, and
|
||||||
prices for parts (see [here]({% link usage/information_provider_system.md %}))
|
prices for parts (see [here]({% link usage/information_provider_system.md %}))
|
||||||
* API to access Part-DB from other applications/scripts
|
* API to access Part-DB from other applications/scripts
|
||||||
* [Integration with KiCad]({%link usage/eda_integration.md %}): Use Part-DB as central datasource for your
|
* [Integration with KiCad]({%link usage/eda_integration.md %}): Use Part-DB as the central datasource for your
|
||||||
KiCad and see available parts from Part-DB directly inside KiCad.
|
KiCad and see available parts from Part-DB directly inside KiCad.
|
||||||
|
|
||||||
With these features Part-DB is useful to hobbyists, who want to keep track of their private electronic parts inventory,
|
With these features, Part-DB is useful to hobbyists, who want to keep track of their private electronic parts inventory,
|
||||||
or makerspaces, where many users should have (controlled) access to the shared inventory.
|
or makerspaces, where many users should have (controlled) access to the shared inventory.
|
||||||
|
|
||||||
Part-DB is also used by small companies and universities for managing their inventory.
|
Part-DB is also used by small companies and universities for managing their inventory.
|
||||||
|
|
@ -67,11 +67,11 @@ See [LICENSE](https://github.com/Part-DB/Part-DB-symfony/blob/master/LICENSE) fo
|
||||||
## Donate for development
|
## Donate for development
|
||||||
|
|
||||||
If you want to donate to the Part-DB developer, see the sponsor button in the top bar (next to the repo name).
|
If you want to donate to the Part-DB developer, see the sponsor button in the top bar (next to the repo name).
|
||||||
There you will find various methods to support development on a monthly or a one time base.
|
There you will find various methods to support development on a monthly or a one-time basis.
|
||||||
|
|
||||||
## Built with
|
## Built with
|
||||||
|
|
||||||
* [Symfony 5](https://symfony.com/): The main framework used for the serverside PHP
|
* [Symfony 6](https://symfony.com/): The main framework used for the serverside PHP
|
||||||
* [Bootstrap 5](https://getbootstrap.com/) and [Bootswatch](https://bootswatch.com/): Used as website theme
|
* [Bootstrap 5](https://getbootstrap.com/) and [Bootswatch](https://bootswatch.com/): Used as website theme
|
||||||
* [Fontawesome](https://fontawesome.com/): Used as icon set
|
* [Fontawesome](https://fontawesome.com/): Used as icon set
|
||||||
* [Hotwire Stimulus](https://stimulus.hotwired.dev/) and [Hotwire Turbo](https://turbo.hotwired.dev/): Frontend
|
* [Hotwire Stimulus](https://stimulus.hotwired.dev/) and [Hotwire Turbo](https://turbo.hotwired.dev/): Frontend
|
||||||
|
|
|
||||||
|
|
@ -8,4 +8,4 @@ has_children: true
|
||||||
# Installation
|
# Installation
|
||||||
Below you can find some guides to install Part-DB.
|
Below you can find some guides to install Part-DB.
|
||||||
|
|
||||||
For the hobbyists without much experience, we recommend the docker installation or direct installation on debian.
|
For hobbyists without much experience, we recommend the Docker installation or direct installation on Debian.
|
||||||
|
|
@ -136,7 +136,7 @@ services:
|
||||||
# In docker env logs will be redirected to stderr
|
# In docker env logs will be redirected to stderr
|
||||||
- APP_ENV=docker
|
- APP_ENV=docker
|
||||||
|
|
||||||
# Uncomment this, if you want to use the automatic database migration feature. With this you have you do not have to
|
# Uncomment this, if you want to use the automatic database migration feature. With this you do not have to
|
||||||
# run the doctrine:migrations:migrate commands on installation or upgrade. A database backup is written to the uploads/
|
# run the doctrine:migrations:migrate commands on installation or upgrade. A database backup is written to the uploads/
|
||||||
# folder (under .automigration-backup), so you can restore it, if the migration fails.
|
# folder (under .automigration-backup), so you can restore it, if the migration fails.
|
||||||
# This feature is currently experimental, so use it at your own risk!
|
# This feature is currently experimental, so use it at your own risk!
|
||||||
|
|
|
||||||
|
|
@ -28,9 +28,9 @@ php bin/console cache:clear
|
||||||
php bin/console doctrine:migrations:migrate
|
php bin/console doctrine:migrations:migrate
|
||||||
```
|
```
|
||||||
|
|
||||||
If this does not help, please [open an issue on GitHub](https://github.com/Part-DB/Part-DB-symfony).
|
If this does not help, please [open an issue on GitHub](https://github.com/Part-DB/Part-DB-server).
|
||||||
|
|
||||||
## Search for the user and reset the password:
|
## Search for a user and reset the password
|
||||||
|
|
||||||
You can list all users with the following command: `php bin/console partdb:users:list`
|
You can list all users with the following command: `php bin/console partdb:users:list`
|
||||||
To reset the password of a user you can use the following
|
To reset the password of a user you can use the following
|
||||||
|
|
@ -52,4 +52,4 @@ Please include the error logs in your issue on GitHub, if you open an issue.
|
||||||
|
|
||||||
## Report Issue
|
## Report Issue
|
||||||
|
|
||||||
If an error occurs, or you found a bug, please [open an issue on GitHub](https://github.com/Part-DB/Part-DB-symfony).
|
If an error occurs, or you found a bug, please [open an issue on GitHub](https://github.com/Part-DB/Part-DB-server).
|
||||||
|
|
|
||||||
|
|
@ -5,5 +5,7 @@ nav_order: 7
|
||||||
has_children: true
|
has_children: true
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# Upgrade
|
||||||
|
|
||||||
This section provides information on how to upgrade Part-DB to the latest version.
|
This section provides information on how to upgrade Part-DB to the latest version.
|
||||||
This is intended for major release upgrades, where requirements or things change significantly.
|
This is intended for major release upgrades, where requirements or things change significantly.
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ parent: Usage
|
||||||
|
|
||||||
# Backup and Restore Data
|
# Backup and Restore Data
|
||||||
|
|
||||||
When working productively you should back up the data and configuration of Part-DB regularly to prevent data loss. This
|
When working productively, you should back up the data and configuration of Part-DB regularly to prevent data loss. This
|
||||||
is also useful if you want to migrate your Part-DB instance from one server to another. In that case, you just have to
|
is also useful if you want to migrate your Part-DB instance from one server to another. In that case, you just have to
|
||||||
back up the data on server 1, move the backup to server 2, install Part-DB on server 2, and restore the backup.
|
back up the data on server 1, move the backup to server 2, install Part-DB on server 2, and restore the backup.
|
||||||
|
|
||||||
|
|
@ -27,7 +27,7 @@ for more info about these options.
|
||||||
|
|
||||||
## Backup (manual)
|
## Backup (manual)
|
||||||
|
|
||||||
3 parts have to be backed up: The configuration files, which contain the instance-specific options, the
|
Three parts have to be backed up: The configuration files, which contain the instance-specific options, the
|
||||||
uploaded files of attachments, and the database containing the most data of Part-DB.
|
uploaded files of attachments, and the database containing the most data of Part-DB.
|
||||||
Everything else like thumbnails and cache files, are recreated automatically when needed.
|
Everything else like thumbnails and cache files, are recreated automatically when needed.
|
||||||
|
|
||||||
|
|
@ -44,7 +44,7 @@ You have to recursively copy the `uploads/` folder and the `public/media` folder
|
||||||
|
|
||||||
#### SQLite
|
#### SQLite
|
||||||
|
|
||||||
If you are using sqlite, it is sufficient to just copy your `app.db` from your database location (normally `var/app.db`)
|
If you are using SQLite, it is sufficient to just copy your `app.db` from your database location (normally `var/app.db`)
|
||||||
to your backup location.
|
to your backup location.
|
||||||
|
|
||||||
#### MySQL / MariaDB
|
#### MySQL / MariaDB
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ parent: Usage
|
||||||
|
|
||||||
Part-DB provides some console commands to display various information or perform some tasks.
|
Part-DB provides some console commands to display various information or perform some tasks.
|
||||||
The commands are invoked from the main directory of Part-DB with the command `php bin/console [command]` in the context
|
The commands are invoked from the main directory of Part-DB with the command `php bin/console [command]` in the context
|
||||||
of the database user (so usually the webserver user), so you maybe have to use `sudo` or `su` to execute the commands:
|
of the web server user (so usually the webserver user), so you may have to use `sudo` or `su` to execute the commands:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo -u www-data php bin/console [command]
|
sudo -u www-data php bin/console [command]
|
||||||
|
|
@ -17,8 +17,8 @@ sudo -u www-data php bin/console [command]
|
||||||
You can get help for every command with the parameter `--help`. See `php bin/console` for a list of all available
|
You can get help for every command with the parameter `--help`. See `php bin/console` for a list of all available
|
||||||
commands.
|
commands.
|
||||||
|
|
||||||
If you are running Part-DB in a docker container, you must either execute the commands from a shell inside a container,
|
If you are running Part-DB in a Docker container, you must either execute the commands from a shell inside the container,
|
||||||
or use the `docker exec` command to execute the command directly inside the container. For example if you docker container
|
or use the `docker exec` command to execute the command directly inside the container. For example, if your Docker container
|
||||||
is named `partdb`, you can execute the command `php bin/console cache:clear` with the following command:
|
is named `partdb`, you can execute the command `php bin/console cache:clear` with the following command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
@ -61,7 +61,7 @@ docker exec --user=www-data partdb php bin/console cache:clear
|
||||||
* `partdb:attachments:clean-unused`: Remove all attachments which are not used by any database entry (e.g. orphaned
|
* `partdb:attachments:clean-unused`: Remove all attachments which are not used by any database entry (e.g. orphaned
|
||||||
attachments)
|
attachments)
|
||||||
* `partdb:cache:clear`: Clears all caches, so the next page load will be slower, but the cache will be rebuilt. This can
|
* `partdb:cache:clear`: Clears all caches, so the next page load will be slower, but the cache will be rebuilt. This can
|
||||||
maybe fix some issues, when the cache were corrupted. This command is also needed after changing things in
|
maybe fix some issues when the cache was corrupted. This command is also needed after changing things in
|
||||||
the `parameters.yaml` file or upgrading Part-DB.
|
the `parameters.yaml` file or upgrading Part-DB.
|
||||||
* `partdb:migrations:import-partkeepr`: Imports a mysqldump XML dump of a PartKeepr database into Part-DB. This is only
|
* `partdb:migrations:import-partkeepr`: Imports a mysqldump XML dump of a PartKeepr database into Part-DB. This is only
|
||||||
needed for users, which want to migrate from PartKeepr to Part-DB. *All existing data in the Part-DB database is
|
needed for users, which want to migrate from PartKeepr to Part-DB. *All existing data in the Part-DB database is
|
||||||
|
|
@ -76,6 +76,6 @@ The value of the environment variable is copied to the settings database, so the
|
||||||
|
|
||||||
## Attachment commands
|
## Attachment commands
|
||||||
|
|
||||||
* `php bin/console partdb:attachments:download`: Download all attachments, which are not already downloaded, to the
|
* `php bin/console partdb:attachments:download`: Download all attachments that are not already downloaded to the
|
||||||
local filesystem. This is useful to create local backups of the attachments, no matter what happens on the remote and
|
local filesystem. This is useful to create local backups of the attachments, no matter what happens on the remote, and
|
||||||
also makes pictures thumbnails available for the frontend for them
|
also makes picture thumbnails available for the frontend for them.
|
||||||
|
|
|
||||||
|
|
@ -17,14 +17,14 @@ This also allows to configure available and usable parts and their properties in
|
||||||
## KiCad Setup
|
## KiCad Setup
|
||||||
|
|
||||||
{: .important }
|
{: .important }
|
||||||
> Part-DB uses the HTTP library feature of KiCad, which is experimental and not part of the stable KiCad 7 releases. If you want to use this feature, you need to install a KiCad nightly build (7.99 version). This feature will most likely also be part of KiCad 8.
|
> Part-DB uses the HTTP library feature of KiCad, which was experimental in earlier versions. If you want to use this feature, you need to install KiCad 8 or newer.
|
||||||
|
|
||||||
Part-DB should be accessible from the PCs with KiCAD. The URL should be stable (so no dynamically changing IP).
|
Part-DB should be accessible from the PCs with KiCad. The URL should be stable (so no dynamically changing IP).
|
||||||
You require a user account in Part-DB, which has permission to access Part-DB API and create API tokens. Every user can have its own account, or you set up a shared read-only account.
|
You require a user account in Part-DB, which has permission to access the Part-DB API and create API tokens. Every user can have their own account, or you set up a shared read-only account.
|
||||||
|
|
||||||
To connect KiCad with Part-DB do the following steps:
|
To connect KiCad with Part-DB do the following steps:
|
||||||
|
|
||||||
1. Create an API token on the user settings page for the KiCAD application and copy/save it, when it is shown. Currently, KiCad can only read Part-DB database, so a token with a read-only scope is enough.
|
1. Create an API token on the user settings page for the KiCad application and copy/save it when it is shown. Currently, KiCad can only read the Part-DB database, so a token with a read-only scope is enough.
|
||||||
2. Add some EDA metadata to parts, categories, or footprints. Only parts with usable info will show up in KiCad. See below for more info.
|
2. Add some EDA metadata to parts, categories, or footprints. Only parts with usable info will show up in KiCad. See below for more info.
|
||||||
3. Create a file `partd.kicad_httplib` (or similar, only the extension is important) with the following content:
|
3. Create a file `partd.kicad_httplib` (or similar, only the extension is important) with the following content:
|
||||||
```
|
```
|
||||||
|
|
@ -54,7 +54,7 @@ Part-DB doesn't save any concrete footprints or symbols for the part. Instead, P
|
||||||
|
|
||||||
You can define this on a per-part basis using the KiCad symbol and KiCad footprint field in the EDA tab of the part editor. Or you can define it at a category (symbol) or footprint level, to assign this value to all parts with this category and footprint.
|
You can define this on a per-part basis using the KiCad symbol and KiCad footprint field in the EDA tab of the part editor. Or you can define it at a category (symbol) or footprint level, to assign this value to all parts with this category and footprint.
|
||||||
|
|
||||||
For example, to configure the values for a BC547 transistor you would put `Transistor_BJT:BC547` on the parts Kicad symbol to give it the right schematic symbol in EEschema and `Package_TO_SOT_THT:TO-92` to give it the right footprint in PcbNew.
|
For example, to configure the values for a BC547 transistor you would put `Transistor_BJT:BC547` in the part's KiCad symbol field to give it the right schematic symbol in Eeschema and `Package_TO_SOT_THT:TO-92` to give it the right footprint in Pcbnew.
|
||||||
|
|
||||||
If you type in a character, you will get an autocomplete list of all symbols and footprints available in the KiCad standard library. You can also input your own value.
|
If you type in a character, you will get an autocomplete list of all symbols and footprints available in the KiCad standard library. You can also input your own value.
|
||||||
|
|
||||||
|
|
@ -65,7 +65,7 @@ you need to define at least a symbol, footprint, reference prefix, or value on a
|
||||||
|
|
||||||
You can use the "Force visibility" checkbox on a part or category to override this behavior and force parts to be visible or hidden in KiCad.
|
You can use the "Force visibility" checkbox on a part or category to override this behavior and force parts to be visible or hidden in KiCad.
|
||||||
|
|
||||||
*Please note that KiCad caches the library categories. So if you change something, which would change the visible categories in KiCad, you have to reload EEschema to see the changes.*
|
*Please note that KiCad caches the library categories. So if you change something that would change the visible categories in KiCad, you have to reload Eeschema to see the changes.*
|
||||||
|
|
||||||
### Category depth in KiCad
|
### Category depth in KiCad
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ nav_order: 4
|
||||||
|
|
||||||
# Getting started
|
# Getting started
|
||||||
|
|
||||||
After Part-DB you should begin with customizing the settings and setting up the basic structures.
|
After installing Part-DB, you should begin with customizing the settings and setting up the basic structures.
|
||||||
Before starting, it's useful to read a bit about the [concepts of Part-DB]({% link concepts.md %}).
|
Before starting, it's useful to read a bit about the [concepts of Part-DB]({% link concepts.md %}).
|
||||||
|
|
||||||
1. TOC
|
1. TOC
|
||||||
|
|
@ -15,7 +15,7 @@ Before starting, it's useful to read a bit about the [concepts of Part-DB]({% li
|
||||||
## Customize system settings
|
## Customize system settings
|
||||||
|
|
||||||
Before starting creating data structures, you should check the system settings to ensure that they fit your needs.
|
Before starting creating data structures, you should check the system settings to ensure that they fit your needs.
|
||||||
After login as an administrator, you can find the settings in the sidebar under `Tools -> System -> Settings`.
|
After logging in as an administrator, you can find the settings in the sidebar under `Tools -> System -> Settings`.
|
||||||

|

|
||||||
|
|
||||||
Here you can change various settings, like the name of your Part-DB instance (which is shown in the title bar of the
|
Here you can change various settings, like the name of your Part-DB instance (which is shown in the title bar of the
|
||||||
|
|
@ -35,9 +35,9 @@ the navigation bar drop-down with the user symbol).
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
There you can also find the option, to set up Two-Factor Authentication methods like Google Authenticator. Using this is
|
There you can also find the option to set up Two-Factor Authentication methods like Google Authenticator. Using this is
|
||||||
highly recommended (especially if you have admin permissions) to increase the security of your account. (Two-factor authentication
|
highly recommended (especially if you have admin permissions) to increase the security of your account. (Two-factor authentication
|
||||||
even can be enforced for all members of a user group)
|
can even be enforced for all members of a user group)
|
||||||
|
|
||||||
In the user settings panel, you can change account info like your username, your first and last name (which will be
|
In the user settings panel, you can change account info like your username, your first and last name (which will be
|
||||||
shown alongside your username to identify you better), department information, and your email address. The email address
|
shown alongside your username to identify you better), department information, and your email address. The email address
|
||||||
|
|
@ -64,7 +64,7 @@ $E=mc^2$) or `$$` (like `$$E=mc^2$$`) which will be rendered as a block, like so
|
||||||
When logged in as administrator, you can open the users menu in the `Tools` section of the sidebar
|
When logged in as administrator, you can open the users menu in the `Tools` section of the sidebar
|
||||||
under `System -> Users`.
|
under `System -> Users`.
|
||||||
On this page you can create new users, change their passwords and settings, and change their permissions.
|
On this page you can create new users, change their passwords and settings, and change their permissions.
|
||||||
For each user who should use Part-DB you should set up their own account so that tracking of what user did works
|
For each user who should use Part-DB, you should set up their own account so that tracking of what each user did works
|
||||||
properly.
|
properly.
|
||||||

|

|
||||||
|
|
||||||
|
|
@ -208,6 +208,6 @@ However, it is recommended to fill out as much information as possible, as this
|
||||||
later.
|
later.
|
||||||
|
|
||||||
You can choose from your created data structures to add manufacturer information, supplier information, etc. to the part.
|
You can choose from your created data structures to add manufacturer information, supplier information, etc. to the part.
|
||||||
You can also create new datastructures on the fly, if you want to add additional information to the part, by typing the
|
You can also create new data structures on the fly if you want to add additional information to the part, by typing the
|
||||||
name of the new datastructure in the field and select the "New ..." option in the dropdown menu. See [tips]({% link
|
name of the new data structure in the field and selecting the "New ..." option in the dropdown menu. See [tips]({% link
|
||||||
usage/tips_tricks.md %}) for more information.
|
usage/tips_tricks.md %}) for more information.
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ Part-DB. Data can also be exported from Part-DB into various formats.
|
||||||
> individually in the permissions settings.
|
> individually in the permissions settings.
|
||||||
|
|
||||||
If you want to import data from PartKeepr you might want to look into the [PartKeepr migration guide]({% link
|
If you want to import data from PartKeepr you might want to look into the [PartKeepr migration guide]({% link
|
||||||
upgrade/upgrade_legacy.md %}).
|
partkeepr_migration.md %}).
|
||||||
|
|
||||||
### Import parts
|
### Import parts
|
||||||
|
|
||||||
|
|
@ -47,9 +47,9 @@ You can upload the file that should be imported here and choose various options
|
||||||
the import file (or the export will error, if no category is specified).
|
the import file (or the export will error, if no category is specified).
|
||||||
* **Mark all imported parts as "Needs review"**: If this is selected, all imported parts will be marked as "Needs
|
* **Mark all imported parts as "Needs review"**: If this is selected, all imported parts will be marked as "Needs
|
||||||
review" after the import. This can be useful if you want to review all imported parts before using them.
|
review" after the import. This can be useful if you want to review all imported parts before using them.
|
||||||
* **Create unknown data structures**: If this is selected Part-DB will create new data structures (like categories,
|
* **Create unknown data structures**: If this is selected, Part-DB will create new data structures (like categories,
|
||||||
manufacturers, etc.) if no data structure(s) with the same name and path already exists. If this is not selected, only
|
manufacturers, etc.) if no data structure(s) with the same name and path already exist. If this is not selected, only
|
||||||
existing data structures will be used and if no matching data structure is found, the imported parts field will be empty.
|
existing data structures will be used, and if no matching data structure is found, the imported parts field will be empty.
|
||||||
* **Path delimiter**: Part-DB allows you to create/select nested data structures (like categories, manufacturers, etc.)
|
* **Path delimiter**: Part-DB allows you to create/select nested data structures (like categories, manufacturers, etc.)
|
||||||
by using a path (e.g. `Category 1->Category 1.1`, which will select/create the `Category 1.1` whose parent
|
by using a path (e.g. `Category 1->Category 1.1`, which will select/create the `Category 1.1` whose parent
|
||||||
is `Category 1`). This path is separated by the path delimiter. If you want to use a different path delimiter than the
|
is `Category 1`). This path is separated by the path delimiter. If you want to use a different path delimiter than the
|
||||||
|
|
|
||||||
|
|
@ -198,9 +198,9 @@ the [Mouser API page](https://www.mouser.de/api-home/).
|
||||||
You will receive an API token, which you have to put in the Part-DB env configuration (see below):
|
You will receive an API token, which you have to put in the Part-DB env configuration (see below):
|
||||||
At the registration you choose a country, language, and currency in which you want to get the results.
|
At the registration you choose a country, language, and currency in which you want to get the results.
|
||||||
|
|
||||||
*Attention*: Currently (January 2024) the mouser API seems to be somewhat broken, in the way that it does not return any
|
*Attention*: Currently (January 2024), the Mouser API seems to be somewhat broken, in the way that it does not return any
|
||||||
information about datasheets and part specifications. Therefore Part-DB cannot retrieve them, even if they are shown
|
information about datasheets and part specifications. Therefore Part-DB cannot retrieve them, even if they are shown
|
||||||
at the mouser page. See [issue #503](https://github.com/Part-DB/Part-DB-server/issues/503) for more info.
|
on the Mouser page. See [issue #503](https://github.com/Part-DB/Part-DB-server/issues/503) for more info.
|
||||||
|
|
||||||
Following env configuration options are available:
|
Following env configuration options are available:
|
||||||
|
|
||||||
|
|
@ -217,7 +217,7 @@ Following env configuration options are available:
|
||||||
webshop uses an internal JSON based API to render the page. Part-DB can use this inofficial API to get part information
|
webshop uses an internal JSON based API to render the page. Part-DB can use this inofficial API to get part information
|
||||||
from LCSC.
|
from LCSC.
|
||||||
|
|
||||||
**Please note, that the use of this internal API is not intended or endorsed by LCS and it could break at any time. So use it at your own risk.**
|
**Please note that the use of this internal API is not intended or endorsed by LCSC and it could break at any time. So use it at your own risk.**
|
||||||
|
|
||||||
An API key is not required, it is enough to enable the provider using the following env configuration options:
|
An API key is not required, it is enough to enable the provider using the following env configuration options:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ parent: Usage
|
||||||
Part-DB supports the generation and printing of labels for parts, part lots and storage locations.
|
Part-DB supports the generation and printing of labels for parts, part lots and storage locations.
|
||||||
You can use the "Tools -> Label generator" menu entry to create labels or click the label generation link on the part.
|
You can use the "Tools -> Label generator" menu entry to create labels or click the label generation link on the part.
|
||||||
|
|
||||||
You can define label templates by creating Label profiles. This way you can create many similar-looking labels with for
|
You can define label templates by creating label profiles. This way you can create many similar-looking labels for
|
||||||
many parts.
|
many parts.
|
||||||
|
|
||||||
The content of the labels is defined by the template's content field. You can use the WYSIWYG editor to create and style
|
The content of the labels is defined by the template's content field. You can use the WYSIWYG editor to create and style
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ $$E=mc^2$$
|
||||||
## Update currency exchange rates automatically
|
## Update currency exchange rates automatically
|
||||||
|
|
||||||
Part-DB can update the currency exchange rates of all defined currencies programmatically
|
Part-DB can update the currency exchange rates of all defined currencies programmatically
|
||||||
by calling the `php bin/console partdb:currencies:update-exchange-rates`.
|
by calling `php bin/console partdb:currencies:update-exchange-rates`.
|
||||||
|
|
||||||
If you call this command regularly (e.g. with a cronjob), you can keep the exchange rates up-to-date.
|
If you call this command regularly (e.g. with a cronjob), you can keep the exchange rates up-to-date.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue