A simple Vue.js application for fetching GitHub user data.
- I decided to build the project with Vue and Typescript.
- I used Vue CLI to set up the project and built on the structure provided by it
- The workflow should contain 3 steps:
- List of top three repositories from predefined user.
- Simple form that collects user data - fullname - email - github user - terms (all fields are required).
- Listing user avatar + some informations and list of user repos which can be limited by number
- Showing a user repository after selecting it
- Each page should have "back" and "next" button.
- Next button should be disabled if input on the current step is invalid.
- Form should handle errors and basic validations.
- Available views: - / - Home: root view with top three repositoris - /:user_name/:repo_name - display single repository for user - /request-form - search form to query for github user -/github-user view with user information and list of repositories - /404
- I decided to create simple store(no Vuex) as it's very simple to have it with Reactivity.
- Does not allow direct access of pages from browsers without required information (handled in router file)
- I created a hook for Api calls and reused it for other hooks to collect needed data.
- I used native
fetch()to consume the Github API. - There is utils folder in root directory which contains some JS functions around reusable and available through all the application.
Source Sans Profont is using in the project.- In order to use the
mixins, andvariablesavailable on the Vue files I imported them in vue.config.js - I used
BEMnaming convention and fontawsome icons.
npm install
npm run serve
npm run build
npm run lint