Giter Site home page Giter Site logo

brandon-meeks / sinatras-skeleton Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simonneutert/sinatras-skeleton

0.0 2.0 0.0 261 KB

Basic Sinatra Skeleton MVC CRUD App with Sprockets, Warden, ActiveRecord and PostgresQL

Home Page: https://sinatras-skeleton.herokuapp.com/

License: MIT License

Ruby 53.65% JavaScript 0.28% CoffeeScript 3.12% CSS 13.50% HTML 29.45%

sinatras-skeleton's Introduction

Basic Sinatra App with Sprockets, Warden, ActiveRecord and PostgresQL

This repository aims to be a boilerplate for a modular 2017 Sinatra (v2) app.

demo on heroku (admin area is locked up ๐Ÿ˜‰)

please check out the credits section! Without the community, this never would have been possible. Thank you.

Feel free to contribute, add more features, strip features or simply improve existing code - pull requests welcome ๐Ÿ˜„

Why not Rails?

Sinatra is a ruby/rack framework, that can be used as an alternative where Rails would simply be an overkill.

I started working my way through the sinatra docs, aiming for a setup that can easily be modeled to a basic use case.

What is in?

I want this Sinatra boilerplate app to:

  • work with Bundler
  • use ORM is ActiveRecord
  • have an MVC-like structure
  • support Sass/Scss and CoffeeScript
  • party with jQuery and Turbolinks! Yes, Turbolinks.
  • roll an Authentication System
  • use PostgresQL as Database
  • run on heroku (don't forget: $ heroku config:add APP_ENV=production)

Get started

You need Ruby (>= 2.4 and < 2.5) and Bundler.

If you do not have a local PostgresQL DB running, heroku can handle the code as is - do not forget to add Heroku PostgresQL addon in your dashboard.

  • $ git clone
  • $ bundle install
  • edit config/database.yml
  • $ rake db:setup
  • $ thin start or rerun rackup (rerun gem - not included by default!)
  • edit titles in views/layout.haml and views/nav.haml
  • check/set timezone config/timezone.rb

now what?

  • read the credits
  • read the code
  • run the code, see what it does
  • delete what you don't need and built from there, should a barebone branch be offered? What do you think? ๐Ÿ˜

Most code is commented, so you'll learn what it does.

What needs to be done

  • enable flash messages, especially for validation feedback

Contribute

  • Send in pull requests, improve this project with features or simply by adding/improving comments ๐Ÿ˜
  • Be nice, make public forks
  • What did you use this app for? Please, let me know! Share your projects.

Credits / Blood, Sweat & Tears

โค๏ธ ๐Ÿ˜“ ๐Ÿ˜ญ

thank you for open sourcing, writing documentation, blogging, answering and giving a hand on stackoverflow ๐Ÿ‘

Warden

sklises repo

Steve Klise Blog post

Coderwall on Sinatra + Warden

What Ches wrote up

What Mike Ebert wrote

ActiveRecord + PostgresQL

mherman

samuelstern

BCrypt

Kieran's Answer on StackOverflow

BCrypt Gem

Sprockets

Sinatra Recipe for Sprockets

Official Sinatra Docs

Sinatra Intro

Sinatra recipes

sinatras-skeleton's People

Contributors

simonneutert avatar

Watchers

 avatar  avatar

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.