SF Unity Parts is a web-based system for tracking parts through the design and manufacturing cycle. It assigns part numbers with which CAD files can be saved to Onshape and stores information about parts' current manufacturing status.
SF Unity Parts is written in Ruby using the Sinatra framework and uses MySQL as the backing datastore. Development and production are run on UNIX (OS X and Ubuntu), so there are no guarantees it'll work on Windows.
SF Unity Parts is built on Cheesy Parts, a tool created by Pat Fairbank at Team 254 and Deep Blue Parts, a fork created by Team 199.
Our fork differs from 254's in a few ways:
If you want to test-drive the database, you can use Docker to quickly set up the server.
Prerequisites:
To run SF Unity Parts in a container:
config.json
with parameters for the dev and prod environments. config.json.docker
contains all the presets you would need to run with the provided docker-compose.yml
. Feel free to change the database, username, and password fields, as long as you do it in both the config and compose files.docker-compose up -d web
. This will build and run your SF Unity Parts server in the background.docker-compose run migrations
. This will perform the database migration operations that are needed. You may need to run this more than once if an error occurs.localhost:9000
! docker-compose down
.Prerequisites:
To run SF Unity Parts locally:
config.json
with the parameters for the development and production environments. Set
enable_wordpress_auth
to false and members_url
to blank; they are used for a single sign-on (SSO)
mechanism specific to Team 254. Make sure to add your Slack and Trello API tokens if using those features.bundle install
. This will download and install the gems that SF Unity Parts depends on.bundle exec rake db:migrate
. This will run the database migrations to create the necessary tables in
MySQL.ruby parts_server_control.rb <command>
to control the running of the parts server, where
<command>
can be one of start
|stop
|run
|restart
.The database migration will create an admin account (username "deleteme@team199.org", password "shark-tank") that you can use to first get into the system and create other accounts. It is highly recommended that you delete this account after having created your own admin account.
Uploads are stored in uploads/
and at this time can only be directly managed by logging into your server.
If you encounter a bug, please create a GitHub issue and let us know so that we can look into it.
If you have a suggestion for a new feature in Cheesy Parts, create an issue on GitHub or shoot an e-mail to pat@patfairbank.com. Or if you have some Ruby-fu and are feeling adventurous, fork Team 254 and send a pull request. If you are interested in adding to Deep Blue Parts, please contact Matt (@morops) or Cole (@icecube45).