GithubHelp home page GithubHelp logo

bookmark-manager-2022's Introduction

Bookmark Manager

This is a Bookmark Manager application which has been developed using the BDD cycle and a test driven approach to fulfil the user stories below.

The app has been built using a Sinatra MVC framework with RESTful routing conventions. An ORM library has not been used in order to gain a deeper understanding of how OOP code interacts with relational databases and to practice writing raw SQL. SQL commands requiring user input have been protected against SQL injection. The pg gem has been used for communication between the ruby code and the databases, with one database for development and another for testing. Feature tests have been written using Capybara and unit tests in raw RSpec. A script has been written to clean the test database between tests to ensure accuracy. Test coverage is 100%. The connection to the database has been extracted into its own class to separate application behaviour from database behaviour. A setup script runs when the application boots, which sets up the connection with the correct database for the environment.

A one-to-many relationship has been implemented between bookmarks and comments, a many-to-many relationship between bookmarks and tags. A registration and authentication system has also been built from scratch (with the help of bcrypt to ensure only hashed passwords are stored in the database.)

User stories

As a time-pressed user
So that I can quickly go to web sites I regularly visit
I would like to see a list of bookmarks

As a time-pressed user
So that I can save a website
I would like to add the site's address and title to bookmark manager

As a time-pressed user
So that I can remove a website I no longer visit
I would like to delete a bookmark from bookmark manager

As a time-pressed user
So that I can keep my bookmark information up-to-date
I would like to update a bookmark

As a time-pressed user
So that the bookmarks I save are useful
I would like to only save valid URLs

As a time-pressed user
So that I can note my opinions about a bookmark
I would like to add comments to a bookmark

As a time-pressed user
So that I can categorise my bookmarks
I would like to add tags to a bookmark   

As a time-pressed user
So that I can find relevant bookmarks
I would like to filter bookmarks by a tag

As a time-pressed user
So that I can have a personalised bookmark manager
I would like to sign up with my email address

As a time-pressed user
So that I can have a secure account
I would like to sign in with my email address and password

As a time-pressed user
So that I can keep my account secure while offline
I would like to sign out

How to use

Install project dependencies

Clone the repo to your local machine, change into the directory, then:

$ bundle install

Setup the databases

You will need to have the PostgreSQL database management system installed to proceed.

$ rake setup

You will now have two databases: bookmark_manager for the development environment, and bookmark_manager_test for the test environment. Both databases will have the tables needed to run the application.

Run the app

$ rackup

Visit http://localhost:9292

Run tests

$ rspec

Technologies used

  • CSS
  • Capybara
  • HTML
  • PostgreSQL
  • Rake
  • Ruby
  • RSpec
  • Sinatra
  • SQL

bookmark-manager-2022's People

Contributors

anjanalp 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.