This is my submission for the Infrastructure / Site Reliability Engineering Intern Technical Challenge. My extra feature is "Ability to create warehouses/locations and assign inventory to specific locations"
This project uses Ruby 2.7.3. If you don't have Ruby already installed, follow the instructions below
- Install rbenv on your specific system and follow setup
- Install ruby with
rbenv install 2.7.3
- Set local ruby version with
rbenv local 2.7.3
- Install Ruby 2.7.3 using other methods
(Required)
- PostgreSQL
Follow the instructions on the Postgres website to download Postgres >= 9
Make sure PostgreSQL is started up on your computer.
Note that if your environment paths are not set up correctly, you may have to run bin/rails [COMMAND]
instead of the normal rails
command.
rails db:create
rails db:migrate
# Optional, if you want to seed with fake data
rails db:seed
Test are located in the test/
folder.
rails t
# Only needed on initialization of production database
rails db:create -e production
rails db:migrate -e production
rails s -e production
The app includes
- rate limiting via Rack::Attack middleware
- healthcheck endpoint at /healthcheck
- slugs for warehouses (though still easily viewable via model ID in the backend)
- Custom logging with timestamps
- DB Timeouts
All available URLS can be seen with
bin/rails routes
You can view UML diagrams in the docs/
folder for a better understanding of the schema. To generate new diagrams, run
rake diagram:all
Models (and their respective validations) can be seen in the app/models/
folder