Skip to content

Commit

Permalink
update data model in README b00tc4mp#237
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafa0297 committed Nov 26, 2024
1 parent 77ea133 commit 6ddc1ea
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 10 deletions.
13 changes: 13 additions & 0 deletions staff/rafael-infante/playground/pokeapi/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const btnApi = document.getElementById('btn-api')
const apiData = document.getElementById('api-data')

const callApi = () => {
fetch('https://pokeapi.co/api/v2/pokemon/ditto')
.then((res) => res.json())
.then((data) => {
apiData.innerText = JSON.stringify(data.base_experience)
})
.catch((error) => console.error(new Error(error)))
}

btnApi.addEventListener('click', callApi)
14 changes: 14 additions & 0 deletions staff/rafael-infante/playground/pokeapi/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Pokeapi</title>
</head>
<body style="background-color: cadetblue">
<button id="btn-api">Call API</button>
<p id="api-data"></p>

<script src="app.js"></script>
</body>
</html>
50 changes: 40 additions & 10 deletions staff/rafael-infante/project/doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,19 @@ This is a Mobile app for elderly people who need some assistance at home.
### Use Cases

Caregiver (User)
-
-

- Create and publish help offers: Specify the type of help offer with the availability, address and price.
- Search for help requests: Browse active requests on the platform and communicate with assistance seekers.
- Submit offers: Send offers to assist an elder with specific needs.
- Manage profile: Update availability, view ratings, and manage completed tasks.
- Rate elders: Send a review with a rating of the elder.

Elder (User)
-
-
-

- Create help requests: Specify the type of assistance needed and publish requests.
- Search for assistance offers: Browse active offers on the platform and communicate with caregivers.
- Save the post of a specified caregiver.
- Rate the caregiver: Provide a feedback after receiving help.

### UXUI Design

Expand All @@ -42,7 +48,7 @@ Elder (User)
### Techs

- HTML/CSS/JS (...)
- React Native (...)
- React JS (...)
- Node (...)
- Express (...)
- Mongo (...)
Expand All @@ -52,20 +58,44 @@ Elder (User)
### Data Model

User

- id (uuid)
- name (string)
- address (string)
- email (string)
- username (string)
- password (string)
- rating (object)
- role (string, enum: caregiver | elder)
- permission (string, enum: read | write)

Rating

- stars (number)
- reviews (string)

Post

- id (uuid)
- author (string)
- image (string)
- text(string)
- date (Date)
- comments (object)

Comment

- id (uuid)
- comment (string)

### Test Coverage

```sh
----------------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
----------------------|---------|----------|---------|---------|-------------------
All files | 96.96 | 50 | 100 | 96.87 |
registerUser.js | 92.3 | 50 | 100 | 91.66 | 23
registerUser.spec.js | 100 | 100 | 100 | 100 |
All files | 96.96 | 50 | 100 | 96.87 |
registerUser.js | 92.3 | 50 | 100 | 91.66 | 23
registerUser.spec.js | 100 | 100 | 100 | 100 |
----------------------|---------|----------|---------|---------|-------------------
```

0 comments on commit 6ddc1ea

Please sign in to comment.