Skip to content

Latest commit

 

History

History
171 lines (98 loc) · 6.52 KB

README.md

File metadata and controls

171 lines (98 loc) · 6.52 KB

Netlify Status License: MIT Node.js CI

PawternityHub

image image

A web application that helps users find pets to adopt around their area. It started out as a Hackathon project and then Open Source during Hacktoberfest All levels are welcome to contribute.

Contribution

Read Here Contribution

Tech Stack Used

  • React
  • Tailwind
  • Supabase
  • Daisy UI

Pet Finder Developer API Key

Register for an api key here PetFinder

Create an .env file in root folder

In the .env file put

REACT_APP_PETFINDER_KEY = APIKEYhere&client_secret=secretkeyhere

Restart the app

Where the key is being used

grant_type=client_credentials&client_id=${process.env.REACT_APP_PETFINDER_KEY}

This project was bootstrapped with Create React App.

Supabase

Join My Discord for the Supabase keys, which need to be in .env

Setup

yarn

yarn prepare

yarn start

test

yarn test

Errors Fix

If you are getting this InvalidTokenError: Invalid token specified: Cannot read properties of undefined (reading 'replace')

go to dev tools-> application storage-> local storage

Delete the token

Available Scripts

Installing Yarn

npm install --global yarn

After Installing Yarn

yarn install

In the project directory, you can run:

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

yarn format

Formats the code.

yarn test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

yarn build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

yarn eject

Note: this is a one-way operation. Once you eject, you can’t go back!

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.

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.

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. ""

Instructions on installing yarn and differences between yarn and using npm

Yarn

Yarn is a package manager for your code. It allows you to use and share (e.g. JavaScript) code with other developers from around the world. Yarn does this quickly, securely, and reliably so you don’t ever have to worry. Yarn allows you to use other developers’ solutions to different problems, making it easier for you to develop your software. If you have problems, you can report issues or contribute back, and when the problem is fixed, you can use Yarn to keep it all up to date. Code is shared through something called a package (sometimes referred to as a module). A package contains all the code being shared as well as a package.json file which describes the package Both NPM and yarn are package Managers that help in Managing Project Dependencies

Npm

npm is the world's largest software registry. Open source developers from every continent use npm to share and borrow packages, and many organisations use npm to manage private development as well. npm consists of three distinct components:

  • the website
  • the Command Line Interface (CLI)
  • the registry Use the website to discover packages, set up profiles, and manage other aspects of your npm experience. For example, you can set up organisations to manage access to public or private packages. The CLI runs from a terminal, and is how most developers interact with npm. The registry is a large public database of JavaScript software and the meta-information surrounding it.

Setting up prettier in vscode and auto format on save

Ways to Install Prettier as a VS Code Extension:

  1. In vscode, search up prettier in extensions and install
  2. To set up auto format on save, go to settings
  3. search format save and check it
  4. be sure to select prettier as your formatter

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

yarn build fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify