GithubHelp home page GithubHelp logo

jmerilainen / primo Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 3.22 MB

๐ŸŒค A simple weather & time app

Home Page: https://getprimo.now.sh

JavaScript 12.06% HTML 0.81% CSS 2.28% TypeScript 83.24% Dockerfile 1.44% Shell 0.17%
react tailwindcss typescript webpack cicd

primo's Introduction


Primo ๐ŸŒค

The start


Primo is a one-view starting page for the browsers. It shows the weather for the next 12 hours. With a few themes available you can match the colors by your preferences.

Primo is heavily inspired by an actual Chrome extension that I used many years ago. Unfortunately, I can't remember the exact name nor find it from Chrome Store to give full credits.



Example view of the app



About

This is an example React project built from scratch including a robust development enviroment and with minimal production dependencies.

Usage

Primo uses the browser's geolocation to get your current position to fetch weather forecasts for the location. If you don't allow location Primo will only show the current time.

From the top right, you can switch themes. Selection will be saved to local storage.

Quickstart with Docker

To get project running locally with Docker, run

yarn docker:serve

# alias for "docker-compose -f docker-compose.local.yml up"

Open http://localhost:5000

Requirements

  • node.js 14.x
  • yarn

Development

  1. Install dependecies

    yarn install
  2. Start development server with watch mode

    yarn dev
  3. Start coding

Testing

Unit

For unit tests the project uses Jest. Tests are in src directory among other source files prefixed with *.test.(ts|tsx).

To run unit tests run command

yarn test

E2E

Project uses the Cypress for End-to-End (E2E) tests. Tests are in cypress/integartion directory.

To run e2e tests, run command

yarn test:e2e

Type checks

Project uses TypeScript.

To run type checking across the whole project, run command

yarn typecheck

Linting

Project uses ESLint for linting TypeScript. That is configured in .eslintrc.js.

To run linting, run command

yarn lint:js

For the styles, Stylelint is in use. That is configured in .stylelintrc.json.

To run linting, run command

yarn lint:css

Altough it is recommended to use Tailwind CSS for styling there might be a cases when custom css is required to write. Prettier will handle Tailwind's class sorting.

To run both linting with auto fix, run

yarn lint

Formatting

Prettier is used for auto-formatting. It's recommended to install an editor plugin (like the VSCode Prettier plugin) to get auto-formatting on save.

To run formating, run command

yarn format

Accessibility (a11y)

ESlint is used for identifying accessibility issues in JSX.

Axe is used for React application accessibility testing. Results will show in the DevTools console (works best in Chrome, limited in Safari and Firefox). E2E tests will also run Axe tests automatically and will error on violations.

Rest of the accessibility testing is done manually. The WCAG 2.0 Level AA should be achieved.

Deployment

Project is hosted in Vercel.

The main branch will be automatically deployed to production.

primo's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar jmerilainen avatar

Stargazers

 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.