pdlug / personalize-sample

A sample sinatra/mongoid application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Personalize - A Sample Application

This is the rough skeleton of a web application that allows users to create an account and sign up for alerts (email, RSS, Twitter, etc.). The instructions below cover the basics of what is there and the TODO file provides ideas for next steps.

Useful as a basic starter app for sinatra/mongoid, teaching tool, or basis for interview coding problem sets.

Requirements

  • Ruby
  • Bundler
  • MongoDB - must be running on your local host (downloading a package and starting via ./bin/mongod is sufficient).

Getting Started

bundle install --path vendor
bundle exec rackup

This will start the application running which can then be accessed at: http://localhost:9292/

The default rake task will run all of the specs:

bundle exec rake

Project Structure

config/    - configuration files
lib/
  models/  - Mongoid models
  personalize_server.rb - sinatra web application
public/ - static assets
spec/
  functional/  - functional specs
  request/     - request specs using rack-test
views/ - templates and layouts for webapp views

Data Model & Persistence

The persistence uses the object document mapper (ODM) Mongoid with two basic models provided by the skeleton.

  • User - a user that signs up for the system, logs in, and is able to subscribe to individual alerts
  • Alert - an alert provided by the system for a topic or source, users are able to sign up to receive as many individual alerts as provided by the system

Technologies used

Ruby stack:

Front end:

About

A sample sinatra/mongoid application


Languages

Language:Ruby 46.8%Language:CSS 37.9%Language:HTML 11.1%Language:JavaScript 4.2%