aznboy00 / biblio Goto Github PK
View Code? Open in Web Editor NEWBiblio: Library web application.
Home Page: https://soen343t5.herokuapp.com
Biblio: Library web application.
Home Page: https://soen343t5.herokuapp.com
Styling fixes to the website
To respect data persistence between the code and database, SQL queries execution should belong to the model/controller js files.
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.
db.js
from the repodb.js
to the gitignoredb.js
to the serverImplement the necessary methods through Express and CircleCI to implement tests.
Create a page for the user to view catalog items with a not-yet-implemented loan button next to the item.
loand_period
should be called loan_period
.
This needs to be changed in the descript.sql
file and all subsequent model
,route
, and view files as well
Create a login page letting the user to enter their E-mail and password.
Return proper errors if it occurs.
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 ***
Design the library's front end.
Create the following view model pages:
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):
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.
All the criteria will be discussed in the meeting.
Sessions should be created into its own class in a sessions.js
file 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.
Create a registration form with fields that conforms the database structure.
Implement session checks (user being logged in or not) to show stuff for a corresponding user.
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)
Design a database in which aligns with the features that the website will have.
Database structure is subject to change.
Refer to the database design architecture to create the MySQL database.
Make sure the MySQL connection is properly coded and setup.
Refer to team meeting discussion for any other information.
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.
.js files should not have the same name for a better readability for developers.
On the catalog display page, let any user be able to sort the catalog items by:
Suggestion: if we have time, we could filter by category and filter more columns. (Nice to have)
Make the front end and backend to modify a specific entry.
route page should be: /admincp/edit/{entryid}
fetching the proper data off of the proper entry id
update button will submit the query to update the entry
Use Case #26
Design the frontend and backend with the proper field to enter a new entry to the catalog in Admin Panel.
Use Case #26
Create a page that populates a list of users online/offline that can only be accessed by the administrator.
Make the admin not being able to demote him/herself.
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.
-Confirm with admin before deleting a record
users/admincp/manageusers
page should not offer the ability to demote the root admin (user_id=1
).
Within the user list, the admin has the option to promote a regular user to an administrator.
Return any proper error if it occurs.
Restrict access to admin privilege pages to Admin only.For example /catalog/createitems/createMovie is visible even when you're not logged in and can successfully create a new item.
Make a page within the AdminCP to display all entries.
Use Case #26
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.
If an error occurs, make sure the code will output a proper error message instead of redirecting to the index page.
After having spoken to the TA it is confirmed that we are required to create all three:
The Music table is missing the type attribute.
The dbscript, models, views, and routes need to updated.
Make sure only admins can edit stuff in the catalog.
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
Don't declare the DB connection on every JS file.
Use Bcrypt for NodeJS for multi-platform compatibility.
Add a delete button on the Catalog page. On click it should delete the entry.
Use Case #26
@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.
***Must wait for #41 to be completed before starting this.
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
We should confirm the password before registering a new user to prevent password mistypes.
/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 textHere is a check list of stuff to do for the DB (initially)
Users
Transactions
Books
Magazines
Movies
Music
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.