Git Product home page Git Product logo

f1's Introduction

F1 Calendar

Codebase that powers the fan run & built F1Calendar.com along with its various offshoots. Includes support for email reminders & now Web Push Notifications.

Made open-source by @ay8s with the support of @aajhiggs and @si.

Graciously hosted by Vercel.

All Contributors

Running Locally

Use .env.sample as a template to set your environment variables, the key ones are NEXT_PUBLIC_SITE_KEY and NEXT_PUBLIC_CURRENT_YEAR. Once set rename the file to .env.local.

Then run the following command to spin up a local server...

npm run dev

Localization

If there is a language you'd like to see F1 Calendar localized to but we haven't got around to it yet, and you have some spare time, head on over to our new localization project here.

Contributors โœจ

Thanks goes to these wonderful people who have also contributed. (emoji key):

Russell K
Russell K

๐Ÿ–‹
Olivier CARRON
Olivier CARRON

๐ŸŒ
Alen13ASC
Alen13ASC

๐ŸŒ
Eric Ly
Eric Ly

๐ŸŒ
Viktor
Viktor

๐ŸŒ
matguabec
matguabec

๐ŸŒ
Sergio Lopez M.
Sergio Lopez M.

๐ŸŒ
LsHallo
LsHallo

๐ŸŒ
schoenpat
schoenpat

๐ŸŒ
Adam Houลกลฅava
Adam Houลกลฅava

๐ŸŒ
Konstantin Krasavin
Konstantin Krasavin

๐ŸŒ
ffaamm
ffaamm

๐ŸŒ
stijndp
stijndp

๐ŸŒ
1yzz
1yzz

๐ŸŒ
Marko-HR
Marko-HR

๐ŸŒ
charley-egmose
charley-egmose

๐ŸŒ
Jeferson Luis Molinari
Jeferson Luis Molinari

๐ŸŒ
Toby M.
Toby M.

๐ŸŒ
Miko Kauhanen
Miko Kauhanen

๐ŸŒ
raider87
raider87

๐ŸŒ
Lumi Bytyรงi
Lumi Bytyรงi

๐ŸŒ
Asฤฑm BarฤฑลŸ ร‡iรงek
Asฤฑm BarฤฑลŸ ร‡iรงek

๐ŸŒ
petosorus
petosorus

๐ŸŒ
Yura Samsoniuk
Yura Samsoniuk

๐ŸŒ ๐Ÿ–‹
Emil Novak
Emil Novak

๐ŸŒ
gro-kmp
gro-kmp

๐ŸŒ
Bman425
Bman425

๐Ÿ–‹
Michael Nรธrskov
Michael Nรธrskov

๐Ÿ›
kareeka007
kareeka007

๐ŸŒ
DUYA112233
DUYA112233

๐ŸŒ
Remynator
Remynator

๐Ÿ–‹
lerhond
lerhond

๐Ÿ–‹
Sarah Nair
Sarah Nair

๐ŸŒ
Marcin Dawidowski
Marcin Dawidowski

๐ŸŒ
Maurice
Maurice

๐ŸŒ
David MARTIN
David MARTIN

๐Ÿ–‹
Adi
Adi

๐ŸŒ
Justin Naismith
Justin Naismith

๐Ÿ–‹
James Lakin
James Lakin

๐Ÿ’ป
jmcgreevy42
jmcgreevy42

๐Ÿ›
Pjara Yuzu
Pjara Yuzu

๐ŸŒ
Niklas
Niklas

๐Ÿ–‹
meshwork100
meshwork100

๐ŸŒ
irukan
irukan

๐ŸŒ
Alim ร–ncรผl
Alim ร–ncรผl

๐ŸŒ
Sergio
Sergio

๐ŸŒ
Vincent Uden
Vincent Uden

๐Ÿ–‹
mzso
mzso

๐ŸŒ
Nao
Nao

๐Ÿ–‹
Maxwell Gubler
Maxwell Gubler

๐Ÿ–‹ ๐Ÿ’ป ๐ŸŒ
Zandor Smith
Zandor Smith

๐ŸŒ
Prastyo
Prastyo

๐ŸŒ
Nikita Dubyk
Nikita Dubyk

๐ŸŒ
Knulon
Knulon

๐Ÿ›
Ferry Bloembergen
Ferry Bloembergen

๐Ÿ› ๐ŸŒ
Eduardo Cordeiro
Eduardo Cordeiro

๐ŸŒ
Giovanni Rodighiero
Giovanni Rodighiero

๐Ÿ’ป

This project follows the all-contributors specification. Contributions of any kind welcome!

f1's People

Contributors

adamhoustava avatar allcontributors[bot] avatar asimovitsch avatar ay8s avatar carronol avatar charley-egmose avatar chreddy avatar dependabot-preview[bot] avatar dependabot[bot] avatar dmartinjs avatar ffaamm avatar jefersonmolinari avatar jmcgreevy42 avatar justinnais avatar lerhond avatar lumbytyci avatar marko-hr avatar matguabec avatar maxgubler avatar meshwork100 avatar michalfisior avatar mkauha avatar pjarayuzu avatar russ-k avatar schoenpat avatar si avatar sigito avatar siroirukan avatar stijndp avatar tobymelin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

f1's Issues

License?

Hi, this app is open source but no license is provided. Would be keen to explore using this in another project if you could add a license?

Thanks!

Email digests

I know it's not exactly cutting edge tech but I still think emails are one of the most engaging mediums with people.

Could we setup a newsletter to send weekly reminders of upcoming races, maybe even attach an ICS file or link to download so we can track engagement?

I've used Mailchimp in the past but open to suggestions.

"Select language" text

Hello!

First, thanks for the website and the huge service.

Second, I'm noticing in four languages, the "Select language" text is kept as "Select language" in english. I have no problem with this, but the others languages translate it.

Is there a prefered behavior?

Cheers

Make Calendar changes more obvious

Right now if a user downloads the calendar and a race weekend schedule changes they are stuck with the old times. I'm thinking we could have a changelog or some way to subscribe to be alerted to race weekend changes.

Incorrect calendar times in local timezones

Right, finally found time to test the timezones and calendar times on my Mac using https://dev.f1calendar.com/.

Here are my results:

  • China - 2 hours too early (9am in cal, 11am on corp) on all but race
  • Canada - third practice, qualifier & race time 1hr late (12pm, 3pm & 3:10pm in cal, 11am, 2pm & 2:10pm on corp)
  • Austria - 1st is 2am in cal, 11am on corp
  • Great Britain - 1st, 2nd, 3rd and qual all 1hr early
  • Mexico - 1st & 2nd 1hr early (10am & 2pm in cal, 11am & 3pm on corp)
  • Brazil - race 1hr late (3:10pm in cal, 2:10pm on corp)

Double for time zone label

image
Thereโ€™s two โ€œforโ€ in the time zone label but Iโ€™m struggling to find it in the locale file to fix

ERR_INVALID_ARG_TYPE. The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView

node -v
v14.4.0

ready - started server on http://localhost:3000

Defining routes from exportPathMap
TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received null
    at Object.writeFileSync (fs.js:1380:5)
    at /home/hard/Develop/f1/utils/generate-calendars.js:192:8
    at Object.createEvents (/home/hard/Develop/f1/node_modules/ics/dist/index.js:159:10)
    at Object.<anonymous> (/home/hard/Develop/f1/utils/generate-calendars.js:186:7)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (internal/modules/cjs/helpers.js:73:18)
    at Object.webpack (/home/hard/Develop/f1/next.config.js:8:7)
    at Object.webpack (/home/hard/Develop/f1/node_modules/next-fonts/index.js:37:27)
    at Object.webpack (/home/hard/Develop/f1/node_modules/next-offline/index.js:108:25)
    at getBaseWebpackConfig (/home/hard/Develop/f1/node_modules/next/dist/build/webpack-config.js:115:330)
    at async Promise.all (index 1)
    at async HotReloader.start (/home/hard/Develop/f1/node_modules/next/dist/server/hot-reloader.js:15:1941)
    at async DevServer.prepare (/home/hard/Develop/f1/node_modules/next/dist/server/next-dev-server.js:10:2363)
    at async /home/hard/Develop/f1/node_modules/next/dist/cli/next-dev.js:21:359 {
  code: 'ERR_INVALID_ARG_TYPE'
}

Formula 2 & 3

It would be awesome to have this for Formula 2 and 3 too.

Setup analytics conversions

I want to understand what users are doing on the site as bounce rate seems high but I assume itโ€™s due to it being an SPA so will look to setup one or more of the following metrics in GA

  • Add these race times > Download
  • Pick sessions
  • Set a reminder + duration
  • Expand collapse races
  • Timezone change > drop down > apply
  • Translate options
  • Buy us a coffee
  • Vercel

Generate calendar link forgets language

Expected Behaviour

Given Iโ€™ve chosen a different language
When I click the Generate Calendar link
Then I should see the page translated in the select language.

Actual Behaviour

Given Iโ€™ve chosen a different language
When I click the Generate Calendar link
Then it falls back to EN default.

For start locally need some step on Ubuntu 16.04 maybe other Linux distro too

For start locally need some step on Ubuntu 16.04 maybe other Linux distro too
node -v
v14.4.0
npm run dev

> [email protected] dev /home/hard/Develop/f1
> next-translate && next dev

sh: next-translate: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] dev: `next-translate && next dev`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

ย hardย ๎‚ฐย ~ย ๎‚ฑย Developย ๎‚ฑย f1ย ๎‚ ย feature/i18n-take-2ย ๎‚ฐย npm install next --save

npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/next/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":"<8.10.0"} (current: {"node":"14.4.0","npm":"6.14.5"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/watchpack-chokidar2/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ [email protected]
added 2 packages from 2 contributors, updated 12 packages and audited 1246 packages in 34.761s

9 packages are looking for funding
  run `npm fund` for details

found 26 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

ย hardย ๎‚ฐย ~ย ๎‚ฑย Developย ๎‚ฑย f1ย ๎‚ ย feature/i18n-take-2ย โœšย 2ย ๎‚ฐย npm audit fix

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/watchpack-chokidar2/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/next/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

removed 1 package and updated 2 packages in 5.482s

38 packages are looking for funding
  run `npm fund` for details

fixed 26 of 26 vulnerabilities in 1246 scanned packages

hardย ๎‚ฐย ~ย ๎‚ฑย Developย ๎‚ฑย f1ย ๎‚ ย feature/i18n-take-2ย โœšย 2ย ๎‚ฐย npm run dev


> [email protected] dev /home/hard/Develop/f1
> next-translate && next dev

Building pages | from pages_ to pages
๐Ÿ”จ /download/[calendar] [ 'common', 'calendar' ]
๐Ÿ”จ /generate [ 'common', 'calendar', 'generate' ]
๐Ÿ”จ / [ 'common', 'calendar', 'index', 'calendar' ]
๐Ÿ”จ /timezone/[timezone] [ 'common', 'calendar' ]
๐Ÿ”จ /timezones [ 'common', 'calendar', 'timezones' ]
๐Ÿ”จ /year/[year] [ 'common', 'calendar' ]
๐Ÿ”จ /years [ 'common', 'calendar', 'years', 'calendar' ]
ready - started server on http://localhost:3000
Defining routes from exportPathMap
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
warn  - static/development/pages/_app.js is 2.33 MB, and won't be precached. Configure maximumFileSizeToCacheInBytes to change this limit.
info  - ready on http://localhost:3000
wait  - compiling...
warn  - GenerateSW has been called multiple times, perhaps due to running webpack in --watch mode. The precache manifest generated after the first call may be inaccurate! Please see https://github.com/GoogleChrome/workbox/issues/1790 for more information.

static/development/pages/_app.js is 2.33 MB, and won't be precached. Configure maximumFileSizeToCacheInBytes to change this limit.
info  - ready on http://localhost:3000
event - build page: /
wait  - compiling...
warn  - GenerateSW has been called multiple times, perhaps due to running webpack in --watch mode. The precache manifest generated after the first call may be inaccurate! Please see https://github.com/GoogleChrome/workbox/issues/1790 for more information.

static/development/pages/_app.js is 2.33 MB, and won't be precached. Configure maximumFileSizeToCacheInBytes to change this limit.

After all is ok

How data is updated?

Hello,

first, good job for the website and public repo.
Just have a quick question, how is the data updated? I see commits where you manually corrected some dates, but at first did you all put this manually?

Would it be painful to add winner of each race?
A automatic way would be awesome (pull data from official website maybe..?)

500

My F1 calendar has had a โš ๏ธ icon in macOS Calendar.app for a few days.

I tried to re-subscribe and got this error message:

CleanShot 2020-06-09 at 10 04 16@2x

I'm getting a 500 when I try to get the calendar manually:

$ http --follow https://f1calendar.com/download/f1-calendar_gp_virtual.ics\?t\=1591711527266
HTTP/1.1 500 Internal Server Error
CF-Cache-Status: MISS
CF-RAY: 5a0b68861d837e37-DTW
Connection: keep-alive
Content-Type: text/html; charset=utf-8
Date: Tue, 09 Jun 2020 14:05:35 GMT
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
Transfer-Encoding: chunked
Vary: Accept-Encoding
cache-control: public, max-age=43210, immutable
cf-request-id: 033affa7ce00007e376f1a7200000001
strict-transport-security: max-age=63072000
x-vercel-cache: MISS
x-vercel-id: cle1::sfo1::zxw44-1591711535100-a0451a18bb6b
x-vercel-trace: cle1

<!DOCTYPE html><html><head><meta name="viewport" content="width=device-width"/><meta charSet="utf-8"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><link rel="preload" href="/_next/static/css/2f69cc950e868b64e092.css" as="style"/><link rel="stylesheet" href="/_next/static/css/2f69cc950e868b64e092.css"/><link rel="preload" href="/_next/static/zl2W4Kv8OJv2FpxToLO9o/pages/_app.js" as="script"/><link rel="preload" href="/_next/static/runtime/webpack-668ce3959ccc7ae100c0.js" as="script"/><link rel="preload" href="/_next/static/chunks/framework.c6faae2799416a6da8e8.js" as="script"/><link rel="preload" href="/_next/static/chunks/2852872c.b86ed0019f8e57bf67ac.js" as="script"/><link rel="preload" href="/_next/static/chunks/ca8e77ac7b4ee31f634bb06c9820637d2e419d25.83a07aabcf552d85c19a.js" as="script"/><link rel="preload" href="/_next/static/chunks/cbf0ccee7276fe233724b4c43a6eaa5f18cdb7d8.57ed30c29db399360ae7.js" as="script"/><link rel="preload" href="/_next/static/runtime/main-e9d22712af843e9ce293.js" as="script"/></head><body><div id="__next"><div style="color:#000;background:#fff;font-family:-apple-system, BlinkMacSystemFont, Roboto, &quot;Segoe UI&quot;, &quot;Fira Sans&quot;, Avenir, &quot;Helvetica Neue&quot;, &quot;Lucida Grande&quot;, sans-serif;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body { margin: 0 }</style><h1 style="display:inline-block;border-right:1px solid rgba(0, 0, 0,.3);margin:0;margin-right:20px;padding:10px 23px 10px 0;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle"><h2 style="font-size:14px;font-weight:normal;line-height:inherit;margin:0;padding:0">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"zl2W4Kv8OJv2FpxToLO9o","runtimeConfig":{},"isFallback":false,"err":{"name":"Internal Server Error.","message":"500 - Internal Server Error.","statusCode":500},"gip":true}</script><script nomodule="" src="/_next/static/runtime/polyfills-f500672a22b5a3a6edae.js"></script><script async="" data-next-page="/_app" src="/_next/static/zl2W4Kv8OJv2FpxToLO9o/pages/_app.js"></script><script src="/_next/static/runtime/webpack-668ce3959ccc7ae100c0.js" async=""></script><script src="/_next/static/chunks/framework.c6faae2799416a6da8e8.js" async=""></script><script src="/_next/static/chunks/2852872c.b86ed0019f8e57bf67ac.js" async=""></script><script src="/_next/static/chunks/ca8e77ac7b4ee31f634bb06c9820637d2e419d25.83a07aabcf552d85c19a.js" async=""></script><script src="/_next/static/chunks/cbf0ccee7276fe233724b4c43a6eaa5f18cdb7d8.57ed30c29db399360ae7.js" async=""></script><script src="/_next/static/runtime/main-e9d22712af843e9ce293.js" async=""></script><script src="/_next/static/zl2W4Kv8OJv2FpxToLO9o/_buildManifest.js" async=""></script><script src="/_next/static/zl2W4Kv8OJv2FpxToLO9o/_ssgManifest.js" async=""></script></body></html>

Domain-agnostic calendar links

When testing on the dev.f1calendar.com sub-domain, it's referencing the production domain which makes it trickier to test calendar subscriptions and downloads (webcal, Google and download)

e.g.

webcalURL:`webcal://www.f1calendar.com/download/f1-calendar${form.p1 ? '_p1' : ''}${form.p2 ? '_p2' : ''}${form.p3 ? '_p3' : ''}${form.quali ? '_q' : ''}${form.race ? '_gp' : ''}${form.alarm ? '_alarm' : ''}${form.alarm ? '-'+form.mins : ''}.ics`,

Can we replace this with the environment sub-domain or even just make URLs relative?

Localize ICS Files

Using the locale files we can now generate localized ics files and generate each file at build time.

Setup monitor to check for time changes

Rather than manually checking, configure a monitor to track the official calendar for updates and changes so we can update the calendars as soon as possible.

(Question: Is this easier than automatically updating the content?)

PWA Push Notifications

All the ability for users to subscribe to Push Notifications which could be used to remind users of sessions as well as changes to the race calendar.

The former related to #338

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.