Programming and Code

PartFinder component inventory manager

After spending far too long looking for components and parts, I wrote a component inventory manager called PartFinder and released it as open source for anyone to download and use

Part Finder

For several years we have been using PartKeepr https://partkeepr.org/ to keep track of the thousands of components we have in our workshop.

Over the past few months, we found the daily backups from PartKeepr are taking a very long time due to the thousands of folders and files the software creates. Our install of Partkeepr has over 113,000 folders.

As I currently have plenty of spare time due to the lockdown from the global pandemic, I decided to write my own component inventory system and make it open source for anyone else to use.

As our web servers run Windows Server I decided to make this as a ASP.Net C# project and use SQL Server Express (or full) for the database.

This can also be run on a Windows desktop / laptop running Windows 10 Pro with the installation of the IIS services and SQL Server Express.

Installation

To install and setup PartFinder, download the files from Github https://github.com/briandorey/PartFinder and extract to a folder.

In SQL Manager, create a new database called PartFinder and run database.sql in partfinder/setup to create the database tables, views and add default data for footprints and part categories.

Create a new user for the database and give the following permissions: Connect, Select, Update, Delete, Execute.

Edit the web.config file in the PartFinder root and update the connection string MainConn in with the username and password for your database.

In Internet Information Services (IIS) Manager, create a new website and set the folder path to the location you extracted the files.

Setup Security

If you are running this application on a public facing connection or server, you need to create a login using an email address and password.

To add the first user, go to the /setup folder in your web browser and create your first user account to sign into Part Finder.

Delete the setup folder once setup is completed.

The system can be used on an intranet or local machine without the login requirement by commenting out the following section in the web.config file:

<authentication mode="Forms"> 
<forms name=".ASPXAUTH" loginUrl="/login.aspx" path="/" timeout="30" defaultUrl="/default.aspx" /> 
</authentication> <authorization> 
<deny users ="?" /> <allow users = "*" /> 
</authorization>  

Images and File Manager Permissions

The admin section contains a file manager which allows you to create directories / folders and add files within the "/docs" folder in the website root.

This will need to add read/write permissions for the IIS/User account on your server/computer for this folder.

Dashboard
Dashboard
admin
Admin
File manager
File manager
Manufacturers
Manufacturers

Dashboard

The Dashboard gives you an overview of the system with totals for Parts, Manufacturers, Attachments and Storage Locations. It also lists any parts which have less than your low stock level available.

Parts

The Parts section is where you manage all your components / parts with a tree-view or list view to find your parts and a parts details page with your item’s main details, attachments, suppliers and parameters.

You can also duplicate a part if you are adding similar new items.

Storage

In the Storage section you can add and edit your storage locations before adding new parts for each location.

You can add storage locations one at a time or use the Storage Location Grid page to bulk add locations such as storage drawers etc. These can be edited in the admin section (cog icon).

Manufacturers

In the Manufacturers section you can add and edit component manufacturers before adding new parts. These can be edited in the admin section (cog icon).

Footprints

In the Footprints section you can add and edit your component footprints before adding new parts. These can be edited in the admin section (cog icon).

Files

The file manager allows you to view the /docs folder on your PartFinder website. You can add upload new files and create folders, view and delete files.

Please note if you delete a folder or file which is linked to an existing part, it will not remove the database record for the file.

Admin

The admin section has Add, Edit and List pages for Users, Categories, Footprint Categories, Footprints, Storage Locations, Manufacturers and the file manager.

Parts Management

Dashboard
Parts List
Add new Part
Add Part
Edit Part
Edit Part
Part Details
Part Details

License

Copyright 2020 Brian Dorey

This software has been released under the MIT license https://opensource.org/licenses/MIT

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Permalink


36 comments

avatar
Chetan Soni
10 February 2021 at 7:08 am
Hi..
Am getting this error on trying to run the sql file "Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[test] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [Parts](' at line 1
"
avatar
Brian
10 February 2021 at 9:14 am
Chetan, you need to use Microsoft SQL Server, not MySQL for the database.
avatar
Chetan Soni
11 February 2021 at 7:54 am
Hi Brian, am completely new to all of this so having issues. Now am stuck at website, I have created new website in IIS but when I try to open it in browser it says "Can't reach this page, server IP address could not be found". Any help would be appreciated.
avatar
Joern
22 July 2021 at 8:43 pm
Works great !!
avatar
Mark Mason
24 July 2021 at 5:49 pm
How do I configure this, if not using the route of the website - for example www.website.com/part-finder
avatar
Brian
24 July 2021 at 6:23 pm
Mark, You need to update the web.config to point any file references to the sub folder and copy all files into the sub folder. You may need to update file paths to the new folder location.
avatar
Manfred
22 April 2022 at 10:53 am
Hi Brian, when I modify the footprint in /doc/footprint the corrosponding part still keeps the old footprint. How can I update the parts footprint?
avatar
Brian
22 April 2022 at 11:28 am
Hi Manfred
Are you editing the footprints in the admin section /admin/footprints/default.aspx ? Updating a footprint should update all parts which are using it.
avatar
Manfred
28 April 2022 at 1:23 pm
Hi Brian, you didn´t get me right: When I modify the symbol for a footprint in /doc/footprint/ and the try to change it for the footprint, I still see the old grafic under ../admin/filebrowser.aspx?d=\footprints&fn=form1&fieldname=ContentPlaceHolder1_FootprintImage
and i can´t change the symbol for the footprint.
avatar
Brian
29 April 2022 at 10:00 am
Hi Manfred, I think you will need to delete the old image first then upload a new one with the same name. I dont think the file manager will overwrite an exiting file.
avatar
Manfred
29 April 2022 at 10:33 am
When I delete the old symbol and then upload a new with the same name, I can see the new symbol in the file preview. But when I change the symbol in the footprint it still shows the old symbol. when I go back to Admin/Files/docs/footprints there is the old symbol too. Seems like the database kepps the old information and bring it back due to the same file name....
any ideas?
avatar
Swapnil sahu
10 June 2022 at 4:59 pm
how to run this application can anybody tell?
I'm getting error while login
avatar
Brian
10 June 2022 at 8:17 pm
What is the error message you are getting when trying to login? Are the database permissions setup correctly?
avatar
Swapnil sahu
10 June 2022 at 5:01 pm
can you make a video on installation of partfinder?
avatar
Swapnil sahu
13 June 2022 at 6:04 am
I'm getting this error " The Web project 'PartFinder-master' requires SQL Server Express, which is not
installed on this computer.
To upgrade the project database to use latest SQL Server Express LocalDB,
double-click the database file and follow the instructions. Note: After this
upgrade, the project database can't be modified using earlier versions of
Visual Studio.
To continue using the same database for this project, install it from the
Microsoft Download Center.".
avatar
Brian
13 June 2022 at 9:01 am
You can download SQL Server Express from the link at the bottom of the page on https://www.microsoft.com/en-gb/sql-server/sql-server-downloads
avatar
Swapnil sahu
14 June 2022 at 6:10 am
Now it is saying "can't reach the site".
avatar
Swapnil sahu
14 June 2022 at 7:05 am
A network-related or instance-specific error occurred while
establishing a connection to SOL Server. The server was not
found or was not accessible. Verify that the instance name is
correct and that SQL Server is configured to allow remote
connections. (provider: SQL Network Interfaces, error: 26
Error Locating Server/Instance Specified)
avatar
Swapnil sahu
15 June 2022 at 9:43 am
I am getting this error now "A network-related or instance-specific error occurred while
establishing a connection to SOL Server. The server was not
found or was not accessible. Verify that the instance name is
correct and that SQL Server is configured to allow remote
connections. (provider: SQL Network Interfaces, error: 26
Error Locating Server/Instance Specified)".
avatar
Brian
15 June 2022 at 11:40 am
I have created a new video which is embeded in the post above and can also be viewed at https://www.youtube.com/watch?v=HMtly87fJGA which shows the installation steps
avatar
Swapnil sahu
15 June 2022 at 7:48 pm
I tried two time and it is giving me this error again " Server Error in '/' Application.
Login failed for user 'PartFinder'. Reason: The password of the account must be changed
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'PartFinder'. Reason: The password of the account must be changed.
".
avatar
Brian
15 June 2022 at 9:39 pm
I think you forgot to untick the option on the database user account for Enforce password policy, Enforce password expiration and User must change password at next login
avatar
Swapnil sahu
16 June 2022 at 6:18 am
Thank you so much sir for giving your precious time to me it really means a lot to me
thank you so much again :)
avatar
Swapnil sahu
16 June 2022 at 8:09 am
Sir how to deploy this project into locally or into same server to multiple PCs?
avatar
Brian
16 June 2022 at 10:56 am
To allow other computers on your network to access the website, you will need to allow network port 80 on the computers firewall and this will allow the other computers to access the website in their browsers via the IP address or computer name.
avatar
Swapnil sahu
21 June 2022 at 11:00 am
Sir can I deploy this project in web and if I do so will it be secured?
avatar
Brian
21 June 2022 at 12:07 pm
You can have the partfinder system as a publically accessible website but you must remove the setup folder before the site is live on the internet.
avatar
Swapnil sahu
22 June 2022 at 6:09 am
and how we can do that? should I directly upload the database and file into site?
avatar
Brian
22 June 2022 at 10:16 am
You will need a Windows web server with MS Sql server installed and set it up in the same way as you did on your Windows 10 computer. You will need a domain name to be configured for the server.
avatar
Swapnil sahu
22 June 2022 at 1:02 pm
Thank you sir.
avatar
Swapnil sahu
22 June 2022 at 1:05 pm
Sir do you know any thing about libuvc windows?
avatar
Brian
23 June 2022 at 9:48 am
I am sorry but I dont know anything about libuvc
avatar
Swapnil sahu
27 June 2022 at 2:14 pm
can you tell where can i deploy this project?
avatar
Brian
27 June 2022 at 3:13 pm
You can deploy the project on any Windows Server which has MS SQL Server Express or MS SQL Server installed
avatar
swapnil
04 August 2022 at 11:27 am
sir while adding parts it is not show in the dashboard but it is showing how many parts are there.
why it is happening?
avatar
Brian
09 August 2022 at 9:29 am
Did you assign a manufacturer and category to the part? This can stop them from appearing in the lists.

This has been fixed on an update which was added to github

Leave a reply

Your email address will not be published. Required fields are marked *

Share this post

Support the blog

AB Electronics Raspberry Pi shop