Skip to content
/ shore Public template

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

License

Notifications You must be signed in to change notification settings

yatish27/shore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.2
  • 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