Sinatra powered site for planning events and inviting other users. This is the second Learn.co project for flatiron boot camp.
Project is installed via Bundler Project is coded for development mode
- clone project
- run
bundle install
- create
party.env
fromparty.env.example
- see
ENV config
section for more info
- see
- source
party.env
- Create database with
rake db:create:all
- Set up with
rake db:migrate
andrake db:seed
- Run
shotgun
to start webserver.
- Required:
PARTY_SENDGRID_API_KEY
- Send grid api keyPARTY_SENDGRID_EMAIL
- Send grid TO email addressPARTY_HMAC_URl_KEY
- used for hmac url key, generate via securerandom, must be 64 bitsPARTY_SESSION_KEY
- used for session secret, generate via securerandom, must be 64 bits
- Debug (OPTIONAL):
PARTY_DISABLE_DNS
- set to'YES'
to disable DNS checks for user email.PARTY_DISABLE_EMAIL
- set to'YES'
for email request to silently be ignored.
Project uses Send Grid to manage emails for user account creation and passwordless logins. The api only need enough access to send email. Full access is not needed or recommended.
For security reasons, it is not possible to create an admin user via the website. Users must be elevated to someone with DB access. Admin have ability to add/modify/delete Venues and Themes.
Party planner uses before routes for authorization checks. Finer grain control permission are handles in controllers.
- '/pre_auth/*' - Non-Logged in users only
- '/post_auth/*' - Logged in users only
- '/hmac/*' - Must have valid hmac/non-expired to reach.
- '/admin/*' - Logged in admin users only
- Sinatra Template provided by (Corneal)[https://github.com/thebrianemory/corneal] gem
- Favicon provided by (freefavicon)[https://www.freefavicon.com]
- Frontend powered by (bootstrap)[https://getbootstrap.com]
- Backend powered by (Sinatra)[http://sinatrarb.com/] and (Active Record)[https://guides.rubyonrails.org/active_record_basics.html]