Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/andrewmcodes/shotgun

Ready to go Rails App with TailwindCSS, ViewComponent, Devise, and more!
https://github.com/andrewmcodes/shotgun

devise rails sidekiq stimulus stimulusjs tailwindcss template webpacker

Last synced: 27 days ago
JSON representation

Ready to go Rails App with TailwindCSS, ViewComponent, Devise, and more!

Awesome Lists containing this project

README

        

![Base Branch](https://img.shields.io/badge/base%20branch-main-important)

[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)

![GitHub License](https://img.shields.io/github/license/andrewmcodes/shotgun)
![GitHub issues](https://img.shields.io/github/issues/andrewmcodes/shotgun)
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](CONTRIBUTING.md)

# WIP: Rails Shotgun

Ruby on Rails application initialized with all the good stuff. Use at your own risk or we welcome pull requests. I will be working on a roadmap soon.

## Why is it named Shotgun??

> Shotgunning a beer is the simple act of consuming a beer at a high rate of speed.

The inspiration came from one of my common college activities. Rails Shotgun lets you be as productive as shotgunning a beer is at getting you drunk.

## Setup

Please take note that we are using `main` as the base branch.

![Base Branch](https://img.shields.io/badge/base%20branch-main-important)

### System dependencies

- Ruby version: 2.7.1
- Rails version: 6.0.3.2
- Database: PostgreSQL
- Redis installed

### Rename Application

You will want to rename the application first. Here are some options:

- Watch the [CodeTour](https://marketplace.visualstudio.com/items?itemName=vsls-contrib.codetour)
- Find and replace `CHANGEME` throughout. Note that if you take this method, you need to be aware of using the correct case.

### Configuration

Make sure the app has been renamed before doing these steps.

#### Automated

```bash
bin/setup
```

#### Manually

```
Copy an existing sample environment file. Run:

```bash
$ cp .env.sample .env
```

and edit newly created `.env` file. The minimum you are going to need are
credentials to your local PostgreSQL database.

Then, install all the necessary dependencies:

```bash
bundle install && yarn install
```

### Database creation

In order to create the database with all the necessary seed data, run:
```bash
rails db:create db:schema:load db:seed
```

### How to start the app

Start the Ruby on Rails server with:
```bash
rails server
```

We __highly__ recommend running the weback dev server in another tab instead of inline compilation that will occur if you don't for speed.

```bash
bin/webpack-dev-server
```

To _optionally_ run Sidekiq, launch another process with:
```bash
bundle exec sidekiq
```

### Code quality checks

The application provides the following code quality analysis tools:

- [Brakeman][brakeman]
- [Fasterer][fasterer]
- [Rails Best Practices][rails-best-practices]
- [Bundler Audit][bundler-audit]

To run them locally:

```bash
$ bundle exec brakeman
$ bundle exec fasterer
$ bundle exec rails_best_practices
$ bundle audit
```

[brakeman]: https://github.com/presidentbeef/brakeman
[fasterer]: https://github.com/DamirSvrtan/fasterer
[rails-best-practices]: https://github.com/flyerhzm/rails_best_practices
[bundler-audit]: https://github.com/rubysec/bundler-audit

### Removed Gems

- [redis-namespace](https://github.com/resque/redis-namespace)
- Not needed and it was throwing a bunch of warnings.
- [active-record-observer](https://github.com/rails/rails-observers#active-record-observer)
- Unused
- [activeresource](https://github.com/rails/activeresource)
- Unused
- [ngrok-tunnel](https://github.com/bogdanovich/ngrok-tunnel)
- Not needed if using tmuxinator
- [better_errors](https://github.com/BetterErrors/better_errors)
- Not really needed anymore now that Rails has made some improvements that made this a real nice-to-have

### Changelog

Coming Soon

### Contributing

[Contributing Guide][contributing]

### Code of Conduct

[Code of Conduct][coc]

### License

[MIT][license]

[changelog]: /CHANGELOG.md
[coc]: /CODE_OF_CONDUCT.md
[contributing]: /CONTRIBUTING.md
[license]: /LICENSE

## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):



Andrew Mason

💻 🤔 🚇 🚧 👀 💬

cjilbert504

💻 🐛

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!