An open API service indexing awesome lists of open source software.

https://github.com/yatish27/shore

Modern Ruby on Rails template to start every new project. Skip the boilerplate and focus on what's unique to your project.
https://github.com/yatish27/shore

hotwire-turbo ruby ruby-on-rails solid-queue stimulusjs tailwindcss template vite-rails

Last synced: about 1 year ago
JSON representation

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

Awesome Lists containing this project

README

          




Shore



Build Status


License


## Introduction

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

## Features

- **Ruby**: Ruby 3.4.2
- **Rails**: [Rails 8](https://rubyonrails.org)
- **PostgreSQL**: [PostgresSQL 17](https://www.postgresql.org)
- **Tailwind CSS**: Uses [Tailwind CSS v4](https://tailwindcss.com) for styling.
- **Vite Ruby**: Uses [Vite Ruby](https://vite-ruby.netlify.app) for asset management. It is based on [Vite.js](https://vitejs.dev). It replaces webpacker, jsbundling-rails, cssbundling-rails, importmaps and sprockets/propshaft.
- **Node/Yarn**: Uses Node and Yarn for package management.
- **Solid Queue**: Uses [Solid Queue](https://github.com/rails/solid_queue) for background processing.
- **Rspec/FactoryBot**: Uses [RSpec](https://rspec.info/) and [Factorybot](https://github.com/thoughtbot/factory_bot).
- **Rubocop**: Auto-formats Ruby code with [rubocop](https://rubocop.org).
- **Prettier**: Auto-formats JavaScript and CSS code with [prettier](https://prettier.io).
- **Github Actions**: Uses Github Actions for continuous integration and deployment.
- **Deployment**: Supports deployment on [Heroku](https://www.heroku.com/platform) and [Render](https://render.com)

## Getting Started

### System Requirements

You will need the following to run the application.

- [**Ruby 3.4.2**](./docs/installing_prerequisites.md#ruby)
- [**PostgreSQL 17**](./docs/installing_prerequisites.md#postgresql)

Refer [here](./docs/installing_prerequisites.md) 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.

```bash
git clone git@github.com: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.

```bash
./bin/rename_project YourNewProjectName
```

- Copy the `env.sample` to `.env`

- The default username and password for database is set to `postgres` and `postgres`. 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.

```bash
./bin/setup
```

### Running the application

Start your application

```bash
./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](http://localhost:3000) to see the home page 🚀.

## Deployment

- Heroku
- Render

## Testing

Running all tests

```
./bin/rspec
```

Running a single spec

```
./bin/rspec spec/system/root_spec.rb
```

## License

Shore is released under the [MIT License](./LICENSE.txt).

## Contributing

PRs are welcome