Giter Club home page Giter Club logo

catlas's Introduction

CATLAS

CATLAS is a single-page app that allows users to search for cat images by breed using The Cat API. The project was bootstrapped with Create React App.

Live App

The app is deployed on GitHub pages and can be accessed here: https://liezlsantos.github.io/catlas/.

Getting Started

Prerequisites

  • Node.js ^20

Starting the development server

Setting up environment variables

Copy .env.example to .env. Update the file accordingly:

Option 1: Connect the app directly to The CAT API

REACT_APP_CAT_API_BASE_URL="https://api.thecatapi.com/v1"
REACT_APP_CAT_API_KEY={valid API KEY}

On dev mode, you can provide a valid API key retrieved from The Cat API to connect directly to https://api.thecatapi.com/v1. However, this will expose your API key to the client so must only be done on development mode. If you don't provide a valid key, the app will still work but can only display up to 10 images at random.

Option 2: Run the proxy service

Otherwise, you can run the proxy service at CATLAS API. By default the proxy runs on http://localhost:3001 so no changes for .env file is required.

Steps

  1. Run npm install to install dependencies.
  2. Run npm start. This will run the app in the development mode. Open http://localhost:3000 to view it on the browser.

Other Available Scripts

npm run format

Format files using prettier.

npm run test

Run tests.

npm run build

Builds the app for production to the build folder.

Deployment

App is deployed on GitHub pages using GitHub Actions. Pushing to main branch will automatically trigger a deployment.

catlas's People

Contributors

liezlsantos avatar

Watchers

 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.