Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Final project submition #13

Merged
merged 60 commits into from
Jan 8, 2022
Merged
Show file tree
Hide file tree
Changes from 59 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
918db9b
Set up linters
BonkeGcobo Jan 4, 2022
49ab2a0
Set up linters
BonkeGcobo Jan 4, 2022
779cee9
Add header for the book project
BonkeGcobo Jan 4, 2022
63f97f9
Fix js linter errors
BonkeGcobo Jan 4, 2022
502d52c
Add code review suggestion on the header
BonkeGcobo Jan 4, 2022
11eacd9
Change Book to Books
BonkeGcobo Jan 4, 2022
4adbc15
Merge pull request #1 from Hombre2014/Header-section
BonkeGcobo Jan 4, 2022
08824b7
Fetch book isbn from api
BonkeGcobo Jan 5, 2022
a965827
Create a callbook function that will call the books presented in fron…
BonkeGcobo Jan 5, 2022
21153b3
Display books on the front-page
BonkeGcobo Jan 5, 2022
25c87f6
style the movie header
BonkeGcobo Jan 5, 2022
29fa74c
add movie id
BonkeGcobo Jan 5, 2022
60fb535
Finish style the interaction section
BonkeGcobo Jan 5, 2022
3b3e5d4
Fix linter errors
BonkeGcobo Jan 5, 2022
43a627e
Add fetchAPI and comments functions
Hombre2014 Jan 5, 2022
bd03a90
change async to promises
BonkeGcobo Jan 5, 2022
6523b9b
Changing asynch function to promises
Hombre2014 Jan 5, 2022
74a7357
Fix linter errors
Hombre2014 Jan 5, 2022
0350252
Merge pull request #2 from Hombre2014/Display-books
Hombre2014 Jan 5, 2022
246c0fe
modify postLike function with hard coded URL
Hombre2014 Jan 5, 2022
2b57319
Clean up getMovies function
Hombre2014 Jan 5, 2022
e6a3279
Modal popup finished
Hombre2014 Jan 6, 2022
936566b
Merge pull request #4 from Hombre2014/comments
Hombre2014 Jan 6, 2022
4b223a2
Function display comments added
Hombre2014 Jan 6, 2022
9b46ac6
Add comments counter function
Hombre2014 Jan 7, 2022
35ac675
Fix displaying comments on the modal
Hombre2014 Jan 7, 2022
d871e1b
Implement comments counter
Hombre2014 Jan 7, 2022
aecea26
Implement comments counter after posting a new comment
Hombre2014 Jan 7, 2022
9d25317
Fix some of the syntax and clean up the code
Hombre2014 Jan 7, 2022
ade3dc7
Merge pull request #6 from Hombre2014/comments-display
Hombre2014 Jan 7, 2022
d2e50e8
add getLikes.js
BonkeGcobo Jan 7, 2022
7486faf
Fix conflict issues
BonkeGcobo Jan 7, 2022
2bd62f2
Show both likes and pop up
BonkeGcobo Jan 7, 2022
ab1e489
Fix javascript linters
BonkeGcobo Jan 7, 2022
7fd237b
Merge pull request #7 from Hombre2014/integrate
Hombre2014 Jan 7, 2022
cba9c7f
Add footer
BonkeGcobo Jan 7, 2022
af8b62b
Fix css lint errors
BonkeGcobo Jan 7, 2022
f1efbce
update footer
BonkeGcobo Jan 7, 2022
8c9a06f
Add some styling and movies counter
Hombre2014 Jan 7, 2022
cc3c472
Adding link to footer
BonkeGcobo Jan 7, 2022
aaa4e8f
fix css linters
BonkeGcobo Jan 7, 2022
080d08c
Final touch ups
Hombre2014 Jan 7, 2022
898ec1d
Merge pull request #8 from Hombre2014/Footer
Hombre2014 Jan 7, 2022
32b805f
Merge pull request #9 from Hombre2014/styling
Hombre2014 Jan 7, 2022
20df1fd
Test item counter
BonkeGcobo Jan 7, 2022
118bc46
CSS for mobile added and README file updated
Hombre2014 Jan 7, 2022
d87335c
fix linter errors
BonkeGcobo Jan 7, 2022
c58a6dc
Edit the README file
Hombre2014 Jan 8, 2022
5f2d768
Add mocks to item counter test
BonkeGcobo Jan 8, 2022
8cd5f35
Fix lint errors
BonkeGcobo Jan 8, 2022
902e029
fix lint errors
BonkeGcobo Jan 8, 2022
7ae0af2
fix linter errors
BonkeGcobo Jan 8, 2022
4a258a1
Merge pull request #10 from Hombre2014/itemCounter-test
Hombre2014 Jan 8, 2022
d163ddd
Fix linter errors
Hombre2014 Jan 8, 2022
8531b20
Merge pull request #11 from Hombre2014/final
Hombre2014 Jan 8, 2022
2d2af46
Testing movies comments counter
Hombre2014 Jan 8, 2022
236f7ab
Merge pull request #12 from Hombre2014/test-comments
Hombre2014 Jan 8, 2022
4243119
Deploying live demo setup
Hombre2014 Jan 8, 2022
8ed3989
Add a video presentation link
Hombre2014 Jan 8, 2022
8daf54f
Convert normal functions to arrow functions
Hombre2014 Jan 8, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 25 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"env": {
"browser": true,
"es6": true,
"jest": true
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"extends": ["airbnb-base"],
"rules": {
"no-shadow": "off",
"no-param-reassign": "off",
"eol-last": "off",
"import/extensions": [ 1, {
"js": "always", "json": "always"
}]
},
"ignorePatterns": [
"dist/",
"build/"
]
}
63 changes: 63 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Linters

on: pull_request

env:
FORCE_COLOR: 1

jobs:
lighthouse:
name: Lighthouse
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Setup Lighthouse
run: npm install -g @lhci/cli@0.7.x
- name: Lighthouse Report
run: lhci autorun --upload.target=temporary-public-storage --collect.staticDistDir=.
webhint:
name: Webhint
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Setup Webhint
run: |
npm install --save-dev hint@6.x
[ -f .hintrc ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.hintrc
- name: Webhint Report
run: npx hint .
stylelint:
name: Stylelint
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Setup Stylelint
run: |
npm install --save-dev stylelint@13.x stylelint-scss@3.x stylelint-config-standard@21.x stylelint-csstree-validator@1.x
[ -f .stylelintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.stylelintrc.json
- name: Stylelint Report
run: npx stylelint "**/*.{css,scss}"
eslint:
name: ESLint
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Setup ESLint
run: |
npm install --save-dev eslint@7.x eslint-config-airbnb-base@14.x eslint-plugin-import@2.x babel-eslint@10.x
[ -f .eslintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.eslintrc.json
- name: ESLint Report
run: npx eslint .

18 changes: 18 additions & 0 deletions .hintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"connector": {
"name": "local",
"options": {
"pattern": ["**", "!.git/**", "!node_modules/**"]
}
},
"extends": ["development"],
"formatters": ["stylish"],
"hints": [
"button-type",
"disown-opener",
"html-checker",
"meta-charset-utf-8",
"meta-viewport",
"no-inline-styles:error"
]
}
11 changes: 11 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": ["stylelint-config-standard"],
"plugins": ["stylelint-scss", "stylelint-csstree-validator"],
"rules": {
"at-rule-no-unknown": null,
"scss/at-rule-no-unknown": true,
"csstree/validator": true
},
"ignoreFiles": ["build/**", "dist/**", "**/reset*.css", "**/bootstrap*.css"]
}

88 changes: 69 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,84 @@

# Yuriy Chamkoriyski & Bonke Gcobo Javascript capstone project

> API-based webapp
> API-based webapp from Module 2 at Microverse

# Wireframe of App
## Wireframe requirements

## The Home Page low fidelity
### The Home Page low fidelity
![Home.png](./Home.png)

## The low fidelity for comment pop up page
### The low fidelity for comment pop up page
![ForComments.png](./ForComments.png)

## Actual screenshot
![Screenshot](./src/Screenshot.png)

## Video presentation
[Video link](https://youtu.be/QOhLsW7cuFU)

## Description
The JavaScript capstone project is about building your own web application based on an external API. You will select an API that provides data about a topic that you like and then build the webapp around it.
The JavaScript capstone project is about building your own web application based on an external API. You will select an API that provides data about a topic that you like and then build the webapp around it.

## Requirements

### APIs
- First, you need to find an API so you can base the development of the webapp around it. The API should allow you to:
- Get a list of items with a unique item id (or generate the unique id).
- For a given item, get detailed information about it.
- You will use our [Involvement API](https://www.notion.so/Involvement-API-869e60b5ad104603aa6db59e08150270) to record the different user interactions (likes, comments and reservations).

### Interfaces
- You should build these interfaces:
- The home page.
- The comments popup.
- You should follow the layout of the wireframes provided. You should personalize the rest of the design including colors, typographies, spacings, etc.
- Home page
- When the page loads, the webapp retrieves data from:
- The selected API and shows the list of items on screen.
- The Involvement API to show the item likes.
- Remember that your page should make only 2 requests:
- One to the base API.
- And one to the Involvement API.
- When the user clicks on the Like button of an item, the interaction is recorded in the Involvement API and the screen is updated.
- When the user clicks on the "Comments" button, the Comments popup appears.
- Home page header and navigation similar to the given mockup.
- Home page footer similar to the given mockup.
- Comments popup
- When the popup loads, the webapp retrieves data from:
- The selected API and shows details about the selected item.
- The Involvement API to show the item comments.
- When the user clicks on the "Comment" button, the data is recorded in the Involvement API and the screen is updated.

### Counters
Counters We have counters in all the interfaces that show:
- The number of items (home).
- The number of comments (comments popup).

### Technical set up
- Set up the repository on GitHub and use Gitflow.
- Set up webpack.
- Set up a JavaScript testing library (Jest).

## Instructions:

### Cloning the repo to your local system (if you already have git, installed in your system)

1) [Copy this Link](https://github.com/Hombre2014/JS_Capstone_project.git)
1) Copy this Link `https://github.com/Hombre2014/JS_Capstone_project.git`
2) Open your terminal or command line
3) [git clone](https://github.com/Hombre2014/JS_Capstone_project.git)
4) Open the folder with your code editor
3) Run the command: `git clone https://github.com/Hombre2014/JS_Capstone_project.git`
4) Open the folder with your code editor: `cd JS_Capstone_project`
5) Now You can edit the code and check the changes in the browser using Live Server


## Built With

- Major languages: HTML, CSS, JS
- Frameworks: none
- Technologies used: Git, webpack
- Technologies used: Git, webpack, Jest

## Live Demo

- Not deployed yet.
- [Live demo link](https://chamkoriyski.me/JS_Capstone_project/dist)

## Getting Started

Expand All @@ -45,7 +88,7 @@ To get a local copy up and running follow these simple example steps.
### Prerequisites

- Internet connection and browser
- A text editor(preferably Visual Studio Code)
- A text editor (preferably Visual Studio Code)
- Browser

### Setup
Expand All @@ -59,33 +102,40 @@ To get a local copy up and running follow these simple example steps.

### Usage

- Clone the repository using "git clone git@github.com:Hombre2014/Webpack-Setup.git"
- Change directory into the project folder
- Run npm install
- Run npm start
- Clone the repository using `git clone https://github.com/Hombre2014/JS_Capstone_project.git`
- Change directory into the project folder: `cd JS_Capstone_project`
- Run `npm install`
- Run `npm start`
- A new browser will open automatically with application loaded

### Run tests

- N/A
- Test the number of movies loaded with Jest
- Test the number of comments with Jest

### Deployment

- All the files necessary for deployment are in the /dist folder

## Author
## Authors

👤 **Yuriy Chamkoriyski**

- GitHub: [@Hombre2014](https://github.com/Hombre2014)
- Twitter: [@Chamkoriyski](https://twitter.com/Chamkoriyski)
- LinkedIn: [axebit](https://linkedin.com/in/axebit)

👤 **Bonke Gcobo**

- GitHub: [@BonkeGcobo](https://github.com/BonkeGcobo)
- Twitter: [@bonkegcobo](https://twitter.com/bonkegcobo)
- LinkedIn: [Bonke Gcobo](https://www.linkedin.com/in/bonke-gcobo-28a763125/)

## 🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the [issues page](https://github.com/Hombre2014/Webpack-Setup/issues).
Feel free to check the [issues page](https://github.com/Hombre2014/JS_Capstone_project.git/issues).

## Show your support

Expand Down
Binary file added dist/5478a81c4745fdb038db.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 49 additions & 4 deletions dist/index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,56 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Webpack Exercise</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://kit.fontawesome.com/f83a08773e.js" crossorigin="anonymous"></script>
<link href="http://fonts.cdnfonts.com/css/cocogoose" rel="stylesheet">
<link href="//db.onlinewebfonts.com/c/796e2db2256ddfab47394211f41ac410?family=Acumin+Pro" rel="stylesheet"
type="text/css" />
<title>Movies</title>
<script defer src="main.js"></script></head>

<body>
<h1>Hello webpack!</h1>
<header class="header-section">
<div class="appName">
<h1 class="appTitle">Movie Library</h1>
</div>

<div class="botHeader">
<div class="logoContainer">
</div>

<ul class="menuItems">
<li>Movies <span class="movies-counter"></span></li>
<li>Shows</li>
<li>Series</li>
</ul>
</div>
</header>
<hr>
<div class="modal"></div>
<main class="Shows">
</main>

<footer class="footer">
<h3>Developed by</h3>
<div class="dev">
<h3>Bonke</h3>
<div class="media-links">
<a href="https://www.linkedin.com/in/bonke-gcobo-28a763125/" title="LinkedIn"><i class="fab fa-linkedin-in fa-1x"></i></a>
<a href="https://github.com/BonkeGcobo"><i class="fab fa-github-square fa-1x" title="Github"></i></a>
</div>
</div>
<span id="and">&</span>
<div class="dev">
<h3>Yuriy</h3>
<div class="media-links">
<a href='https://www.linkedin.com/in/axebit/'><i class="fab fa-linkedin-in fa-1x" title="LinkedIn"></i></a>
<a href="https://github.com/Hombre2014"><i class="fab fa-github-square fa-1x" title="Github"></i></a>
</div>
</div>
</footer>
</body>

</html>