From 058c7a7b130334a9a81fff3a784c063c1b8eb397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Mon, 23 Jan 2023 14:03:46 +0100 Subject: [PATCH] doc: add project goal --- README.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..7cbc9e6 --- /dev/null +++ b/README.md @@ -0,0 +1,61 @@ +partdb is an electronic parts manager. + +goals +===== + +I wished for a part manager with the following properties: + +- self hosted: I do not wish to rely on an external service (which could become unreachable or simply disappear) +- web interface: this removes the need of yet another window running while designing boards, and just integrates well with the remaining part searching activity (e.g. on manufacturer and distributor web pages) +- customizable: simply because everyone has a different designing work flow, and wants to optimize their tools according to it (particularly myself) + +One matching solution I found is [PartKeepr](https://partkeepr.org/). +I used it for several year, and it could still be OK for my needs. +But some aspects are just not that optimal anymore: + +- it is not developed anymore since 2018 (a docker image keeps it runnable) +- logging in, and searching for parts is slow +- customizing it is really hard (views, features, ...) +- you always have to edit the part and click several times to copy any kind of value + +I recently also discovered [Binner](https://binner.io/). +It does not allow to add custom part properties, or third parties distributors. +But it's a young project and seems promising. + +Because they did not fit by power user demands, I decided to implement my own solution. +partdb is very crude, but it works, particularly for me. + +components +========== + +Part information is: + +- stored in a MariaDB/mySQL database +- retrieved using a sinatra HTTP/REST server +- displayed using minimal HTML+JS pages + +installation +============ + +install software dependencies (here for Arch linux): + +~~~ +sudo pacman -S mariadb +sudo pacman -S ruby-sinatra ruby-webrick +pikaur -S ruby-mysql2 +~~~ + +configure database + +~~~ +sudo mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql +sudo mysql +CREATE DATABASE partdb; +CREATE USER 'partdb'@localhost IDENTIFIED BY 'password'; +GRANT ALL PRIVILEGES ON partdb.* TO 'partdb'@localhost; +exit +mysql --user=partdb --password=password --database=partdb < schema.sql +~~~ + +put the database access information in `credentials.json` and run `server.rb`. +now go to http://localhost:4244 and you are ready to use it.