Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emilyjspencer/bookmarks
A bookmark manager that stores a collection of bookmarks as urls. A Makers project (post-Makers).
https://github.com/emilyjspencer/bookmarks
crud database postgresql ruby sinatra sql
Last synced: about 1 month ago
JSON representation
A bookmark manager that stores a collection of bookmarks as urls. A Makers project (post-Makers).
- Host: GitHub
- URL: https://github.com/emilyjspencer/bookmarks
- Owner: emilyjspencer
- Created: 2020-05-02T12:42:48.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-04-12T05:21:49.000Z (almost 2 years ago)
- Last Synced: 2024-11-03T16:17:26.883Z (3 months ago)
- Topics: crud, database, postgresql, ruby, sinatra, sql
- Language: Ruby
- Homepage:
- Size: 238 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bookmark Manager
Build a bookmark manager that stores a collection of bookmarks as
URLs.
## User Stories```
As a user,
So I can view my most-used websites,
I want to view a list of bookmarksAs a user,
So I can retrieve my most-used websites at a later date,
I want to to be able to store these websitesAs a user,
So I can remove my bookmark from the Bookmark Manager,
I want to delete a bookmarkAs a user,
So I can change a bookmark in Bookmark Manager,
I want to update a bookmarkAs a user,
So that the bookmarks I save are useful,
I want to only save a valid URLAs a user,
So that I can describe what the bookmarks are
I want to be able to add a comment or comments to a bookmarkAs a user,
So that I can categorize my bookmarks,
I want to add a tag to a bookmarkAs a user,
So that I can find relevant bookmarks,
I want to filter my bookmarks by a tagAs a user,
So that I can have a personalised bookmark list,
I want to be able to sign upAs a user,
So that I can keep my account secure,
I want to be able to sign in
```
## Databases Setup
* **Connect to psql:**
```
brew install postgresqlbrew services start postgresql
psql postgres
```* **Create the database and test database:**
development database:
```html
CREATE DATABASE bookmark_manager_new;
```test database:
```html
CREATE DATABASE bookmark_manager_new_test;
```Connect to the database
```html
\c bookmark_manager_new;
```Run the following migrations. which can be found in the db/migrations subfolder:
```html
CREATE TABLE bookmarks(id SERIAL PRIMARY KEY, url VARCHAR(60));
```
```html
CREATE TABLE bookmarks(id SERIAL PRIMARY KEY, url VARCHAR(60));
```
```html
ALTER TABLE bookmarks ADD COLUMN title VARCHAR(30);
```
```html
CREATE TABLE comments(id SERIAL PRIMARY KEY, text VARCHAR(240), bookmark_id INTEGER REFERENCES bookmarks (id));
```
```html
ALTER TABLE comments ADD description text;
```
```html
ALTER TABLE comments DROP COLUMN text;
```
```html
CREATE TABLE tags(id SERIAL PRIMARY KEY, content VARCHAR(60));
```
```html
CREATE TABLE bookmarks_tags(tag_id INTEGER REFERENCES tags (id), bookmark_id INTEGER REFERENCES bookmarks (id));
```Repeat for the test database
### How to use:
**Clone this repository:**
```html
git clone https://github.com/emilyjspencer/Bookmarks.git
```**cd into the repo**
**Run**
```html
bundle install
```**Start the server:**
```html
rackup
```**Go to localhost:9292**
### How to run the tests:
```html
rspec
```### Built with:
* Ruby
* Sinatra
* HTML/CSS
* SQL### Tested with:
* RSpec
* Capybara### What it looks like:
![homepage](homepage.png)
![bookmarks](bookmarks.png)
![edit](edit.png)
![add](addbookmark.png)