Giter Site home page Giter Site logo

mike1011 / referrals Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 183 KB

A demo Rails 7 project with shakapacker, Material ui and react_on_rails

Ruby 54.80% JavaScript 30.81% CSS 0.20% HTML 14.04% Shell 0.15%
rails7 shakapacker materialui reactonrails ruby3 reactjs

referrals's Introduction

README

This README enlists the requirement and the steps needed to run this application build on Rails 7, Ruby 3, Shakapacker to manage javscript modules, Material UI for CSS and Reactjs for frontend. It use Postgresql as database and devise for basic authentication for both html and api requests. Rspec is TODO.

Worth to note that It uses separate folder client to manage all react front end code.

  • Ruby version

    3.0.1

    For setup from scratch, Install using rvm.

    for rvm, visit https://rvm.io/rvm/install

    run the command rvm install "ruby-3.0.1" to install the required version of ruby.

  • Rails version

    7.0.1

    Needs bundler > version 2,

    Try gem install bundler

  • System dependencies

    Needs Ruby

    Bundler > 2

    Operating system - Tested on Ubuntu 22.04 with Chrome browser.

    Requires node, visit https://github.com/nvm-sh/nvm to setup node > 14 using nvm.

    You can also install yarn, visit https://yarnpkg.com/cli/install

  • For Database creation rails db:setup

How to run the application

Clone the repo - https://github.com/mike1011/referrals.git

cd referrals

Assuming the system has node, rvm , bundler and yarn installed, execute the below commands and start the app.

nvm use 14

yarn

npm i

--create the db using rails db:setup

Run foreman start -f Procfile.dev Hit the url - http://localhost:3000/ on the browser to see the app.

How to use the API's

Needs Curl to run the commands. if curl is not present, visit https://curl.se/download.html

== register API ===

curl -XPOST -H "Content-Type: application/json" -d '{ "user": { "email": "[email protected]", "password": "password123" } }' http://localhost:3000/api/v1/users

== login API ==

curl -XPOST -H "Content-Type: application/json" -d '{ "user": { "email": "[email protected]", "password": "password123" } }' http://localhost:3000/api/v1/users/sign_in

== logout api ==

curl -XDELETE -H "Content-Type: application/json" -d '{ "user": { "email": "[email protected]", "password": "password123" } }' http://localhost:3000/api/v1/users/sign_out

referrals's People

Stargazers

 avatar

Watchers

 avatar

referrals's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.