-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Welcome to the treemap wiki!
Table of Contents:
This is an API-first application, with backend written in Rust, and frontend written in TypeScript (Vue). For database, we use SQLite, for processing requests we use Amazon SQS (maybe a local queue implementation, also based on SQLite?).
Currently the only supported database is SQLite. It was chosen as the default option because it is serverless, can handle enormous numbers of simple queries, and quite a few updates. This usage profile fits the application needs perfectly. SQLite also requires almost zero hosting costs.
DynamoDB is another possible options, because it is serverless and requires no infrastructure set up, has pay per request billing, a significant free tier (25GB and 200M requests per month). It is tricky to run geospatial queries in DynamoDB efficiently, but one solution is to assign trees to blocks 1x1 km and query the data by those blocks.
Other serverless databases include MongoDB Atlas, App Engine, maybe something else.
User experience:
- The app is mobile-first. The intended use is to add new trees to the map as they are found, which naturally happens on the go, so the main audience is people with phones.
- The UI follows the minimalist approach.
- The UI focuses around a map, with occasional dialogs displaying over it.
- The map UI follows the patterns established by the most common map providers: Google, Yandex, Apple.
- Users can add one tree at a time, by entering species and a comment. When a tree record is created, more comments and photos can be added.
- Each tree has a dedicated page, where comments and photos can be found. That page has the "Share" button.
- Users can follow (star) trees to subscribe to any updates made to them: new comments, photos, etc.
- There is a page with recent changes to all followed trees.
Database:
- Store individual trees with the following attributes: id, lat, lon, genus, year_planted, height. See the schema file for details.
- Store multiple photos for each tree. Each photo has a full resolution URL and a thumbnail URL.
Backend:
- The application is distributed as a Docker container ready to run on any system.
- No compilation is needed, and no additional components need to be installed, other than the Docker infrastructure (or Podman).
Frontend:
- The frontend is compiled into static JavaScript files, requires no server side rendering.
- The distributed Docker container image contains the frontend files, configured to access the API as if it was running on the same host.