Access live demo at https://sportshub-6m4y.onrender.com
- it might take up to 30 seconds to fully load
Link to the Sports Hub Requirements and Architecture
- Ruby on Rails
- JavaScript (Stimulus)
- PostgreSQL
- Home page with sports articles
- Various categories, subcategories and teams
- Articles with rich content
- Comments on the articles with sorting and filtering options, likes and dislikes
- Newsletter
- Admin Dashboard to manage all content
- Different types of users
- Admin panel
- Mailing service
Requirements:
ruby, rails, postgres, gem, image-magick
Initialise Postgres Database:
rails db:create
rails db:setup
Install the gems and fire up the server:
bundle install
rails server
- Load the blueprint on Render and wait for it initialise the database and the web app.
- You will have to provide the rails master key in the environment variables.
- Use this guide to reset the secret and the public master key https://discuss.rubyonrails.org/t/rails-master-key-and-per-environment-init/82615/2
- The public one is committed to the repo but the secret one needs to match it and be set in
RAILS_MASTER_KEY
environment variable in the render web app. - The build should proceed, executing all the commands from ./bin/render-build.sh
Send an email newsletter:
rake weekly_newsletter_email
Run tests:
rspec
bundle exec cucumber
Generate a PDF (admins only) with all categories hierarchy by visiting localhost/admin.pdf