Skip to content

fac25/week3-authentication-Abby-Sumithra-Patrick-Lisa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bookzie

Writing thorough documentation, because the UX Lead asked for it.

Introduction

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

Project Scope

Our features were built with a minimal design and objective in mind: meet the acceptance criterias and basic user stories.

Setup

Make sure you have Git and Node (v18) installed.

  1. Clone this repo and cd into the directory
  2. Run npm install to install all the dependencies
  3. Run npm run seed to seed the local database
  4. Run npm run dev to start the server

This uses the nodemon library to auto-restart the server when you save changes.

User stories

  • 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

Acceptance criteria

  • 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)

Stretch criteria

  • [] 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

Project Plan / Learnings / Findings

A detailed journey of our project as well the planning process can be found in issue Update README #10

Database

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
email 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

Communication

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.

Tools Used

  • Discord
  • VS Code Live Share extension
  • Github Project Board

Software Methodologies

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

Website Snapshot

image