Skip to content

Commit

Permalink
update data model
Browse files Browse the repository at this point in the history
  • Loading branch information
jennet-zamanova committed Oct 4, 2024
1 parent 8858bfe commit 3858f2e
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 183 deletions.
4 changes: 4 additions & 0 deletions assets/images/a4/data_model.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
280 changes: 97 additions & 183 deletions docs/assignments/assignment4.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,96 @@ layout: doc

# A4

[TrueTide repo](https://github.com/jennet-zamanova/truetide)

[TrueTide deployment](https://truetide.vercel.app/)

## Data representation

```
UserDoc {
_id: ObjectId,
username: String,
password: String
}
```

```
SessionDoc {
_id: ObjectId,
user: ObjectId
}
```

```
PostingDoc {
_id: ObjectId,
author: ObjectId,
file: ObjectId # stored with GridFS
}
```

```
LabelDoc {
_id: ObjectId,
label: String,
items: ObjectId[],
topic: String
}
```

```
CitationDoc {
_id: ObjectId,
url: URL,
items: ObjectId[]
}
```

[Data Model](https://viewer.diagrams.net/?tags=%7B%7D&lightbox=1&highlight=0000ff&edit=_blank&layers=1&nav=1&title=test.drawio#R%3Cmxfile%3E%3Cdiagram%20id%3D%226a731a19-8d31-9384-78a2-239565b7b9f0%22%20name%3D%22Page-1%22%3E7Vxbc9o4FP4tfeAxjO6yHwMJ7cy2M52mnXYfDSjgrcGMMU3SX78yyBddnHKxDVk2D210wLL1fUffOUeS08PDxfP7JFjNP8VTEfUQmD738F0PIYQxlv9llpedBSLs7SyzJJwqW2l4CH8LZQTKugmnYq19MY3jKA1XunESL5dikmq2IEniJ%2F1rj3Gk33UVzIRleJgEkW39Hk7TubJC5pcffBDhbK5u7SG%2B%2B2AcTH7OknizVPdbxkux%2B2QR5N2oMa7nwTR%2BqpjwfQ8PkzhOd78tnociynDNEdtdN6r5tHjkRCzTfS5YDW75c8zC94NP35c%2F%2Fvr87eeX9Q2knO46%2BhVEG4WGet70JYdn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ymmV2ra5YClSVDURfk41D3jL09JwQO94ydAajJgqKOnrsFZiMnjRehZOLZwa%2FKugHMEPNbB1DR6ndNTXcTU1gb7xdGDGwqRlDubkKwvdeTW2TGbuumtQUVBfGTINTBliJqHd%2BOWN2%2FZRHm2WwEHZKemn8eA1NHZ4jURxauwBy7BPF71bBev0UJ9OLZ6YpTWPWATNyAfOG22v0UtEmYpVll7eynJOjk5ClrlMfF0ZUQwLHsLkV5nwJtGue7Jyg5Em9A3w9HEHsGyXOBahcPpu7eK9p5HiLrjyI0Wvg0K1RDR%2F%2FghR9nclO34eC5u18apTx%2B5%2BEBHqchcWLIZ1V2NxegCs1YRhekWZDmfVcYHDNnc1J0HY99IoootykyL8EiuxVqpKiz%2FH6iiYR5dYZIPqnP0%2FTOV12mRemYrG%2BEorsc8nIdTahIVJks%2FwLgLuwVf6JRXz%2FLw%3D%3D%3C%2Fdiagram%3E%3C%2Fmxfile%3E)

![Data Modle](/../assets/images/a4/data_model.svg)

## Data Modeling

**concept: Authentication**
purpose: log in/register a user
state:
`username`: User -> one String
`password`: User -> one String

**concept: Sessioning[User]**
purpose: enable authenticated actions for an extended period of time
state:
`session`: Session -> one User

**concept: Postings[Author, File]**
purpose: share experiences and information
state:
`author`: Post -> one Author
`file`: Post -> one File

**concept: Labeling[Item]**
purpose: tag `Items`
state:
`tags`: Item -> (tag) set String
`topics`: (topic) String -> (tag) set String

**concept: Citing[Item]**
purpose: get sources to support `Item`
state:
`citations`: Content -> set String

## TrueTide

**TrueTide** is designed for _`international students`_ navigating new environments and cultures. Adjusting to life in a new country can be overwhelming, and students often struggle to find _`accurate`, `culturally relevant`_ information. **TrueTide** helps bridge that gap by providing a _`diverse`_ range of perspectives on controversial topics from national policies to local slang and customs.

The app's key feature is its **`DualView`**, which allows users to see opposing viewpoints on controversial topics, fostering critical thinking.
To support responsible information-sharing, **TrueTide** offers _`easy-to-use`_ fact-checking tools and recommends relevant **`Citations`** to users as they post content, making it simple to back up information. **With features like _customized_ **`Feeds`** that adapt to cultural contexts, ????** **TrueTide** offers a trusted and culturally aware platform, easing the transition for students as they learn more about their new surroundings.
To support responsible information-sharing, **TrueTide** offers _`easy-to-use`_ fact-checking tools and recommends relevant **`Citations`** to users as they post content, making it simple to back up information. **TrueTide** offers a trusted and culturally aware platform, easing the transition for students as they learn more about their new surroundings.

[TrueTide repo](https://github.com/jennet-zamanova/truetide)

[TrueTide deployment](https://truetide.vercel.app/)
<!-- **With features like _customized_ **`Feeds`** that adapt to cultural contexts, ????** -->

## Functional design
(May update more based on implementation needs)

### Concepts

Expand Down Expand Up @@ -49,26 +127,26 @@ userInfo: `used` -> **one** `<String, Boolean>`
#### 3

**Name:** Posting
**Purpose:** Users share experinces and information with others about new locations, potential cultural differences, etc.
**Purpose:** Users share experinces and information with others about new locations, potential cultural differences, etc.
**Operational principle:** User records content and labels it. The content can be recommended to other users.
**State:**
`allContents` -> set Content
**State:**
`allContents` -> set Content
**Actions:**
`upload(input: Media, out item: Content)` — Creates new content from user input. (also will make integration testing way simpler)
`getText(item: Content, out text: String)` — Get text out of the content
`upload(input: Media, out item: Content)` — Creates new content from user input. (also will make integration testing way simpler)
`getText(item: Content, out text: String)` — Get text out of the content
(international students learn more about their country)

#### 4

**Name:** Labeling[Item]
**Purpose:** Tag items to easily tell what topic it belongs to
**Operational Principle:** Someone tags an item, other users can see the tag
`tags`: Item -> tags set String
`topics`: topic String -> tags set String
**Actions:**
`addTags(item: Item, tags: set String, out topics: set String)` — adds tags to the item
`getIteamsWithTag(tag: String, out items: set Item)` — return all items with given tag
`getTagsForItem(item: Item, out tags: set String)` — return all tags for the given item
**Name:** Labeling[Item]
**Purpose:** Tag items to easily tell what topic it belongs to
**Operational Principle:** Someone tags an item, other users can see the tag
`tags`: Item -> tags set String
`topics`: topic String -> tags set String
**Actions:**
`addTags(item: Item, tags: set String, out topics: set String)` — adds tags to the item
`getIteamsWithTag(tag: String, out items: set Item)` — return all items with given tag
`getTagsForItem(item: Item, out tags: set String)` — return all tags for the given item
`getAllTags(out tags: set String)` — return all tags

`getNext(currentItem: Item, out nextItem: Item)` — Get related item with an opposing view to the `currentItem`
Expand All @@ -89,167 +167,3 @@ userInfo: `used` -> **one** `<String, Boolean>`
`getCitations(text: String, out citations: set Strings)` — Suggests citation sources for a piece of content.
`addCitations(item: Content, citations: set Strings)` — Adds citations to content.
`openCitation(citation: String)` — opens a citation link in the webapp.

(making easy to comfirm information, foster analytical thinking and getting used to citing - not a videly-pratcices thing everywhere. Hopefully, will develop a habit of cross-checking information, a crucial skill in diverse cultural environments)

**Note:** not worried as much about scoping because as part of proof concept can convert mp4 to mp3 to get only audio, then do speech-to-text to get only text, and then use an LLM to get resources supporting the information: [chatgpt conversation to demo last step: can see which sites were searched by the model](https://chatgpt.com/share/66f6ce97-c2ac-8000-942e-96606dd50447). Assuming for POC we don't need a perfect prompt and model can be improved in the future.

<!-- Do we need this concept if labeling can return all we need? -->

#### 6

**Name:** Feed
**Purpose:** Get personalized stream of content suggestions to view
**Operational principle:** When user opens the app, some content gets suggested based on user preferences (determined by user input)
**State:**
`allContent`: `content` Content

<!-- `contentLabels`: `content` Content -> `labels` set String
`contentViewers`: `content` Content -> `User` set String -->

**Actions:**
`getNextContent(currentContent: Content, )`

`refresh(preferences: set String, out content: set Content)` — suggest content based on preferences

<!-- #### 7
**Name**: DualView[Item]
**Purpose**: Foster critical thinking by allowing users to view opposing perspectives on controversial topics
**Operational Principle**: When a user searches for or views a potentially polarizing subject, the app shows two types of content with contrasting views, displayed next to each other.
**State:**
`controversialRating`: `topic` String -> `rating` Number
`tagsForTopic`: `topic` String -> `tags, spectrumRating` set [String, Number]
`opposingItem`: `item` Item -> contents set Item
**Actions**:
`getNext(currentItem: Item, out nextItem: Item)` — Get related item with an opposing view to the `currentItem`
`system addOpposite(item: Item, opposingItem: set Item)` — Updates the opposingItem state
`system getOppositeTag(tag: String, out oppositeTags: set String)` — Finds the opposite tags or perspectives for the tag.
`system addTag(tag: String, out [controversialRating: Number, topic: String])` — add the tag to topics and assign rating to both (NLP) (if exists already just return rating) -->

<!-- #### 7
**Name**: ControverialTopic[]
**Purpose**:
**Operational Principle**:
**State:**
`controversialRating`: `topic` String -> `rating` Number
`tagsForTopic`: `topic` String -> `tags, spectrumRating` set [String, Number]
**Actions**:
`system getOppositeTag(topic: String, tag: String, out oppositeTags: set String)` — Finds the opposite tags in relation to the topic
`system addTag(tag: String, out [controversialRating: Number, topic: String])` — add the tag to topics and assign rating to both (NLP) (if exists already just return rating)
#### 7
**Name**: PairedItems[Item]
**Purpose**: Pair content and users to be view together
**Operational Principle**: When a user views one of the items, on a swipe the other item will be shown
**State:**
`pairedItem`: `item` Item -> contents set Item
**Actions**:
`getNext(currentItem: Item, out nextItem: Item)` — Get related random paired item
`system addPair(item: Item, pairedItem: set Item)` — Updates the pairedItem state -->

## Data Modeling

**concept: Authentication**
purpose: log in/register a user
state:
username: User -> one String
password: User -> one String

**concept: Sessioning[User]**
purpose: enable authenticated actions for an extended period of time
state:
session: Session -> one User

**concept: Postings[Author, File]**
purpose: share experiences and information
state:
author: Post -> one Author
file: Post -> one File

**concept: Labeling[Item]**
purpose: tag items
state:
tags: Item -> (tag) set String
topics: (topic) String -> (tag) set String

**concept: Citing[Item]**
purpose: get sources to support `Item`
state:
citations: Content -> set String

**concept: DualView[Item]**
purpose: handle items with opposing views
state:
controversialRating: (topic) String -> (rating) Number
tagsForTopic: (topic) String -> (tags, spectrumRating) set [String, Number]
opposingItem: (item) Item -> (contents) set Item

<iframe frameborder="0" style="width:100%;height:1528px;" src="https://viewer.diagrams.net/?tags=%7B%7D&lightbox=1&highlight=0000ff&edit=_blank&layers=1&nav=1&title=test.drawio#R%3Cmxfile%3E%3Cdiagram%20id%3D%226a731a19-8d31-9384-78a2-239565b7b9f0%22%20name%3D%22Page-1%22%3E7V1bd5u4Fv4tffBjutBdPMZpM3PWac%2FqmnZWZx6JrThMifHCuEnm1x9hCwzawsVEEDttH2aCbAv49qd905Y0IVf3j79l0eruYzpXyQ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e1xMqFByd0OoQFvqXV5odAg5M37SQb28%2Bg8n4WsZw%2FLFUHjhQYvnLR6bVw9qXXDSNplNrw3V5G03RI54D42B1VBg63FtjaAsefum%2BPACk1HLXg%2ByO3XDz4KLaaLUwAfVlCWhQbL6F6d%2FmSp9OTy2WeI4BNw%2BBx75bxZRet1ESKdvGSQJ8HAKgNyAvk0x3Y16WqVrnWU5N4Q7cSk4yupwK1ASbj27hpZNgJa8wPG5DmHUlVHTzn90uqcKh9AE9tyOw5YqVypOtCcDIh0h%2F0mvR%2F%2FNRfhTRBAGfg6%2FisAWyu7zkWh3IE18XECWBvWHTZO8471jY5C2XBYYwA1Qo59FrnTKeIDYt2hGPzceA2XAzsT88SFNQ4HxBqmgGfpcqZWRZB4ucnv9Ptp83YO%2BUdfBWLc3u3YdZ7d2EYVJoX3YjKn3f08ItLm2N7nAZ3AdIpw1vAZIb3bRMn3WD38LCIS1i5MzLVv%2F8gCkh1c0%2BHPuTk6Vek8yuTgcTjtYhn1OBOEkH0ECQqotfKk%2BwbcJARH5tkbLgyeqxQws74f41fxT2QnUeAo2HWdOzn2IIdR0V5C2yWeP4%2BMKG4OdxScgJmU%2BICAPqXrn2gMEWH7Mdy1K6QnAenL%2FenwO5WoQ6W7j%2Bm8WPb8%2Fv8%3D%3C%2Fdiagram%3E%3C%2Fmxfile%3E"></iframe>

## Data representation

```
UserDoc {
_id: ObjectId,
username: String,
password: String
}
```

```
SessionDoc {
_id: ObjectId,
user: ObjectId
}
```

```
PostingDoc {
_id: ObjectId,
author: ObjectId,
file: MongoObject?
}
```

```
LabelDoc {
_id: ObjectId,
label: String,
items: ObjectId[],
topic: String,
rating: Number
}
```

<!-- tag: String, -->

```
CitationDoc {
_id: ObjectId,
url: URL,
items: ObjectId[]
}
```

<!-- ```
ControversialTopicDoc {
_id: ObjectId,
topic: String,
controversialRating: Number,
tagsForTopic: {tag: String, spectrumRating: Number}[]
opposingItems: ObjectId[][]
}
``` -->

<!-- possibly
```
PairedItemsDoc {
_id: ObjectId,
mainItem: ObjectId,
pairedWithItems: ObjectId[]
}
``` -->

0 comments on commit 3858f2e

Please sign in to comment.