Lunch Matcher is a monolithic React / Ruby application. It uses Vite for faster development of the Frontend.
- Node v16
- Ruby 3.2.2
npm install
bundle install
rails db:prepare
Start Vite dev server with:
./bin/vite dev
And Rails with:
bundle exec rails s
bundle rails db:prepare RAILS_ENV=test
bundle exec rspec
npm run test
It should be mostly self explanatory, but access the server with localhost:3000
. You should see the Lunch Matcher hero and an empty table, that you can fill using the Modal that opens with clicking the +
sign in the top left corner. Same goes for other Tabs (Department). The last tab is the Rounds tab, where you can match the Employees through departments. At the moment there is no way of deleting Employees, Departments and Rounds in the UI. The tester is invited to remove it using bundle exec rails c
and deleting directly in the model e.g.: Employee.last.destroy
- You may have errors with nokogiri which you can fix with
bundle update nokogiri
- If you don't have postgres installed remember to install
postgresql postgresql-contrib libpq-dev
before runningbundle install
. Create the password (defaultroot
) with:
sudo -u postgres psql
\password postgres
postgres
app/controllers/api/v1/rounds_controller.rb
logic is very simple at the time being and the json logic is not optimized at all. We would need to improve performance (we could everything with one query, but I chose to go with Rails syntax at the moment)- React app needs components tests
- Rails app needs controller/request tests
- Docker setup is still very basic