deannabosschert / web-app-from-scratch-1920

Keep track of the current participants of the Web App From Scratch class in the minor Webdevelopment (2020).
https://deannabosschert.github.io/web-app-from-scratch-1920/src
MIT License
1 stars 0 forks source link

Class of 2020

Web App From Scratch @cmda-minor-web 1920

https://wafs.netlify.com/

[Netlify Status(https://app.netlify.com/sites/wafs/deploys)

Web-app with regular internet

gif of web app- regular internet

Web-app with slow 3G-internet (showing skeletonUI)

gif of web app- slow 3g internet

screenshot of web app

Table of Contents (click to expand) - [βœ… To-do](#--to-do) - [πŸ“‹ Concept](#---concept) - [βš™οΈ Installation](#---installation) - [πŸ§‘πŸΌβ€ Actor Diagram](#------actor-diagram) - [↔️ Interaction diagram](#---interaction-diagram) - [🌍 Design patterns](#---design-patterns) - [πŸ‘πŸ½ Best practices](#-----best-practices) - [πŸ—ƒ Data](#---data) * [πŸ’ Github API](#---github-api) + [Endpoint(s)](#endpoint-s-) + [Rate limiting](#rate-limiting) * [πŸ’½ Data cleaning](#---data-cleaning) - [πŸ‘―πŸΏβ€ Features (+ wishlist)](#------features----wishlist-) - [🏫 Assignment](#---assignment) * [Learning goals](#learning-goals) * [Week 1 - Hello API πŸ’](#week-1---hello-api---) * [Week 2 - Design and Refactor πŸ› ](#week-2---design-and-refactor---) * [Week 3 - Wrapping up 🎁](#week-3---wrapping-up---) * [Rubric](#rubric) - [ℹ️ Resources](#---resources) * [Credits](#credits) * [Small inspiration sources](#small-inspiration-sources) - [πŸ—ΊοΈ License](#----license)

βœ… To-do

πŸ“‹ Concept

What does your app do, what is the goal? (passing butter)

This app is for keeping track of the current participants of the Web App From Scratch class in the minor Webdevelopment (2020).

βš™οΈ Installation

Clone this repository to your own device:

$ git clone https://github.com/deannabosschert/web-app-from-scratch-1920.git

Then, navigate to this folder and run:

python -m SimpleHTTPServer 8000`

Helpers

The used external packages are located in the 'helpers'-folder as a static file. Used helpers and their sources:

πŸ§‘πŸΌβ€ Actor Diagram

Which actors are there in your application? (actor diagram) actor diagram

↔️ Interaction diagram

How does flowed interaction through the application? (interaction diagram) interaction diagram

  1. Check LocalStorage
  2. Go to routing and use routie to get the current route
  3. Then, based on if there's data in LS !=, then go to loadNerds, api call, filter and store, then render the page via render.js === , then render the corresponding page via render.js

🌍 Design patterns

Not sure, but I think those count:

πŸ‘πŸ½ Best practices

πŸ—ƒ Data

πŸ’ Github API

What external data source is featured in your project and what are its properties? The API I've used is Github's.

I'm using this API to fetch data of the repositories that are forked from cmda-minor-web/web-app-from-scratch-1920.

Properties

The endpoint I'm using on the overview page is the following: https://api.github.com/repos/cmda-minor-web/web-app-from-scratch-1920/forks?per_page=50

Base URL: ${endpoint}/repos${minor}${course}${year}${tag}?per_page=${limit}

Rate limiting

For API requests using Basic Authentication or OAuth, you can make up to 5000 requests per hour. Authenticated requests are associated with the authenticated user, regardless of whether Basic Authentication or an OAuth token was used. This means that all OAuth applications authorized by a user share the same quota of 5000 requests per hour when they authenticate with different tokens owned by the same user.

For unauthenticated requests, the rate limit allows for up to 60 requests per hour. Unauthenticated requests are associated with the originating IP address, and not the user making requests.

So, if you aren't an authenticated user, your rate limit is 60 requests per hour.

If you do exceed this limit, you'll see the following error message and it's probably a better idea to request as an Authenticated user:

HTTP/1.1 403 Forbidden
Date: Tue, 20 Aug 2013 14:50:41 GMT
Status: 403 Forbidden
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1377013266
{
   "message": "API rate limit exceeded for xxx.xxx.xxx.xxx. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)",
   "documentation_url": "https://developer.github.com/v3/#rate-limiting"
}

If you are authenticated, you should be able to receive the following data:

(49)Β [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
Individual data object: (click to expand) ```json { id: 237659708 node_id: "MDEwOlJlcG9zaXRvcnkyMzc2NTk3MDg=" name: "web-app-from-scratch-1920" full_name: "deannabosschert/web-app-from-scratch-1920" private: false owner: login: "deannabosschert" id: 36165810 node_id: "MDQ6VXNlcjM2MTY1ODEw" avatar_url: "https://avatars1.githubusercontent.com/u/36165810?v=4" gravatar_id: "" url: "https://api.github.com/users/deannabosschert" html_url: "https://github.com/deannabosschert" followers_url: "https://api.github.com/users/deannabosschert/followers" following_url: "https://api.github.com/users/deannabosschert/following{/other_user}" gists_url: "https://api.github.com/users/deannabosschert/gists{/gist_id}" starred_url: "https://api.github.com/users/deannabosschert/starred{/owner}{/repo}" subscriptions_url: "https://api.github.com/users/deannabosschert/subscriptions" organizations_url: "https://api.github.com/users/deannabosschert/orgs" repos_url: "https://api.github.com/users/deannabosschert/repos" events_url: "https://api.github.com/users/deannabosschert/events{/privacy}" received_events_url: "https://api.github.com/users/deannabosschert/received_events" type: "User" site_admin: false __proto__: Object html_url: "https://github.com/deannabosschert/web-app-from-scratch-1920" description: "Web App From Scratch @cmda-minor-web 1920" fork: true url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920" forks_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/forks" keys_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/keys{/key_id}" collaborators_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/collaborators{/collaborator}" teams_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/teams" hooks_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/hooks" issue_events_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/issues/events{/number}" events_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/events" assignees_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/assignees{/user}" branches_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/branches{/branch}" tags_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/tags" blobs_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/git/blobs{/sha}" git_tags_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/git/tags{/sha}" git_refs_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/git/refs{/sha}" trees_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/git/trees{/sha}" statuses_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/statuses/{sha}" languages_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/languages" stargazers_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/stargazers" contributors_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/contributors" subscribers_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/subscribers" subscription_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/subscription" commits_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/commits{/sha}" git_commits_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/git/commits{/sha}" comments_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/comments{/number}" issue_comment_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/issues/comments{/number}" contents_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/contents/{+path}" compare_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/compare/{base}...{head}" merges_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/merges" archive_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/{archive_format}{/ref}" downloads_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/downloads" issues_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/issues{/number}" pulls_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/pulls{/number}" milestones_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/milestones{/number}" notifications_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/notifications{?since,all,participating}" labels_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/labels{/name}" releases_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/releases{/id}" deployments_url: "https://api.github.com/repos/deannabosschert/web-app-from-scratch-1920/deployments" created_at: "2020-02-01T18:36:35Z" updated_at: "2020-02-26T23:46:05Z" pushed_at: "2020-02-26T23:54:29Z" git_url: "git://github.com/deannabosschert/web-app-from-scratch-1920.git" ssh_url: "git@github.com:deannabosschert/web-app-from-scratch-1920.git" clone_url: "https://github.com/deannabosschert/web-app-from-scratch-1920.git" svn_url: "https://github.com/deannabosschert/web-app-from-scratch-1920" homepage: "https://deannabosschert.github.io/web-app-from-scratch-1920/src" size: 4070 stargazers_count: 0 watchers_count: 0 language: "JavaScript" has_issues: true has_projects: true has_downloads: true has_wiki: true has_pages: true forks_count: 0 mirror_url: null archived: false disabled: false open_issues_count: 1 license: {key: "mit", name: "MIT License", spdx_id: "MIT", url: "https://api.github.com/licenses/mit", node_id: "MDc6TGljZW5zZTEz"} forks: 0 open_issues: 1 watchers: 0 default_branch: "master" } ```

πŸ’½ Data cleaning

What has been done with the fetched data?

Filtering the data using array.filter

function filterArray(array) {
  return array.filter(results => {
    return {
      name: results.owner.login,
      description: results.description,
      avatar: results.owner.avatar_url,
      homepage: results.homepage,
      id: results.id,
      ding: results.ding,
      id: results.id
      }
   }
}

Result:

{
name: "web-app-from-scratch-1920", description: "Web App From Scratch @cmda-minor-web 1920", avatar: "https://avatars1.githubusercontent.com/u/36165810?v=4", homepage: "https://deannabosschert.github.io/web-app-from-scratch-1920/src", id: 237659708, …}
name: "web-app-from-scratch-1920"
description: "Web App From Scratch @cmda-minor-web 1920"
avatar: "https://avatars1.githubusercontent.com/u/36165810?v=4"
homepage: "https://deannabosschert.github.io/web-app-from-scratch-1920/src"
id: 237659708
node_id: "MDEwOlJlcG9zaXRvcnkyMzc2NTk3MDg="
full_name: "deannabosschert/web-app-from-scratch-1920"
private: false
owner: {login: "deannabosschert", id: 36165810, node_id: "MDQ6VXNlcjM2MTY1ODEw", avatar_url: "https://avatars1.githubusercontent.com/u/36165810?v=4", gravatar_id: "", …}
html_url: "https://github.com/deannabosschert/web-app-from-scratch-1920"
__proto__: Object
}

Rendering the data to html-representation using array.map

   <article class="student">
            <h3 class="projectName"></h3>
            <p class="description"></p>
            <a class="html_url">
              <div class="avatarWrapper">
                <img class="avatar">
              </div>
              <p class="homepage"></p>
            </a>
            <p class="id"></p>
            <p class="node_id"></p>
            <p class="name"></p>
            <p class="full_name"></p>
            <p class="private"></p>
            <p class="owner"></p>
          </article>

πŸ‘―πŸΏβ€ Features (+ wishlist)

What would you like to add (feature wishlist / backlog)?

🏫 Assignment

(click to expand) In this course I learned to build a web application without frameworks or unnecessary libraries, but with vanilla HTML, CSS & JavaScript as much as possible. The end result is a modular, single page web app (SPA). Data will be retrieved from an external API of my choice, manipulated and finally shown in the UI of the App. I have learned different ways to structure code and developed my own coding style. With the gained knowledge I'm able to build interactive prototypes, based on real data. Also, I gained a better understanding of the how API's, frameworks and libraries work. ### Learning goals - _You can add structure to your code by applying patterns. You can defend the choice for the chosen patterns_ - _You can retrieve data, manipulate it and dynamically convert it to html elements using templating_ - _You understand how you can work with an external API using asynchronous code_ - _You understand how you can manage state in your application and you inform the user of state where necessary_ ### Week 1 - Hello API πŸ’ Goal: Retrieve data from an API and render it in an overview page. ### Week 2 - Design and Refactor πŸ›  Goal: Design the web app. Add routes and states. Rendering detail page. ### Week 3 - Wrapping up 🎁 Goal: Manipulate data. Split code into modules. Reflect on end result

Rubric

Rubric- detailed rating of my project rubric

ℹ️ Resources

https://developer.github.com/v3/

Credits

Small inspiration sources

πŸ—ΊοΈ License

Author: Deanna Bosschert , license by MIT