Coder Social home page Coder Social logo

happy_birthday_app's Introduction

Birthday App

==============

Project Outline:

  • Birthday calculator app written in Ruby and using html and css

  • Web app that will ask the user for a name and birthday

  • When the user submits the form, and depending on the current date, the app will either:

    • wish the user happy birthday
    • tell them how long they'll have to wait until their next birthday

User information is stored in a database as part of the process

User Stories:

  • As a user, if my birthday is today I want the app to wish me a happy birthday
  • As a user, if my birthday is not today I want the app to tell me how many days it is until my birthday

Technical

Tech & Frameworks utilised Ruby, HTML, CSS, PostgreSQL, Rspec, Capybara, Simplecov, Sinatra and Rubocop. All classes isolated with 95% test coverage

Process

  • Approach:
    • Broke the task down into clear user stories
    • Set up Ruby web project folders
    • Started with writing failing test for user journeys
    • Used TDD (red, green, refactor) to work through each story
    • Started with feature tests and broke these down into more focused unit tests
    • When app fully working added database to project

Domain Model:

MVC

Views:

Landing page index Enter details enter_deats Birthday in the future future_birthday Birthday greeting today_birthday Flash message when date format entered incorrectly flash_message

Instructions

  • Clone the repo
  • Run: gem install rspec
  • Run: gem install rubocop
  • Run: bundle

Create Database

  • Connect to psql
  • Create the database using the psql command CREATE DATABASE birthdayapp;
  • Connect to the database using the pqsl command \c birthdayapp;
  • Run the query we have saved in the file CREATE_DATABASE.SQL

Run your local server

Updates to make

  • Create test environment for database
  • Setup/connect Twilio and create new 'send greeting' page that enables user to send birthday message to friend

Nice to have

  • API set up - News from year of birth

happy_birthday_app's People

Contributors

maggiehibberd avatar telads avatar

Watchers

 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.