GithubHelp home page GithubHelp logo

agrawpri / quote-generator Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 0.0 4.1 MB

A webapp which generates random quotes.

Home Page: https://agrawpri.github.io/quote-generator/

HTML 7.71% CSS 6.20% JavaScript 86.09%
github-pages reactjs webpack

quote-generator's Introduction

Quote Generator

Solution for a challenge from Devchallenges.io.

Table of Contents

Overview

img.png

A web application which displays randomly generated quotes. One can also view quotes by a given author/speaker.

The app can be accessed at https://agrawpri.github.io/quote-generator/.

Built With

Features

This application/site was created as a submission to a DevChallenges challenge. The challenge was to build an application to complete the given user stories.

The following features have been implemented:

  • Generating random quotes on-demand.
  • Viewing all quotes by the author of the current quote.

The following features are expected to arrive in the future:

  • Searching for quotes by authors using an auto-complete input field for the authors.

How To Use

To clone and run this application, you'll need Git and npm installed on your computer. From your command line:

# Clone this repository
$ git clone https://github.com/agrawpri/quote-generator

# Install dependencies
$ npm install

# Build the app
$ npm run build

# Run the app
$ npm run start

The app should then be accessible on http://localhost:3000/

Learnings

I had a bunch of learnings and ah-ha moments while developing this app a few of which are the following:

  • I started out with using react-scripts but soon realized that it's not going to be enough because I wanted to host the app on GitHub Pages which requires the built code checked in to git. So, I moved to using webpack. I learned a great deal about webpack plugins and configuration including generating source maps, using HTML templates, etc.
  • I initially developed the app with vanilla CSS, but then I stumbled upon Grommet, a React library for layouts and common components. Using the same, I was able to get rid of all my CSS and my app ended up just using Grommet without much ad-hoc CSS.
  • I also faced a few issues with react-router's BrowserRouter's compatability with GitHub Pages. I tried a lot of things and finally was able to fix it using HashRouter (see this).

Acknowledgements

Contact

quote-generator's People

Contributors

priyansh121096 avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.