Windsurf statistics tracking
This project is a web interface to easily save windsurf session data. It was originally built to suit my own needs, but it should be usable for any windsurfer.
If you'd like to click through the app before installing, you can check the demo here
If you find a bug, please create an issue!
If you have a feature request, you should also make an issue.
I started this project because I used to save my windsurf session data in an excel file, but I figured it would be easier to use a web interface and visualize the statistics in a nice way. And so this project was born.
Table of contents
What it does
It currently stores the following values in a databse on a per user basis:
- Date of the session
- Spot you sailed on
- Highest windspeed
- Highest gust
- Wind direction
- Sail size
- Rating of the session
- A (small) note
Using the spot name, it also scrapes the windspeed, gust and wind direction from winfinder (only works if input is on same day as the windsurf session).
All the things you need to run this app.
- node.js & npm
- MySql server
- Sass (if you want to customize the css)
Download or clone this repository using:
git clone https://github.com/jeroentvb/windsurf-stats.git
cd windsurf-stats into the folder.
Install the required node.js packages using
.env file and add the following:
DB_HOST= DB_USER= DB_PASSWORD= DB_NAME=windsurfStatistics SESSION_SECRET=
Fill in the blanks after the = with your database host and credentials. Also fill in the SESSION_SECRET, this can be anything you like.
To set up the database and its tables use
npm run setupdb
Run the application using
Everything is now set up succesfully and ready for use!
The only thing left to do is go out and shred!
The app has a few configurable options located in app-config.json.
The port that the server will listen on.
The amount of saltrounds you want to add to the pasword hashes.
The language you want the application to use for the front-end. For more information see localization.
The time a user should stay logged in. Set to a month by default.
When enabled, anyone can create an account. If you don't want this set this value to
Allow users to change their e-mail adress associated with their account. This is disabled by default due to security concerns because there's no additional information required to change the e-mail adress. One only needs to be logged in.
Enable or disable the API feature. Default is
false, because there is no rate limit yet. Use with caution.
I've set up the application to use text from a localized (json) file so you can use the application in your own language. To use another language other than english or dutch you need to create a copy of the
en.json file in the localization folder and rename it with your own language characters, for example
de (for germany).
Now you can replace the text with your own language. After you've done that you need to alter this line, so it uses the letters you gave your json file. It should like something like the following:
const lang = options.language('de')
Make sure your file has all the object keys that the english file has, otherwise the application will crash when it can't find a translation.
If you create a translation, I would highly appreciate it if you made a pull request with your additions.
Currently included languages
Create an API key in your account settings. Copy the key and navigate to