-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Oliver Thomas edited this page Jan 3, 2024
·
2 revisions
Welcome to the landscapes wiki!
The app mostly follows the standard directory structure for all Rails apps. Here's an overview of the most important parts:
-
Gemfile
- specifies the app's backend Ruby dependencies -
package.json
- specifies the app's frontend Javascript dependencies -
/app/assets
- some of the stylesheets live in here, some live elsewhere (I want to fix this) -
/app/models
,/app/views
,/app/controllers
- most of the backend functionality of the app is here (Rails is an MVC framework) -
/app/jobs
- contains background jobs that run on the server-side, for things like creating or extracting zip files etc. -
/app/javascript
- most of the frontend functionality lives here -
controllers
- Stimulus controllers live here -
interactions
,sources
- these are OpenLayers-related -
modelling
- the flowchart-based model editor lives here -
projects
- the new map view that I'm currently working on lives here; long-term we want to merge the model editor into this -
stylesheets
- this is where the other half of the stylesheets live 😅 -
packs
- this contains the Webpack entry points for the app - the main one is application.js; modelling_worker.js is a web worker that allows the model editor to be multithreaded -
/test
- the backend (Rails) test suite lives here. https://guides.rubyonrails.org/testing.html
We don't currently have a test suite for the frontend...
-
OpenLayers:
- This workshop looks quite promising - I might give it a go myself
- API documentation
- Examples
- Vector layer example
- XYZ layer example (we use XYZ tiles for aerial/satellite photography)
- Rete.js: This one is a bit difficult to get started with, maybe check out the examples on their website?
- React: I think the tutorial on the new Beta docs site is a good place to start because it uses the newer functional style components
- D3: You probably have more experience with this than me! The only unusual plugin I'm using is d3-sankey, which you might want to check out if you haven't used it before
- Typescript: This is probably better learned through experience (and I'm still new to it myself), but they do have a handbook on their website
- Stimulus: This is a small js framework used to add little sprinkles of extra functionality in the admin tools
- Turbolinks: You don't need to know how it works, but it's good to be aware of what it is and how it affects DOM events
- Spatial reference systems (SRS/CRS) - the web app natively uses EPSG:3857, but a lot of the data we're provided with by third parties is in EPSG:27700 (British National Grid projection)
- https://geojson.org is the format we use for of our polygonal and point-cloud data
- Explanation of zoom levels in XYZ grids
- The OpenStreetMap wiki has a lot of useful information in it
- Rails getting started guide
- Rails - ActiveJob: This is used for background jobs on the server-side; things like creating or extracting zip files mainly
- Rails - ActiveStorage: Used to handle file uploads