npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

geo-tales-mobile

v0.0.13

Published

The Geo Tales mobile app

Downloads

8

Readme

Geo Tales mobile website

Current status: Beta

Building stories

The mobile web app is available at https://geo-tales.github.io/mobile-app/. To create a story, create a JSON file with the format described below. You can publish the file as a public or a secret at https://gist.github.com. To play the story, open the mobile web app with the JSON files "raw" URL like this:

https://geo-tales.github.io/mobile-app/?story={gist-json-file-raw-url}

Story file format

Check out the tour.json file for an example.

Stories are described in JSON files. An example can be found in public/all-screens.json. Each JSON file must contain exactly one JSON object with these properties:

  • locations: An object defining locations where the key is the identifyer of the location and the value is an object defining the location:
    • type: A string defining the location type. Can be circle or polygon. The other valid fields of the object depend on the type.
  • screens: An object defining screens where the key is the identifyer of the screen and the value is an object defining the screen:
    • type: A string defining the screen type. Can be text, choices, navigate and finish. The other valid fields of the object depend on the type.
  • demo: Optional flag to enable "demo" mode. Defaults to false.

Locations

There must be one location with the ID "start". This marks the place where the player has to be in order to start the story.

type: "circle"

  • center: The center of a circle consisting of:
    • latitude: Number
    • longitude: Number
  • radius: Number defining the radius of the circle in meters.

type: "polygon"

  • coords: An array of coordinates describing the polygon, each consisting of:
    • latitude: Number
    • longitude: Number

Screens

There must be one screen with the ID "start". This marks the screen that starts the story.

type: "text"

Displays rich text telling a part of the story with a button to proceed to the next screen.

  • text: Markdown to show as the text. Use ## for headings.
  • next: The ID of the next screen to show.

type: "input"

Displays rich text and an input box. The player has to provide the correct answer to be allowed to proceed to the next screen.

  • text: Markdown to show as the text. Use ## for headings.
  • answer: The correct answer.
  • next: The ID of the next screen to show.

type: "choices"

Displays rich text and a list of choices. Depending on the choice the player may receive points can continue to another screen. The "next" button is only shown if an option has been selected.

  • text: Markdown to show as the text. Use ## for headings.
  • choices: An array of choice definitions consisting of:
    • text: Markdown to show as the option text.
    • points: Optional points that are added to the users credit when this option is selected.
    • next: Optional screen ID to show when this option is selected.
  • next: The ID of the next screen to show in case no screen was defined in the selected choice.

type: "navigate"

Directs the player to another location. By default, this screen shows an arrow pointing in the direction of the location and the distance in meters. It can optionally change the background color with warmer colors indicating being closer to the location. The compass arrow and the distance can be hidden to only show the background color.

  • location: The ID of the location to navigate to.
  • options: Optional object with these optional properties:
    • compass: Whether to show the compass. Defaults to true.
    • distance: Whether to show the distance. Defaults to true.
    • colorSteps: When specified, the background color will show warmer colors the closer the device gets to the target location. Specifies the distance in meters that the device has to be moved in order to cause the color to change.
  • next: The ID of the next screen to show once the location has been reached.

type: "finish"

Each story must have at least one "finish" screen. Displays rich text, the time the player needed to finish the story and the points, if any where collected.

  • text: Optional markdown to show as the text. Defaults to "Congratulations! You have reached to end of the story.".

Building the mobile application

You don't need to build the app yourself. You can use the latest version on the geo-tales website. If you want to help on improving the web application, keep reading.

If you don't have it, install node.js.

Install the required dependencies:

$ npm install

Building the website:

$ npm run build

Running the website locally:

$ npm start

Then open http://localhost:8080 in your browser.

To load a story locally, put a my-story.json file in the public directory and open http://localhost:8080?story=my-story.json