This repository contains the code for a demo application that grants users the ability to search for jobs in Munich.
The app can be ran standalone, as well as on Docker. The installation provides instructions for usage on Docker.
You need:
dockeranddocker-composeinstalled.dipinstalled.
Run the following command to build images and provision the application:
dip provisionYou can start Rails server by running:
dip upThen go to http://localhost:3000/ and see the application in action.
Note: If you're too fast, you might experience some lag on first request. This is normal, as webpacker is compilling the assets. Once the compilation is finished, you should be good to go!
If you want to run the Rails console, run the following command:
dip rails cJobs stay on the memory store for 5 minutes until they are expired. If you want them to be expired sooner, then run the following commands:
dip rails c
Rails.cache.delete('retrieve_jobs_cache')You can run the tests with:
dip rspec- Redis -> as a cache store
- Stimulus -> as a JS framework
- TailwindCSS -> utility-first CSS framework
- Docker and Docker compose -> as an application wrapper
- Ruby 3.0.0
- Ruby on Rails 6.1.3.2 having the following libraries:
- Rspec - as a test framework
- Turbo - as an enabler for great UI speed
- Http - as the fastest Ruby HTTP library used to interact with APIs
- Sidekiq - as the async job handler
- Feedjira - efficient feed parser
- and more..
- Hotwire: Reactive Rails with no JavaScript? — learn about an inspirational post from evilmartians, where they encourage Rails developers to be Fullstack again, when the time is right.
- HOTWire HNPWA — some ideas for PWA are borrowed from this post.
- Hotwire, ViewComponents and TailwindCSS: The Ultimate Rails Stack — excellent resource for an introduction to clean, reusable bits of code for back and front-end using Hotwire, ViewComponents and TailwindCSS.
Built and tested with the help of these awesome technologies:
Coding challenge with fixed constraints.
-
Usage of either Stackoverflow or Github APIs.
-
Assumption: Stackoverflow or Github APIs are slow and that they take, in some cases, up to 1 minute to give the result. Application is therefore designed for users to first submit a search query (fixed to Munich) and wait until the results are available while they fetched are from the API in the background.
-
Bleeding edge technology.
-
Test cases.
-
Dockerized application
-
Concerning the life cycle of the job updates: Choice between:
- Polling for results
- [Chosen solution] Waiting for results on a websocket/sse(server send event)
- Application should not persist data under a database like MySQL/PostgreSQL .
- Application is allowed to temporarily cache (5 minutes).
- It goes without saying that code should be in good shape (refactored).
The application is available as open source under the terms of the MIT License.
