Code Monkey home page Code Monkey logo

terrastories / terrastories Goto Github PK

View Code? Open in Web Editor NEW
306.0 306.0 156.0 183.11 MB

Terrastories is a geostorytelling application for mapping, managing and sharing place-based stories.

Home Page: https://terrastories.app

License: MIT License

Shell 1.36% Ruby 44.86% JavaScript 12.55% HTML 32.76% Dockerfile 0.47% Gherkin 0.04% SCSS 7.95% Procfile 0.01%
community-project docker hacktoberfest indigenous-languages indigenous-peoples indigenous-territories mapbox-gl-js maplibre-gl-js mapping-tools non-profit open-source oral-histories react ruby-on-rails terrastories tileserver-gl

terrastories's Issues

[Map] Add style.json validation to tilebuilder

When generating mbtiles from shapefiles, any discrepancy between the shapefile names in tilebuilder/shapefiles and the source-layer attributes for the layers in style.json will cause a runtime error in the browser when attempting to render the map.

We can guard against this by validating each layer's source-layer while iterating through the shape files in tilebuilder/scripts/convert.sh. Since most styles will be generated by the online tool provided by MapBox, we're normally only concerned with stripping 6-character alphanumeric hash suffixes matching /-\w{6}/.

Convert view partials to use React components

To keep the UI simple, we want most user actions to occur directly on the map page. Searching, filtering, and creating stories and points should be accessible through a JSON API. We'll use React components to encapsulate the view and update them through the props changes as new data becomes available via AJAX.

As a prerequisite for any of this, we need get the React/Rails integration up and running.

[Server side] Guard against running bundler and rake tasks in local environment

This project is set up to use Docker to help reduce the burden of configuring a new local development environment for every new contributor. It works great when it works, but an obvious flaw is that any developer can still run the app in their local environment, which may introduce the very environment-specific discrepancies that Docker is supposed to ward off, such as bundler version warnings.

I'm sure a talented open-source community member can figure out a way to prevent running rails directly in a local environment, or at least warn the developer about it. Either way, we should provide clear messaging with links to our documentation about the correct way to run rails-y stuff in this project.

Toggle map orientation between "north" and "up"

The Matawai people typically orient their maps so that the highest point in a region is "up." This makes most conventional maps feel upside down for them, because the terrain elevation in Suriname goes from higher in the South to lower in the North.

Add a UI feature to toggle between the two orientations.

Bonus points for automatically switching based on locale.

[UI] Add coach marks for the first load of the map

When a user visits the map the first time, display coach marks with some information to help the user understand how to navigate terrastories.
intro coach marks

Bonus points for finding a descriptive icon instead of using "Scroll to Zoom" words.

Update the introduction text "What is a Terrastory?"

Use the following text:

Terrastories are audiovisual recordings of place-based storytelling. This offline-compatible application enables local communities to locate and map their own oral storytelling traditions about places of significant meaning or value to them.

Handle clicking on a point in the map

Allow a user to click a point displayed on the map and load any stories associated with that point. This should include the point title, text description, and the video for the story (as proven out in #25

[Server-side] Improve the messaging while the server is restarting

Any time the rails and nginx server restarts, the application is unresponsive for up to a minute or so. During this time, there's a completely unhelpful generic 502 error from nginx. Let's improve that by adding a customized error page that looks more like the login page or something at least branded with the Terrastories logo.

Bonus points if we can also include client-side polling against an /is_it_up endpoint and automatically redirect to the app once the server is running.

Make the introduction disappear on scroll, keep the search bar & logo sticky

Update our CSS so that when the user scrolls in the card, the introduction disappears (but reappears when you scroll back up) and the search bar & logo are in a fixed position.

To achieve this you could make only the container under the logo scrollable, and set the position of the search/filter bar to be fixed.

list view

Internationalization and Localization

The native language of the people of Suriname is Matawai, which none of us speak. Well, Rudo does.

Add support for localization so that we can build the app in English and someone (Rudo) can translate phrases in our app to Matawai.

Add support for switching locales, probably with support for routes beginning with /en/ and /srm/ to distinguish between the two. (It seems "srm" is the official language code for Saramaccan, of which Matawai is a dialect, I guess.)

http://guides.rubyonrails.org/i18n.html

Add unit tests

We're test-less right now! Some unit tests would be nice.

Restrict the zoom-out level of the map

The main view has a javascript snippet to initialize the MapBox map instance. There should be a way to add max and min zoom levels in that config.

As I understand it higher numbers for zoom level mean the map is zoomed in closer and lower numbers mean it's zoomed out. We want to set a minimum zoom that just shows the edges of Suriname without really showing the rest of South America more than necessary. If we can figure out how to prevent panning away from Suriname, that would be great too, but it's probably a separate config option from zoom levels.

Also, our map data doesn't include any details beyond zoom level 13, so we want to prevent users from getting zoomed in any closer than that. Presumably, there's a maximum zoom config for that, as well.

Add a permission level field to Stories

Some stories can be viewed by any user, anonymous or not. Other stories can only be viewed if the user is logged in. Let's add a field to Stories that allows Editors to set the permission level (public or private).

Create pundit policy for editors

Add a policy in Pundit for Editors
Editors can be defined as a user who can see all stories, add new stories, and edit stories
Make sure to include the check for this policy when viewing, adding, and editing stories

Update the seed data

Let's update the seed data:
More data - speakers, points, stories
Connect them - which points have which stories
Incorporate videos into the stories
Incorporate photos with the speakers

Build Taggings model

Many to Many Relationship (Many Story has many Taggings)
We want Tags and Taggings to be proper models, which ActsAsTaggableOn seems to do well

Allow Stories to be filterable thru the UI

Let's use the model attributes as filters in the UI. Currently, in the Card component, we have a space for three drop downs which will act as our filters.
Changing the filter would change which points and stories are visible in the map and in the list.

Categories:
(1) Region
(2) Type of place
(3) Speaker

Ideally, these would be attributes on the Story model that allow them to be sorted by these categories.
Also, allow Editors to update these in the administrate dashboard.

Create Admin policy for Pundit that allows admin to sign up and delete users

We've installed Pundit as a gem in our Rails app but we need to add some policies.
Let's start with an admin user role that would allow them to add and delete regular users.
You can use Devise to handle the logging in & sign up interfaces. Include a policy check to make sure the user is an admin that can sign up new regular users.

Here are the docs for Pundit and Devise:
https://github.com/varvet/pundit/blob/master/README.md#policies
https://github.com/plataformatec/devise/wiki

Play back a video in the browser

This is a simple technical proof-of-concept that we can request a video as a static asset served from nginx under /media and have the browser load it for playback in a <video> tag. Simply hard-coding this in the placeholder "click on a point on the map" modal will suffice.

Speaker photo does not work

In the Speaker model, there's a field to select a photo from your system to add to the Speaker. However that photo doesn't show up anywhere, and there's a Rails error when you try to view a Speaker.

We should also make sure that the Speaker name and photo is displayed next to each story.

Build Point model

Name/Title
Story
Location
Region
Type of Place
Metadata
One to One Relationship with Story

Build Story model

Build Story model
Title
Description
Speaker
Video/Photo/Audio
Tags
One to One Relationship with Point

Show points on the map

Connecting the points from the backend to the frontend map, instead of using hardcoded data

Build Story model

Title
Description
Speaker
Video/Photo/Audio
Tags
One to One Relationship with Point

Database persistence in docker

Currently every time the mariadb docker container restarts, it starts completely blank. We need a strategy for persisting the database somewhere. This should be pretty straightforward using a docker volume: https://docs.docker.com/storage/

Keep in mind that backing up and swapping out data sets will be useful too, so keep that in mind while solving for basic persistence.

Try it on the real hardware!

We have the NUC up and running now with its default POSM software, but we also have ssh access to it. Let's prove that we can deploy the app to that environment.

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.