Tool to create forecast html to print to PDF and share.
- A number of US avalanche forecasting services use the same website https://snowboundsolutions.com/project/shared-avalanche-forecasting-platform/:
- Interesting project to do machine learning avalanche forecasting https://openavalancheproject.org/
Goals:
- Simple and fast to create
- Reliable
- Cheap to deploy
- Easy to maintain
- Decent read performance
Forecasts are represented using hand edited data files and markdown.
Advantages:
- Extremely quick to create entire website.
- Can take advantage of CDN for excellent performance.
- Lots of nice built-in functionality in Zola and I'm already familiar with it.
- Auth model is simple (a non-issue).
Disadvantages:
- Editing data files is not exactly user friendly for most people, nor is interacting with git.
An offline editor could be easily created which may alleviate some of these concerns, however is that much more work than just creating the app using SSR in the first place I wonder? Alternatively https://tina.io/ could also perhaps be deployed.
UI:
- HTML Generation
- https://github.com/Keats/validator
- No JS
- JS
- https://github.com/tailwindlabs/tailwindcss
Backend:
Database: SQLite using one of:
- https://docs.rs/rusqlite/latest/rusqlite
- https://prisma.brendonovich.dev/
- https://github.com/rbatis/rbatis
- https://github.com/diesel-rs/diesel
- https://github.com/launchbadge/sqlx
- https://github.com/kurtbuilds/ormlite
- https://github.com/SeaQL/sea-orm
- https://git.flying-kestrel.ca/kestrel/microrm
- https://github.com/Electron100/butane
Localization
- https://github.com/kellpossible/cargo-i18n with Fluent to do a really good job.
Database Replication:
- https://github.com/superfly/litefs
- https://github.com/rqlite/rqlite
- https://github.com/canonical/dqlite
- https://github.com/chiselstrike/chiselstore
Database Backups:
GIS Sqlite
- https://sqlite.org/rtree.html
- https://www.geopackage.org/
- http://www.gaia-gis.it/gaia-sins/rasterlite-docs/rasterlite-man.pdf
- http://www.gaia-gis.it/gaia-sins/
- https://github.com/georust/geozero
Markdown:
pulldown-cmark
orcomrak
- https://lib.rs/crates/ammonia if required
Advantages:
- Maximum flexibility. Good if we want to support user observation submissions in the future.
- Easy to build editor with validation.
- Self contained, does not rely on any external infrastructure for hosting, deployment or editing.
- Allows the use of Fluent for localization which gives us much more control.
Disadvantages:
- Perhaps more complicated to deploy and maintain.
- More complicated for someone else to pick up and work with in the future.
Advantages:
- Integrated tech stack, with a standard project structure.
- Explore what developing with Phoenix is actually like.
- A reputation for being extremely reliable.
- Live view offers the possibility for live updates of things like: editing the report with formatting feedback, observations, comments.
Disadvantages:
- I don't know Elixir or Phoenix.
- It's less popular than Rust overall, and tools for doing things like GIS are more limited.
- More complicated deployment, requires Erlang.
- Elixir is a dynamically typed language, I don't like it for that reason alone. Could write some code using Gleam, but then we're in the mixed language domain.
All things considered, I think the option 2 will be better in the long run, it might be more work in the short term but it is more flexible, and it leads to a very nicely self contained solution that may be used by other avalanche forecasting organisations in the future (perhaps in Kamchatka, Nepal, Pakistan, India, China, etc). I will build it to be generic from the get-go, because making something just for Georgia seems like a bit of a waste when the need is much wider. This won't be the last time someone wants to set up an avalanche forecasting area. Of course this does risk increasing the scope of the project, but it's not my first project and I think it's totally manageable.
Start with a way to generate PDF reports. I don't care how. The reports need to look decent, but not perfect. Should be looking nice on the phone or laptop. PDFs are posted to the facebook group manually.
Website to view the reports, and download PDFs. Interactive forecast area map.
User can submit observations, these are available to be viewed on the map. We can use a Captcha and a basic avalanche question prompt to allow anyone to submit.