A sample application showcasing the use of a Ruby on Rails backend paired with a React/NextJS frontend.
Further screenshots can be found here
- NextJS used as a React framework for the front end
- TailwindCSS used for styling
- Rubocop used for linting the rails application
- Prettier used for formatting front end code
- Commitlint used for ensuring commits follow a sensible format
- Husky used to set up pre-commit/commit-msg git hooks for running linting before commits
- Framer-motion used for animations on the front end
- Faker used for generating random data to seed the rails database
After you've made sure you've met all the prerequisites you'll need to run the following commands to get set up:
# install gems and run database migrations
$ yarn backend:prepare
# (optional) seed the database with fake data
$ yarn backend:seed
# install front end dependencies
$ yarn frontend:prepare
# start the backend rails server
$ yarn backend:dev
# start the frontend nextjs server
$ yarn frontend:devA full list of scripts can be found here
A guide on deployment can be found here
For debugging HTTP requests on the Rails backend, you can use the httpie package and run commands like http :8000/articles or http PUT :8000/articles/1 title=Test Article as an alternative to the embedded ruby environment.
