Assignment 4
Abstract data models:
User
State:
- users: set User
- username, password: registered -> set String
Session [UserAccount]
State:
- active: set Session
- user: active -> one UserAccount
Friend [UserAccount]
State:
- friends: set Friend
- requests: set FriendRequest
- user1: UserAccount
- user2: UserAccount
- from: UserAccount
- to: UserAccount
- status: String
Book [UserAccount]
State:
- books: set Book
- title: Book -> one String
- author: Book -> one String
- description: Book -> one String
- numberOfReviews: Book -> one Number
- avgRating: Book -> one Number
Folder [BookItem, UserAccount]
State:
- folders: set Folder
- name: String
- owner: UserAccount
- contents: set BookItem
Rating [BookItem, UserAccount]
State:
- ratings: set Rating
- book: BookItem
- user: UserAccount
- value: Number
Recommendation [BookItem, UserAccount]
State:
- recommendations: set Recommendation
- userFrom: UserAccount
- userTo: UserAccount
- book: bookItem
Invitation [BookItem, UserAccount]
State:
- invitations: set Invitation
- userFrom: UserAccount
- usersAccepted: set UserAccount
- book: BookItem
App definition:
app BookClub:
include User
include Session [User.User]
include Friend [User.User]
include Book [User.User]
include Folder [Book.Book, User.User]
include Rating [Book.Book, User.User]
include Recommendation [Book.Book, User.User]
include Invitation [Book.Book, User.User]
Data modeling diagram:
Website and code:
Deployed website: https://bookclub-one.vercel.app
Link to code: https://github.com/juliacamacho/bookclub
(New concepts added: book, folder)