Giter Club home page Giter Club logo

sleepy-parts's Introduction

Nerdy Parts

Nerdy Parts is a web-based system for tracking parts through the design and manufacture cycle. It assigns part numbers with which CAD files can be saved to version control and stores information about parts' current manufacturing status.

Nerdy 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, sorry.

Nerdy Parts is forked from Cheesy Parts by Team254.

Development

Prerequisites:

  • Ubuntu (production = Ubuntu 18.04.01 LTS)
  • Ruby 2.3 (production = ruby 2.3.0p0 (2015-12-25 revision 53290))
  • Bundler
  • MySQL

To run Nerdy Parts locally:

  1. Install RVM (https://github.com/rvm/ubuntu_rvm)
  2. Install Ruby rvm install ruby-2.3.0
  3. Install MySQL
    1. sudo apt install mysql-server libmysqlclient-dev
    2. mysql --version
    3. sudo /etc/init.d/mysql start
    4. sudo mysql_secure_installation
  4. Create empty MySQL database and user account with full permissions on it.
    1. sudo mysql
    2. CREATE DATABASE IF NOT EXISTS nerdy_parts;
    3. CREATE USER ‘team2337’@’localhost’ IDENTIFIED BY ‘correcthorsebatterystaple’;
    4. GRANT ALL ON nerdy_parts.* TO 'team2337'@'localhost';
  5. Populate 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.
  6. Run bundle install. This will download and install the gems that Nerdy Parts depends on.
  7. Run bundle exec rake db:migrate. This will run the database migrations to create the necessary tables in MySQL.
  8. Run ruby parts_server_control.rb <command> to control the running of the Nerdy Parts server, where <command> can be one of start|stop|run|restart.

The database migration will create an admin account (username "[email protected]", password "chezypofs") 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.

Deployment

Nerdy Parts deploys by checking out from Git on the production server. If you don't plan on making any changes, you can simply put a copy of the code on your server and edit the config in place. If you do plan on making periodic changes to the code, you can follow this procedure:

  1. Fork nerdy-parts on Github, make your initial code/config changes, and commit them.
  2. On the production server, clone your fork and start it up the first time.
  3. Fill in your server-specific information in the deploy script.
  4. Make any incremental changes in your development machine, test them locally, commit and push them, then run the deploy script.

The deploy script uses SSH to log into the production server, discard any local changes in the checked-out version of Nerdy Parts, pull from the origin, and restart the server.

Contributing

If you have a suggestion for a new feature, create an issue on GitHub or shoot an e-mail to [email protected]. Or if you have some Ruby-fu and are feeling adventurous, fork this project and send a pull request.

sleepy-parts's People

Contributors

patfair avatar rhyser9 avatar dumnersm580 avatar sumigovindaraju avatar wardbenjamin avatar zachorr avatar neyre avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.