Skip to content

webdevsk/Random-task-today

Repository files navigation


Logo

Random Task Today

Bored? Generate a random task to do today and see a refreshing photo.

Explore the docs »

View Demo · Report Bug · Request Feature


Table of Contents

About The Project

Product snapshot


  • This is a simple app that gives you a random task and a related photo.
  • They are fetched from Bored API and Unsplash API respectively.
  • This app demonstrates how efficiently I made Axios(Fetch) calls to two different APIs sequentially.
  • It also demonstrates how I managed preloading, loading and status states based on async functions.
  • Wrote custom functions so that you will see the photo only when it is downloaded completely.
  • Was looking for a way to hide API keys. Had two options. So I obviously chose the harder and more interesting one. 😉
  • Integrated Netlify Serverless Functions (Which is based on Amazon AWS Lambda) to perform backend tasks.
  • All API calls are made from the backend functions, keeping API credentials secret.

What users can expect from this App

  • A productive task to do today.
  • A nice refreshing photo in the background.
  • A carefully designed UI so that the text is distinguishable regardless of the photo behind.
  • You can just click on the text and write whatever you want.
  • Photos recieved from Unsplash are not always accurate. But what can you expect without integrating Ai 😅

(back to top)

Built With

React
TailwindCSS
Netlify

(back to top)

Getting Started

🌐 The site is already live at: https://splendid-narwhal-4770fd.netlify.app/

OR

🖥️ You can test it on your local machine by following the steps below.

Prerequisites

  1. Install NODE.JS and Git

  2. Open your projects base folder and launch any terminal of your choice.

  3. Run this command:

    npm install npm@latest -g
    npm install netlify-cli -g

Installation

  1. Clone the repo

    git clone https://github.com/webdevsk/Random-task-today.git
  2. Install NPM packages

    npm install
  3. Fill in a .env.local file following the patterns of envSample.txt

  4. Run Dev server along with serverless functions

    netlify dev

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Follow on GitHub Follow on Linkedin

Project Link: https://github.com/webdevsk/Random-task-today

(back to top)