Coder Social home page Coder Social logo

yatish27 / shore Goto Github PK

View Code? Open in Web Editor NEW
30.0 1.0 1.0 1.66 MB

Modern Ruby on Rails template to start every new project. Skip the boilerplate and focus on what's unique to your project.

License: MIT License

JavaScript 4.02% Ruby 80.55% Procfile 0.16% CSS 1.35% HTML 8.90% Shell 1.44% Dockerfile 3.58%
ruby ruby-on-rails template phlex solid-queue stimulusjs tailwindcss vite-rails hotwire-turbo

shore's Introduction

Shore

Build Status License

Introduction ๐Ÿ“œ

Shore is a Ruby on Rails template with modern stack to start your new project.

Features โšก๏ธ

  • Ruby: Ruby 3.3.1
  • Rails: Rails 7.1
  • PostgreSQL: PostgresSQL 16.3
  • Tailwind CSS: Uses Tailwind CSS for styling.
  • Vite Ruby: Uses Vite Ruby for asset management. It is based on Vite.js. It replaces webpacker, jsbundling-rails, cssbundling-rails, importmaps and sprockets/propshaft.
  • Bun: Uses Bun as package manager. It replaces Node and Yarn.
  • Phlex: Uses Phlex for component-based views. It is an alternative to ViewComponent.
  • Solid Queue: Uses Solid Queue for background processing.
  • Minitest/FactoryBot: Uses Rails' default testing library, minitest along with Factorybot.
  • Rubocop: Auto-formats Ruby code with rubocop.
  • Prettier: Auto-formats JavaScript and CSS code with prettier.
  • Github Actions: Uses Github Actions for continuous integration and deployment.
  • Deployment: Supports deployment on Heroku and Render

Getting Started ๐Ÿš€

System Requirements

You will need the following to run the application.

Refer here to install these dependencies

Initial setup

  • Shore is a preconfigured base Ruby on Rails application. You can clone this repository and add it to your repo.

    git clone [email protected]:yatish27/shore.git your_new_project_name
    cd your_new_project_name
  • The application's default name is Shore. You can rename it to your desired new name. The name should be in camelcase.

    ./bin/rename_project YourNewProjectName
  • Copy the env.sample to .env

    • The default username and password for database is set to postgres and password. You can override them in .env file.
  • Run bin/setup to set up the application. It prepares the database and installs the required ruby gems and javascript packages. The script is idempotent, so you can run it multiple times.

    ./bin/setup

Running the application

Start your application

./bin/dev

This runs overmind or foreman using the Procfile.dev. It starts the rails server, solid queue background job process and vite server.

Visit http://localhost:3000 to see the home page ๐Ÿš€.

Running locally with docker

Shore supports docker and docker compose for local development. Install Docker and Docker desktop,

Once you have cloned the repository and have Docker installed, follow the following steps

  • Run docker compose build to build. It will build the necessary images.
  • Run docker-compose run --rm web bin/setup to create and set up the database.
  • Run docker compose up to start the application. Since the local code from your host machine is mounted in the docker container, any change made locally will be directly reflected. You don't need to rebuild the container.

Deployment ๐Ÿ“ฆ

  • Heroku
  • Render

Testing ๐Ÿงช

Running all tests

./bin/rails test:all

Running a single test

./bin/rails test test/jobs/hello_world_job_test.rb

License ๐Ÿ”‘

Shore is released under the MIT License.

Contributing ๐Ÿค

PRs are welcome

shore's People

Contributors

yatish27 avatar dependabot[bot] avatar

Stargazers

Vidhya Kumar avatar Lucas avatar  avatar bragamat avatar Bas van der Veen avatar Tony Gaeta avatar Yordan Santallana avatar Luc Castera avatar Anton Prins avatar Zilvinas Kucinskas avatar  avatar Bernie Chiu avatar Jonathan Davies avatar Mikkel Malmberg avatar Quintin Adam avatar Mohamad Abras avatar tatsuo sakurai avatar Dominik Sander avatar Sebastien Bourda avatar Phuwanart Larpmark avatar Maxime Souillat avatar Thomas Klemm avatar Anthony avatar Yaroslav Markin avatar Kayla Reopelle (she/her) avatar Brent Ramirez avatar Yatish Mehta avatar  avatar Rajashree Mandaogane avatar Sagar Muchhal avatar

Watchers

 avatar

Forkers

quintinadam

shore's Issues

Realtime support: websockets/turbo streams/anycable

Hey Yatish!

Saw your talk at the SF Ruby Meetup :) The stack in this base app is awesome and something I've been scoping to find for a while.

I'm keen to use it for an app I'm building which will be heavily realtime. Have you thought about adding Turbo Streams/AnyCable to this base app? I did a POC for my app last year and ran into a few issues struggling with TurboStreams and AnyCable. I quickly ran into issues with stock TurboStreams and then integrated AnyCable and struggled to get aspects like authenticated websockets to work correctly. I know AnyCable has had a lot of improvements since, and I'm getting back to the app I want to build starting fresh, and considering Shore for the greenfield setup.

If you're interested, I'm down to explore this by building on top of this base app and can contribute back to this repo. LMKWYT.

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.