Skip to content

fubaritico/forecast-next-app

Repository files navigation

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/[lon].tsx. The page auto-updates as you edit the file.

API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

This project uses next/font to automatically optimize and load Inter, a custom Google Font.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

Contribution

Commits

Conventional commitlinting is applied with Commitizen and others tools in this project.
Used packages:

Commitlint

Read the documentation

Husky

# Install commitlint cli and conventional config
npm install --save-dev @commitlint/{config-conventional,cli}
# For Windows:
npm install --save-dev @commitlint/config-conventional @commitlint/cli

# Configure commitlint to use conventional config
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js

To lint commits before they are created you can use Husky's commit-msg hook:

# Install Husky v6
npm install husky --save-dev
# or
yarn add husky --dev

# Activate hooks
npx husky install
# or
yarn husky install

Add hook

npx husky add .husky/commit-msg  'npx --no -- commitlint --edit ${1}'

Git

for my commit editing, I chose nano.

git config --global core.editor nano

NOTE: All these installation process will probably be outdated based on the compatibility between packages

For all possible type, scope and subject, go to conventional commit

# type, subject
fix: My awesome commit

# Long description
Some long description (100 chars max)

# For change log (not mandatory)
BREAKING CHANGE: `extends` key in config file is now used for extending other config files

Reviewed-by: Some colleague
Refs: #123 (tickets)
Closes: #123 (tickets)

Releases

TODO

UX design

Styled Components

Fonts

Layout grid system

Storybook (v6)

Install Webpack 5 and plugins, edit your storybook config, typescript and other needs.
TODO: Storybook config exposes a Vite entry, replace webpack with Vite.

Miscellaneous Links - the main inspiration

The thing - color extraction

TESTING

Mocking fucking SVGs in jest

Due to jest rules in next/jest, all moduleNameMapperShit are not taken into account, so you have to do this work around:
vercel/next.js#35634 (comment)

React

Loading SVGs in Next and React 18

APIs

Google Maps API key: AIzaSyAq65YInKMUuOTLhrmCWz7ZoNhLmCfJxXY

Google Maps

In this project, the Google example approach has been chosen,
install npm i @googlemaps/react-wrapper
and see: https://developers.google.com/maps/documentation/javascript/react-map#react-wrapper

Other solution

install npm i @googlemaps/js-api-loader
and see: 3 gotchas of Google Maps API when used with Next.js and eslint

Links

WeatherBit

See documentation: Field Descriptions

Miscellaneous

TODO.md

Conventions to manage issues & enhancements to implement: on Github

CI/CD

Simple continuous integration with CircleCI: https://github.com/whoisryosuke/next-styled-storybook-starter

Code documentation

About

Work in progress for a forcast app with NextJS

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors