|
1 |
| -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). |
| 1 | +# Frontend coding challenge |
2 | 2 |
|
3 |
| -## Available Scripts |
| 3 | +## Idea of the App |
4 | 4 |
|
5 |
| -In the project directory, you can run: |
| 5 | +The task is to implement a small webapp that will list the most starred Github repos that were created in the last 30 days. You'll be fetching the sorted JSON data directly from the Github API (Github API explained down below). |
6 | 6 |
|
7 |
| -### `npm start` |
8 | 7 |
|
9 |
| -Runs the app in the development mode.<br> |
10 |
| -Open [http://localhost:3000](http://localhost:3000) to view it in the browser. |
| 8 | +## Features |
11 | 9 |
|
12 |
| -The page will reload if you make edits.<br> |
13 |
| -You will also see any lint errors in the console. |
| 10 | +- [x] As a User I should be able to list the most starred Github repos that were created in the last 30 days. |
| 11 | +- [x] As a User I should see the results as a list. One repository per row. |
| 12 | +- [x] As a User I should be able to see for each repo/row the following details : |
| 13 | + - Repository name |
| 14 | + - Repository description |
| 15 | + - Number of stars for the repo. |
| 16 | + - Number of issues for the repo. |
| 17 | + - Username and avatar of the owner. |
| 18 | +- [x] As a User I should be able to keep scrolling and new results should appear (pagination). |
14 | 19 |
|
15 |
| -### `npm test` |
16 | 20 |
|
17 |
| -Launches the test runner in the interactive watch mode.<br> |
18 |
| -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. |
| 21 | +## How to get the data from Github |
19 | 22 |
|
20 |
| -### `npm run build` |
| 23 | +To get the most starred Github repos created in the last 30 days (relative to 2017-11-22), you'll need to call the following endpoint : |
| 24 | +`https://api.github.com/search/repositories?q=created:>2017-10-22&sort=stars&order=desc` |
| 25 | +The JSON data from Github will be paginated (you'll receive around 100 repos per JSON page). |
| 26 | +To get the 2nd page, you add `&page=2` to the end of your API request : |
| 27 | +`https://api.github.com/search/repositories?q=created:>2017-10-22&sort=stars&order=desc&page=2` |
| 28 | +To get the 3rd page, you add `&page=3` ... etc |
| 29 | +You can read more about the Github API over [here](https://developer.github.com/v3/search/#search-repositories |
| 30 | +). |
21 | 31 |
|
22 |
| -Builds the app for production to the `build` folder.<br> |
23 |
| -It correctly bundles React in production mode and optimizes the build for the best performance. |
24 | 32 |
|
25 |
| -The build is minified and the filenames include the hashes.<br> |
26 |
| -Your app is ready to be deployed! |
| 33 | +## ScreenShoot |
27 | 34 |
|
28 |
| -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. |
| 35 | + |
29 | 36 |
|
30 |
| -### `npm run eject` |
| 37 | +Here's what each element represents : |
31 | 38 |
|
32 |
| -**Note: this is a one-way operation. Once you `eject`, you can’t go back!** |
| 39 | + |
33 | 40 |
|
34 |
| -If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. |
35 | 41 |
|
36 |
| -Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. |
| 42 | +## Technologies Used in Project |
37 | 43 |
|
38 |
| -You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. |
| 44 | +- React |
| 45 | +- Material - UI |
| 46 | +- Moment.js |
| 47 | +- Axios |
| 48 | +- Github API |
39 | 49 |
|
40 |
| -## Learn More |
41 | 50 |
|
42 |
| -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). |
| 51 | +## Setup |
43 | 52 |
|
44 |
| -To learn React, check out the [React documentation](https://reactjs.org/). |
| 53 | +``` |
| 54 | +git clone https://github.com/Azghour-Saad/frontend-coding-challenge.git |
45 | 55 |
|
46 |
| -### Code Splitting |
| 56 | +cd frontend-coding-challenge |
47 | 57 |
|
48 |
| -This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting |
| 58 | +npm install |
| 59 | +``` |
49 | 60 |
|
50 |
| -### Analyzing the Bundle Size |
51 | 61 |
|
52 |
| -This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size |
| 62 | +## Running the app |
53 | 63 |
|
54 |
| -### Making a Progressive Web App |
| 64 | +To get the app up and running run : |
55 | 65 |
|
56 |
| -This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app |
| 66 | +``` |
| 67 | +npm start |
| 68 | +``` |
57 | 69 |
|
58 |
| -### Advanced Configuration |
59 | 70 |
|
60 |
| -This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration |
61 |
| - |
62 |
| -### Deployment |
63 |
| - |
64 |
| -This section has moved here: https://facebook.github.io/create-react-app/docs/deployment |
65 |
| - |
66 |
| -### `npm run build` fails to minify |
67 |
| - |
68 |
| -This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify |
| 71 | +<b>Finnaly, The project will be available at : </b> **http://localhost:3000/ to view it in the browser.** |
0 commit comments