React SPA demo to show gists by username for Github Gist users.
In this project, three features are implemented:
- Search: When a user enters a username, it should be able to get a full list of public Gists by that user.
- Filetype: Convert the filetypes of the files in the gist into a tag/badge, (e.g, if the returned gist has list of files containing python and JavaScript files, the gist should have the respective tags/badges).
- Fork: Username/Avatar of the last 3 users who forked it with avatar linking to the fork.
In the project directory, you can run:
- Create React App: To setup initial application with ready to use React, bundling and other functions out of the box
- react-router-dom: To handle routing between different pages
- Redux libraries: Redux and react-redux for state management, redux-thunk for asynchronous actions like Github Gist API calls
- Axios to make rest api calls to Github Gist API
- Bootstrap: For basic styling of components
Application is deployed on vercel hosting service and can be accessed at:
- Demo URL: https://github-gist-app.vercel.app
- Clone the repository using below command
git clone https://github.com/sumitgupta07/github-gist-app.git
- Run below commands on root folder of cloned repo
$ cd github-gist-app
$ npm install
- It will install project dependencies
- Run below command to make production build
$ yarn build
or
$ npm run build
- To start the application, run these commands
$ yarn serve
or
$ npm run serve
- Open http://localhost:5000 in any browser to access the app locally
- Code splitting to reduce bundle size using Suspense/lazy mechanism.
- Pre-rendering using Next/Gatsby to improve SEO. Our app is not behind any login system, so it is good to pre-render for better SEO. Next also provides splitting out of the box.
- Rendering a large number of gists could be slower. Pagination or infinite scrolling (windowing) can be implemented to improve performance.
- Search box getting empty when returning from Forks link. It can be filled from pathname from the url if needed.
- Unit/e2e testing using jest/Enzyme/Cypress.
- Better styling. I have used basic level of styling.