Code Monkey home page Code Monkey logo

rails_react_template's Introduction

Rails API + React Template

I built this template to help start my development process a little faster, and thought of sharing it for anyone that uses a setup like this.

I don't consider it production ready, as this was built thinking on the development environment, but I don't think it requires much configuration to make it secure enough for production.

demo.mov

Try it out

The easiest way to try it out is by using docker.

To get it running, fork/clone the project and cd into it.

You will need to setup the DB before using it, so firstly I would run docker compose build, then docker compose exec api rails db:setup and lastly docker compose up.

What's included

This selection of tools are staple for most of my projects, and includes the following:

Frontend

  • React created with Vite using TypeScript.
  • Redux Toolkit
  • React-Router
  • TailwindCSS, TailwindCSS Animated and DaisyUI.
  • ESLint, Prettier.
  • React Toastify.
  • React Icons.

Backend

  • Rails in API mode with PostgreSQL.

  • RSpec, Faker and FactoryBot.

  • Byebug

  • Bullet.

  • Rubocop.

  • Solargraph.

    Debugging Rails

    You can use byebug wherever you want, but to interact with it, you will need to attach a terminal to the running Rails container, so run docker ps, copy the ContainerID, and then run docker attach ContainerID to start debugging.

VSCode

  • Added devcontainer.json file to develop inside a container in VSCode, it includes:

    • Ruby
    • Node
    • Postgres
    • Many useful extensions related to Rails and React

    You will need the Dev Containers extension.

rails_react_template's People

Contributors

dependabot[bot] avatar gabo71096 avatar

Stargazers

 avatar

Watchers

 avatar

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.