Skip to content

Latest commit

 

History

History
142 lines (91 loc) · 3.31 KB

CONTRIBUTING.md

File metadata and controls

142 lines (91 loc) · 3.31 KB

Contributing

Here are the ways to get involved with this project:


Issues & Discussions

Before submitting your issue, make sure it has not been mentioned earlier. You can search through the existing issues or active discussions.


Contributing Code

Found a bug you can fix? Fantastic! Patches are always welcome. Here are the steps to get up and running:

Install Locally

Clone the repo:

git clone [email protected]:gregrickaby/local-weather.git local-weather

Install the dependencies:

cd local-weather && npm i

Generate API Keys

OpenWeatherMap API

First, you'll need an OpenWeatherMap API Key. If you don't have an account, you can create one for free.

Google Maps API

Next, you'll need to generate a Google Maps API Key.

After you've generated a key, visit the Credentials page and follow the instructions below:

  1. Set application restrictions to "None"
  2. Select "Restrict key"
  3. Choose "Geocoding" and "Places" from the dropdown
  4. Save

screenshot of google api settings

ENV Variables

Now add the API keys to .env.

Copy .env.example to .env in the root of the project:

cp .env.example .env

Open .env and add your API keys to .env

// .env
GOOGLE_MAPS_API_KEY="YOUR-KEY-HERE"
OPENWEATHER_API_KEY="YOUR-KEY-HERE"

Git Workflow

  1. Fork the repo and create a feature/patch branch off main
  2. Work locally adhering to coding standards
  3. Run npm run lint
  4. Make sure the app builds locally with npm run build && npm run start
  5. Push your code, open a PR, and fill out the PR template
  6. After peer review, the PR will be merged back into main
  7. Repeat ♻️

Your PR must pass automated assertions, deploy to Vercel successfully, and pass a peer review before it can be merged.


NPM Scripts

Start local dev server:

npm run dev

Lint code:

npm run lint

Test a build prior to deployment:

npm run build && npm start

Vercel CLI

I've found that running vercel locally is a great way to verify Edge Functions and Middleware are working as expected.

To install the Vercel CLI, run:

npm i -g vercel

Start a Vercel development server locally:

vercel dev

Legal Stuff

This repo is maintained by Greg Rickaby. By contributing code you grant its use under the MIT.