First, migrate/start the backend rails server in /backend.
bundle install
rails db:migrate
rails server
Backend should run on port 3000
Then go to frontend and do npm
and then npm start
to start the react server.
npm install
npm start
Frontend should run on port 4000