{"id":13879371,"url":"https://github.com/archonic/limestone","last_synced_at":"2025-04-09T09:08:04.330Z","repository":{"id":38296209,"uuid":"69191210","full_name":"archonic/limestone","owner":"archonic","description":"Boilerplate Rails 6 SaaS application with Webpack, Stimulus and Docker integration.","archived":false,"fork":false,"pushed_at":"2023-04-24T20:37:18.000Z","size":1524,"stargazers_count":234,"open_issues_count":7,"forks_count":43,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-02T06:09:11.081Z","etag":null,"topics":["boilerplate","devise","docker","flipper","limestone","rails","rspec","saas","searchkick","sidekiq","stimulus","stripe","webpack"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/archonic.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":["archonic"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2016-09-25T21:19:52.000Z","updated_at":"2024-11-26T15:27:11.000Z","dependencies_parsed_at":"2023-10-20T17:31:34.380Z","dependency_job_id":null,"html_url":"https://github.com/archonic/limestone","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archonic%2Flimestone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archonic%2Flimestone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archonic%2Flimestone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archonic%2Flimestone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/archonic","download_url":"https://codeload.github.com/archonic/limestone/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248008630,"owners_count":21032556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boilerplate","devise","docker","flipper","limestone","rails","rspec","saas","searchkick","sidekiq","stimulus","stripe","webpack"],"created_at":"2024-08-06T08:02:18.756Z","updated_at":"2025-04-09T09:08:04.308Z","avatar_url":"https://github.com/archonic.png","language":"Ruby","readme":"# Limestone\n[![\u003carchonic\u003e](https://circleci.com/gh/archonic/limestone.svg?style=svg)](https://circleci.com/gh/archonic/workflows/limestone/tree/master)\n\nLimestone is a boilerplate SaaS app built with Rails 6 on Ruby 2.7.2 and has an opinionated integration with NPM using [Webpacker](https://github.com/rails/webpacker) and [Stimulus](https://stimulusjs.org/).\n\n## Vote!\nHelp decide future features and changes for Limestone with this poll:\nhttps://www.strawpoll.me/42684734/\n## Versions\nVersioning in this repo in intended to maintain and modernize the boilerplate. New versions are not intended to update existing forks, although looking through the commits serves as a good upgrade resource.\n\nv0.1 is Rails 5.2  \nv0.2 is Rails 6  \nv0.3 introduces the [Pay gem](https://github.com/pay-rails/pay)  \nv0.4 uses ruby 2.7.2\n\nSee more in the [changelog](https://github.com/archonic/limestone/blob/master/CHANGELOG.md).\n\n## The Stack\nThe [gemset](https://github.com/archonic/limestone/blob/master/Gemfile) has been chosen to be modern, performant, and take care of a number of business concerns common to SaaS.\n\n## Features\n* Free trial begins upon registration without credit card. Number of days is configurable with ENV var.\n* Subscription management. Card update form, switch plan form and cancel account button.\n* [Devise confirmable](https://github.com/heartcombo/devise/wiki/How-To:-Add-:confirmable-to-Users) installed and configured.\n* Emails for welcome, receipt, refund, subscription renewing and payment action required.\n* [letter_opener](https://github.com/ryanb/letter_opener) and [letter_opener_web](https://github.com/fgrehm/letter_opener_web) installed and configured. Visit /admin/letter_opener in development to see emails sent.\n* Mail sends through Sidekiq with deliver_later for production. [Sendgrid](https://sendgrid.com/) is configured and ready to use once your API keys are set in ENV.\n* Direct cloud uploading with [ActiveStorage](https://edgeguides.rubyonrails.org/active_storage_overview.html). Lazy transform for resizing. Demonstrated with user avatars.\n* Icon helper for user avatars with fallback to user initials.\n* Icon helper for [Font Awesome 4.7](https://fontawesome.com/v4.7.0/icons/) icons.\n* Administrate dashboard lets you CRUD records. Easy to add more models and customize as you like. Visit /admin/.\n* Impersonate users through Administrate dashboard.\n* Pretty modals using Bootstrap integrated into rails_ujs data-confirm. Demonstrated with cancel account button.\n* Banner with a link to billing page users that are past due.\n* Opinionated search integration using Elasticsearch via Searchkick. Gem is in place but integration is up to you.\n* Feature control using the [Flipper](https://github.com/jnunemaker/flipper) gem. Demonstrated with the `public_registration` feature.\n* 84% RSpec test coverage.\n* Solargraph (language server for code-aware auto-completions) configured in docker-compose.yml. Just point to localhost:7658 in your solargraph extension in your code editor.\n\n## Notes\n* RSpec controller tests have been omitted in favour of requests tests.\n* You can run tests locally with `docker-compose run web rspec`\n\n## Pre-requisites\n\n### Development\n* Install [Docker](https://docs.docker.com/engine/installation/) and [Docker Compose](https://docs.docker.com/compose/install/)\n* A [Stripe](https://dashboard.stripe.com/register) account and a [Stripe API Key](https://stripe.com/docs/keys).\n\n### Test\n* [Codeship](https://codeship.com/) files are in place - just create an account and integrate with your repo. You will need to create your [codeship.aes file](https://documentation.codeship.com/pro/builds-and-configuration/environment-variables/#downloading-your-aes-key), [install jet](https://documentation.codeship.com/pro/jet-cli/installation/) and run `jet encrypt .env .env.encrypted`.\n* [CircleCI](https://circleci.com/) files are in place - just create an account and integrate with your repo.\n* **NOTE** Limestone expects your product prices to have trial days \u003e 0. If you don't create a trial, testing will get the error `Pay::Error: This customer has no attached payment source or default payment method.`.\n* You could also just run test locally with `docker-compose run web rspec` or `docker-compose exec web rspec` if you've already run `docker-compose up`.\n\n### Production\n* A cloud storage account [compatible with ActiveStorage](https://edgeguides.rubyonrails.org/active_storage_overview.html#setup).\n* Because Docker is already configured, you may want a Kubernetes host ([GKE](https://cloud.google.com/kubernetes-engine/), [AWS](https://aws.amazon.com/kubernetes/) or [DigitalOcean](https://www.digitalocean.com/products/kubernetes/)).\n\n## Getting Started\n1. Clone this repository at the most recent tag and `cd` into it:\n    ```\n    git clone -b 'v0.3' --single-branch --depth 1 https://github.com/archonic/limestone.git\n    cd limestone\n    ```\n\n2. Make a copy of `.env-example` named `.env`:\n    ```\n    cp .env-example .env\n    ```\n\n3. Update the `.env` file - running the project requires you change the following:\n    - `STRIPE_API_KEY`\n    - `STRIPE_PUBLISHABLE_KEY`\n    - `STRIPE_SIGNING_SECRET` (This can be something random)\n\n    You probably want to update the `ADMIN_*` environment variables. If you want a different `COMPOSE_PROJECT_NAME` and database name, now is the best time to do that.\n\n4. Run `docker-compose run web yarn install --pure-lockfile` to download images, build your development image and install node_modules. This will take a while.\n\n5. Run `docker-compose up` to run your project and it's dependencies.\n\n5. Once everything is up, run `docker-compose exec web rails db:prepare` to create DB, load schema and seed. Seeding will also create your plan(s) in Stripe.\n\n6. Visit [http://localhost:3000](http://localhost:3000) and rejoice :tada: You can login using the Admin user defined in `.env`. Keep in mind your admin doesn't have active billing. Enter a [test card](https://stripe.com/docs/testing#cards) when prompted or by visiting /subscribe.\n\n7. See the [Limestone Wiki](https://github.com/archonic/limestone/wiki) more about [development with Docker](https://github.com/archonic/limestone/wiki/Development-with-Docker)\n\n### Note About Flipper / Public User Registration\n1. The [Flipper gem](https://github.com/jnunemaker/flipper) controls feature flagging and provides a UI. Visit the `/admin/flipper`.\n2. The feature called `public_registration` has been created for you (during seeding). You can enable/disable this to control user registration :clap:\n\n### Setting up production\nA wiki will be written about this. Feel free to help out here if you're familiar with Docker/Kubernetes.\n","funding_links":["https://github.com/sponsors/archonic"],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchonic%2Flimestone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farchonic%2Flimestone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchonic%2Flimestone/lists"}