Code Monkey home page Code Monkey logo

biblio's People

Contributors

abdullahzen avatar aznboy00 avatar bkenza avatar ggebran avatar kcamcam avatar kkhh001 avatar kycoding avatar nourelnatour avatar wolfofthenorth avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

wolfofthenorth

biblio's Issues

Styling Fixes

Styling fixes to the website

  • General layout fixes
  • Upgrade to bootstrap 4.1.3
  • Implement partials (_header, _footer, _navbar) with EJS
  • Convert PUG files to EJS
  • Clean up views folder
  • Clean up routes files

Remove password from the repo

The password and other database connection credentials are being stored in /db.js. Even though the repository is private, in practice this poses a major security issue. The file should be removed from the repository, added to the .gitignore and manually pushed to the server.

  • Remove db.js from the repo
  • Add db.js to the gitignore
  • Manually push db.js to the server

Tests

Implement the necessary methods through Express and CircleCI to implement tests.

  • Register
  • Login
  • CRUD items
  • Promote/Demote Users

As a user, I want to loan a catalog item. (4)

Enable the loan button on the view item page to let the user loan the item. Make sure loan-able becomes false, and it won't show up on any search result and main catalog page.

Add the loan to the transaction log to track the loan and return status of an item.

*** HUGE TASK ***

DB structure - one huge item table

Just wanted to share this with you all. I was just working on the view a single item page and realized that all together this is how many columns we have for all items (not too many):

  1. title
  2. author
  3. artist
  4. publisher
  5. director
  6. producers
  7. label
  8. actors
  9. type
  10. format
  11. pages
  12. language
  13. release_date
  14. run_time
  15. asin
  16. isbn10
  17. isbn13

On top of item_id, discriminator, loanable, loan_period

Maybe we made the wrong choice? Maybe we didn't? We could squash four tables into one. Any thoughts? Switching to this type of database architecture might make it easier when it comes to loaning items as well.

Refactor sessions to a separate class

Sessions should be created into its own class in a sessions.jsfile and referenced in routes/index.js,routes/catalog.js and routes/users.js similar to db.js. Instead of being instantiated in each file every time.

DB restructuring

As @WolfOfTheNorth mentioned during the meeting on Wednesday the 17th. What is everyones thought on restructuring the database as follows?

item_id discriminator quantity loan_period loanable title
book_id item_id discriminator author format pages publisher language isbn10 isbn13
magazine_id item_id discriminator publisher language isbn10 isbn13
movie_id item_id discriminator director producers language dubbed subtitles actors release_date run_time
music_id item_id discriminator artist label release_date asin

(moving quantity, loan_period, loanable, and title into the Items table)

Magazines loan_period should not be modifiable

The requirements documents specifies that Magazines are not loanable. As such, the loan period should not be modifiable. In other words, loan_periond should always be set to zero and loanable should always be set to false.

As a user, I would like to filter my catalog. (3)

On the catalog display page, let any user be able to sort the catalog items by:

  • Type
  • Alphabetical Title/Author ASC, DESC (toggle)
    (These 2 are the most common characteristics)

Suggestion: if we have time, we could filter by category and filter more columns. (Nice to have)

Rename Model to Mapper

Our models are technically a mapper. I think all we would need to change in the code is the name of the director from models to mapper. And then change appropriate diagrams in the sad. The goal would be to follow the class diagram layers.
screen shot 2018-11-07 at 22 52 24

Remove quantity attribute from the DB

Remove quantity from the book, magazine, movie and music tables. Multiple copies of each item will each be contained in a row in the database. In other words, each item has its own unique id. This decision was made to reduce conflicts when loaning out items with multiple copies.

As discussed in the meeting on Oct 31.

Use Item.JS to CRUD items

Once CRUD is complete. Refactor to use Item.js to CRUD items, as discussed in the meeting Oct 31. Implement it to use some kind of an identity mapper/unit of work.

Setup CI

Setup Circle CI
Add the build status icon to the README
Update README to reflect the fact that we are using CircleCI and not TravisCI

Heroku build failing

@abdullahzen's fix in the last PR fixed the problem locally but is still giving build errors on the server. It looks like bcrypt is causing some issues.

there error is:
Error: /app/node_modules/bcrypt/lib/binding/bcrypt_lib.node: invalid ELF header

The branch heroku-build-fix contains some attempts at trying to fix it.

In order to run commands on the server type $ heroku run bash.

I have tried some of these commands with no luck:

$ rm -rf node_modules/;
$ npm install node-pre-gyp -g;
$ npm install bcrypt;
$ npm install -g npm;
$ npm install;
$ npm update;

The branch, populate-table is still working, just to have an idea of the last time the build was succeeding.

If you want to deploy a specific branch on heroku go to the project then click deploy and at the bottom of the page there's the option to deploy a specific branch.

As a user I would like to edit my profile information. (3)

  • Implement the back-end code for usercp.ejs to be fully functional.
  • Get the user values on the ejs file, then implement the back end method to update the data.
  • Implement proper check before submitting the form.

***Must wait for #41 to be completed before starting this.

Team access to the db script

The team members should have access to the script to reset the database.

The script is located in ./dbscript.sql
Run heroku pg:psql -f dbscript.sql

Update music

  • update music is no longer working on master branch.
  • /catalog/createitems/createMovie page is asking for a number as input for Actors, should be text
  • /catalog/createitems/createMusic page is asking for a number as input for Labels, should be text

Database: ER Diagram, Data Model, Schema and Script

Here is a check list of stuff to do for the DB (initially)

Schema Preview

Click here to see it

ER Diagram

  • Rough draft (for now)

Data Model

  • Rough draft (for now)

DB Tables

 

  • Users

    • Create Table
    • Script Template
    • Populate
       
  • Transactions

    • Create Table (check how to implement itemId FK)
    • Script Template
    • Populate
       
  • Books

    • Create Table
    • Script Template
    • Populate
       
  • Magazines

    • Create Table
    • Script Template
    • Populate
       
  • Movies

    • Create Table
    • Script Template
    • Populate
       
  • Music

    • Create Table
    • Script Template
    • Populate

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.