Writing thorough documentation, because the UX Lead asked for it.
Our objective was to create a service which would allow our users to log their reading lists as well as recommend the books to others.
The main page would be a collection of all the recommended books - from all users.
Find our page hosted on heroku
Our features were built with a minimal design and objective in mind: meet the acceptance criterias and basic user stories.
Make sure you have Git and Node (v18) installed.
- Clone this repo and
cd
into the directory - Run
npm install
to install all the dependencies - Run
npm run seed
to seed the local database - Run
npm run dev
to start the server
This uses the nodemon
library to auto-restart the server when you save changes.
- As a user, I want to: submit information to your site for anyone to see
- As a user, I want to: come back to your site later and see what I posted is still there
- As a user, I want to: be the only person allowed to delete my stuff
- Forms for users to sign up and log in
- A form for users to submit data only accessible to logged in users
- A page showing all the data
- A way for logged in users to delete their own data
- Semantic form elements with correctly associated labels
- A SQLite database
- [] Hidden environment variables (i.e. not on GitHub)
- [] Tests for all routes
- A user page that shows books poster by others users
- [] GitHub Actions CI setup to run your tests when you push
A detailed journey of our project as well the planning process can be found in issue Update README #10
This project uses Sqlite3 through the use of the common library better-sqlite3
.
Our database uses three tables following this schema:
users
column | type | constraints |
---|---|---|
id | integer | primary key autoincrement |
text | unique | |
hash | text | |
created_at | datetime | current timestamp |
books
column | type | constraints |
---|---|---|
id | integer | primary key autoincrement |
user_id | text | references users(id) |
name | text | not null |
author | text | not null |
rating | integer | not null |
sharing | integer | default 0 check(sharing in 0, 1) |
sessions
column | type | constraints |
---|---|---|
id | text | primary key |
user_id | text | references users(id) |
expires_at | datetime | not null |
created_at | datetime | default current timestamp |
Throughout our project we used pair-programming method to write the code and rosolve issues. We met in-person, as well as had online meetings to discuss and work together. We would gather for 5-10 minutes for a quick huddle to discuss the progress so far, and if we faced any issues.
- Discord
- VS Code Live Share extension
- Github Project Board
During our planning stage, we identified there were functions and components that would be reused in the project. As a result, we decided to include modularization and attempted to follow the DRY principle.
Examples of that can be found in server.js, helpers.js and user-page.js