2019-03-27 17:21:06 +01:00
|
|
|
[](https://scrutinizer-ci.com/g/Part-DB/Part-DB-symfony/?branch=master)
|
2020-05-26 18:45:22 +02:00
|
|
|

|
|
|
|

|
2023-02-12 23:37:09 +01:00
|
|
|
[](https://codecov.io/gh/Part-DB/Part-DB-server)
|
2019-10-13 21:13:37 +02:00
|
|
|

|
2023-06-29 23:35:06 +02:00
|
|
|

|
2019-03-27 17:21:06 +01:00
|
|
|
|
2020-01-08 19:45:35 +01:00
|
|
|

|
2021-03-14 19:42:12 +01:00
|
|
|

|
2022-07-22 00:18:04 +02:00
|
|
|
[](https://part-db.crowdin.com/part-db)
|
2020-01-08 19:45:35 +01:00
|
|
|
|
2023-10-15 13:27:20 +02:00
|
|
|
**[Documentation](https://docs.part-db.de/)** | **[Demo](https://part-db.herokuapp.com)** | *
|
|
|
|
*[Docker Image](https://hub.docker.com/r/jbtronics/part-db1)**
|
2023-02-09 00:14:36 +01:00
|
|
|
|
2019-03-27 17:16:06 +01:00
|
|
|
# Part-DB
|
2023-10-15 13:27:20 +02:00
|
|
|
|
|
|
|
Part-DB is an Open-Source inventory management system for your electronic components.
|
2019-03-27 17:16:06 +01:00
|
|
|
It is installed on a web server and so can be accessed with any browser without the need to install additional software.
|
|
|
|
|
2023-10-15 13:27:20 +02:00
|
|
|
The version in this Repository is a complete rewrite of the legacy [Part-DB](https://github.com/Part-DB/Part-DB)
|
|
|
|
(Version < 1.0) based on a modern framework.
|
|
|
|
Currently, it is still missing some (minor) features from the old version
|
|
|
|
(see [UPGRADE.md](https://docs.part-db.de/upgrade_legacy.html)) for more details, but also many huge improvements and
|
|
|
|
advantages compared to the old version.
|
|
|
|
If you start completely new with Part-DB it is recommended that you use the version from this repository, as it is
|
|
|
|
actively developed.
|
2020-05-12 23:42:03 +02:00
|
|
|
|
2023-10-15 13:27:20 +02:00
|
|
|
If you find a bug, please open an [Issue on GitHub,](https://github.com/Part-DB/Part-DB-server/issues) so it can be fixed
|
|
|
|
for everybody.
|
2019-03-27 17:16:06 +01:00
|
|
|
|
2019-04-06 00:03:16 +02:00
|
|
|
## Demo
|
2023-10-15 13:27:20 +02:00
|
|
|
|
|
|
|
If you want to test Part-DB without installing it, you can use [this](https://part-db.herokuapp.com) Heroku instance.
|
|
|
|
(Or this link for the [German Version](https://part-db.herokuapp.com/de/)).
|
2019-04-06 00:03:16 +02:00
|
|
|
|
|
|
|
You can log in with username: *user* and password: *user*.
|
|
|
|
|
2023-02-12 23:37:09 +01:00
|
|
|
Every change to the master branch gets automatically deployed, so it represents the current development progress and is
|
2023-10-15 13:27:20 +02:00
|
|
|
maybe not completely stable. Please mind, that the free Heroku instance is used, so it can take some time when loading
|
|
|
|
the page
|
2019-04-06 00:03:16 +02:00
|
|
|
for the first time.
|
|
|
|
|
2023-02-12 23:52:38 +01:00
|
|
|
<img src="https://github.com/Part-DB/Part-DB-server/raw/master/docs/assets/readme/part_info.png">
|
|
|
|
<img src="https://github.com/Part-DB/Part-DB-server/raw/master/docs/assets/readme/parts_list.png">
|
|
|
|
|
2019-03-27 17:16:06 +01:00
|
|
|
## Features
|
2023-10-15 13:27:20 +02:00
|
|
|
|
|
|
|
* 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
|
|
|
|
like datasheets or pictures with the parts.
|
2020-05-07 21:47:22 +02:00
|
|
|
* Multi-Language support (currently German, English, Russian, Japanese and French (experimental))
|
2023-01-23 13:31:32 +01:00
|
|
|
* Barcodes/Labels generator for parts and storage locations, scan barcodes via webcam using the builtin barcode scanner
|
2023-10-15 13:27:20 +02:00
|
|
|
* User system with groups and detailed (fine granular) permissions.
|
|
|
|
Two-factor authentication is supported (Google Authenticator and Webauthn/U2F keys) and can be enforced for groups.
|
|
|
|
Password reset via email can be setup.
|
|
|
|
* Optional support for single sign-on (SSO) via SAML (using an intermediate service
|
|
|
|
like [Keycloak](https://www.keycloak.org/) you can connect Part-DB to an existing LDAP or Active Directory server)
|
2023-03-18 21:41:00 +01:00
|
|
|
* Import/Export system for parts and datastructure. BOM import for projects from KiCAD is supported.
|
2023-10-15 13:27:20 +02:00
|
|
|
* 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
|
|
|
|
* Event log: Track what changes happens to your inventory, track which user does what. Revert your parts to older
|
|
|
|
versions.
|
2020-01-05 22:04:19 +01:00
|
|
|
* Responsive design: You can use Part-DB on your PC, your tablet and your smartphone using the same interface.
|
2023-02-12 23:37:09 +01:00
|
|
|
* MySQL and SQLite supported as database backends
|
2023-01-23 13:37:52 +01:00
|
|
|
* Support for rich text descriptions and comments in parts
|
|
|
|
* 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)
|
2023-02-12 23:52:38 +01:00
|
|
|
* Automatic thumbnail generation for pictures
|
2023-10-15 13:27:20 +02:00
|
|
|
* Use cloud providers (like Octopart, Digikey, farnell or TME) to automatically get part information, datasheets and
|
|
|
|
prices for parts
|
2023-10-15 13:28:40 +02:00
|
|
|
* API to access Part-DB from other applications/scripts
|
2023-01-23 13:31:32 +01:00
|
|
|
|
2023-02-12 23:37:09 +01:00
|
|
|
With these features Part-DB is useful to hobbyists, who want to keep track of their private electronic parts inventory,
|
2020-01-05 22:04:19 +01:00
|
|
|
or makerspaces, where many users have should have (controlled) access to the shared inventory.
|
|
|
|
|
|
|
|
Part-DB is also used by small companies and universities for managing their inventory.
|
|
|
|
|
2019-03-27 17:16:06 +01:00
|
|
|
## Requirements
|
2023-10-15 13:27:20 +02:00
|
|
|
|
|
|
|
* A **web server** (like Apache2 or nginx) that is capable of
|
|
|
|
running [Symfony 5](https://symfony.com/doc/current/reference/requirements.html),
|
|
|
|
this includes a minimum PHP version of **PHP 8.1**
|
|
|
|
* A **MySQL** (at least 5.7) /**MariaDB** (at least 10.2.2) database server if you do not want to use SQLite.
|
|
|
|
* Shell access to your server is highly suggested!
|
|
|
|
* For building the client side assets **yarn** and **nodejs** (>= 18.0) is needed.
|
|
|
|
|
2019-03-27 17:16:06 +01:00
|
|
|
## Installation
|
2019-08-15 18:13:00 +02:00
|
|
|
|
2023-10-15 13:27:20 +02:00
|
|
|
If you want to upgrade your legacy (< 1.0.0) version of Part-DB to this version, please
|
|
|
|
read [this](https://docs.part-db.de/upgrade_legacy.html) first.
|
2020-01-08 19:45:35 +01:00
|
|
|
|
2023-10-15 13:27:20 +02:00
|
|
|
*Hint:* A docker image is available under [jbtronics/part-db1](https://hub.docker.com/r/jbtronics/part-db1). How to set
|
|
|
|
up Part-DB via docker is described [here](https://docs.part-db.de/installation/installation_docker.html).
|
|
|
|
|
|
|
|
**Below you find some very rough outline of the installation process, see [here](https://docs.part-db.de/installation/)
|
|
|
|
for a detailed guide how to install Part-DB.**
|
2022-07-18 23:51:54 +02:00
|
|
|
|
2019-03-27 17:16:06 +01:00
|
|
|
1. Copy or clone this repository into a folder on your server.
|
2023-10-15 13:27:20 +02:00
|
|
|
2. Configure your webserver to serve from the `public/` folder.
|
|
|
|
See [here](https://symfony.com/doc/current/setup/web_server_configuration.html)
|
|
|
|
for additional information.
|
2019-03-27 17:16:06 +01:00
|
|
|
3. Copy the global config file `cp .env .env.local` and edit `.env.local`:
|
|
|
|
* Change the line `APP_ENV=dev` to `APP_ENV=prod`
|
2023-10-15 13:27:20 +02:00
|
|
|
* If you do not want to use SQLite, change the value of `DATABASE_URL=` to your needs (
|
|
|
|
see [here](http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url))
|
|
|
|
for the format.
|
|
|
|
In bigger instances with concurrent accesses, MySQL is more performant. This can not be changed easily later, so
|
|
|
|
choose wisely.
|
2022-07-18 23:51:54 +02:00
|
|
|
4. Install composer dependencies and generate autoload files: `composer install -o --no-dev`
|
2023-10-15 13:27:20 +02:00
|
|
|
5. If you have put Part-DB into a subdirectory on your server (like `part-db/`), you have to edit the file
|
|
|
|
`webpack.config.js` and uncomment the lines (remove the `//` before the lines) `.setPublicPath('/part-db/build')` (
|
|
|
|
line 43) and
|
|
|
|
`.setManifestKeyPrefix('build/')` (line 44). You have to replace `/part-db` with your own path on line 44.
|
2020-01-13 20:05:07 +01:00
|
|
|
6. Install client side dependencies and build it: `yarn install` and `yarn build`
|
|
|
|
7. _Optional_ (speeds up first load): Warmup cache: `php bin/console cache:warmup`
|
2023-10-15 13:27:20 +02:00
|
|
|
8. Upgrade database to new scheme (or create it, when it was empty): `php bin/console doctrine:migrations:migrate` and
|
|
|
|
follow the instructions given. During the process the password for the admin is user is shown. Copy it. **Caution**:
|
|
|
|
This steps tamper with your database and could potentially destroy it. So make sure to make a backup of your
|
|
|
|
database.
|
|
|
|
9. You can configure Part-DB via `config/parameters.yaml`. You should check if settings match your expectations, after
|
|
|
|
you installed/upgraded Part-DB. Check if `partdb.default_currency` matches your mainly used currency (this can not be
|
|
|
|
changed after creating price information).
|
2020-05-12 23:42:03 +02:00
|
|
|
Run `php bin/console cache:clear` when you changed something.
|
2023-10-15 13:27:20 +02:00
|
|
|
10. Access Part-DB in your browser (under the URL you put it) and login with user *admin*. Password is the one outputted
|
|
|
|
during DB setup.
|
|
|
|
If you can not remember the password, set a new one with `php bin/console app:set-password admin`. You can create
|
|
|
|
new users with the admin user and start using Part-DB.
|
2019-03-27 17:16:06 +01:00
|
|
|
|
|
|
|
When you want to upgrade to a newer version, then just copy the new files into the folder
|
|
|
|
and repeat the steps 4. to 7.
|
|
|
|
|
2023-10-15 13:27:20 +02:00
|
|
|
Normally a random password is generated when the admin user is created during initial database creation,
|
|
|
|
however you can set the initial admin password, by setting the `INITIAL_ADMIN_PW` env var.
|
2023-02-09 00:14:36 +01:00
|
|
|
|
2023-10-15 13:27:20 +02:00
|
|
|
You can configure Part-DB to your needs by changing environment variables in the `.env.local` file.
|
2023-02-12 23:37:09 +01:00
|
|
|
See [here](https://docs.part-db.de/configuration.html) for more information.
|
|
|
|
|
2022-07-17 22:59:38 +02:00
|
|
|
### Reverse proxy
|
2023-10-15 13:27:20 +02:00
|
|
|
|
|
|
|
If you are using a reverse proxy, you have to ensure that the proxies sets the `X-Forwarded-*` headers correctly, or you
|
|
|
|
will get HTTP/HTTPS mixup and wrong hostnames.
|
|
|
|
If the reverse proxy is on a different server (or it cannot access Part-DB via localhost) you have to set
|
|
|
|
the `TRUSTED_PROXIES` env variable to match your reverse proxies IP-address (or IP block). You can do this in
|
|
|
|
your `.env.local` or (when using docker) in your `docker-compose.yml` file.
|
2022-07-17 22:59:38 +02:00
|
|
|
|
2020-05-14 09:52:02 +02:00
|
|
|
## Donate for development
|
2023-10-15 13:27:20 +02:00
|
|
|
|
2020-05-14 09:52:02 +02:00
|
|
|
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.
|
|
|
|
|
2019-03-27 17:16:06 +01:00
|
|
|
## Built with
|
2023-10-15 13:27:20 +02:00
|
|
|
|
2021-04-05 21:08:25 +02:00
|
|
|
* [Symfony 5](https://symfony.com/): The main framework used for the serverside PHP
|
2023-01-23 13:35:29 +01:00
|
|
|
* [Bootstrap 5](https://getbootstrap.com/) and [Bootswatch](https://bootswatch.com/): Used as website theme
|
2023-02-12 23:37:09 +01:00
|
|
|
* [Fontawesome](https://fontawesome.com/): Used as icon set
|
2023-10-15 13:27:20 +02:00
|
|
|
* [Hotwire Stimulus](https://stimulus.hotwired.dev/) and [Hotwire Turbo](https://turbo.hotwired.dev/): Frontend
|
|
|
|
Javascript
|
2019-03-27 17:16:06 +01:00
|
|
|
|
|
|
|
## Authors
|
|
|
|
|
2023-10-15 13:27:20 +02:00
|
|
|
* **Jan Böhmer** - *Initial work* - [GitHub](https://github.com/jbtronics/)
|
|
|
|
|
|
|
|
See also the list of [contributors](https://github.com/Part-DB/Part-DB-server/graphs/contributors) who participated in
|
|
|
|
this project.
|
2019-03-27 17:16:06 +01:00
|
|
|
|
|
|
|
Based on the original Part-DB by Christoph Lechner and K. Jacobs
|
|
|
|
|
|
|
|
## License
|
2023-10-15 13:27:20 +02:00
|
|
|
|
2020-02-22 18:14:36 +01:00
|
|
|
Part-DB is licensed under the GNU Affero General Public License v3.0 (or at your opinion any later).
|
2019-03-27 17:16:06 +01:00
|
|
|
This mostly means that you can use Part-DB for whatever you want (even use it commercially)
|
2020-02-22 18:14:36 +01:00
|
|
|
as long as you publish the source code for every change you make under the AGPL, too.
|
2019-03-27 17:16:06 +01:00
|
|
|
|
2023-02-12 23:37:09 +01:00
|
|
|
See [LICENSE](https://github.com/Part-DB/Part-DB-server/blob/master/LICENSE) for more information.
|