Giter Site home page Giter Site logo

jrmgx / trailodysseyopen Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 11.51 MB

Trail Odyssey is a website that allows you to plan hikes from A to Z. Including: creation of the path ; planning the hike ; preparing your bag ; live use during the hike ; and finally share with your friends.

Home Page: https://jerome.gangneux.net/2024/04/15/trail-odyssey/

License: Apache License 2.0

PHP 53.94% JavaScript 17.89% CSS 4.15% Twig 24.02%

trailodysseyopen's Introduction

Trail Odyssey

This introduction comes from my blog

What is Trail Odyssey?

It’s a website that allows you to plan hikes from A to Z.

And what do I mean by that:

  • The creation of the path itself, that is to say importing GPX or creating routes (even if needed by tracing point-to-point segments), managing your base maps.
  • Planning the hike, namely placing the stages, studying altitudes, looking for points of interest (water or viewpoint for example).
  • Preparing your bag, including weight management.
  • Export of the final GPX to import it into external apps if necessary.
  • Live use during the hike, with offline display of the current stage, GPS for position, elevation, progress in real time.
  • And finally share photos of the itinerary with a public version for your friends.

Technical choices

Trail Odyssey is developed for mobile first.

It is also a “web app” which includes these features in particular:

  • Offline map.
  • Installable on mobile.

More technical details in the form of keywords: PHP, Symfony, Javascript, Turbo, LeafletJS, BoostrapCSS, PWA, Mobile First.

Technical Concepts

Stage and Routing relation

-----------
| Stage A |
-----------
  !__ Routing AB __
                  !
            -----------
            | Stage B |
            -----------

Stage have two dates:

  • arriving at (the date and time where you plan to arrive at this destination)
  • leaving at (the date and time where you plan to leave from this destination)

Stage have 0, 1 or 2 routing(s):

  • routing in
  • routing out

Routing have two stages:

  • start stage
  • finish stage

So in this schema:

  • Stage A has one routing out: Routing AB
  • Routing AB has two stages; start stage: Stage A and finish stage: Stage B
  • Stage B has one routing in: Routing AB

Other concepts

Mappable is anything that can be shown on the map

TODO

  • Explain: the use of turbo frames templates
  • Explain: Load JS on DOMContentLoaded and re-used when Turbo frame is re-rendered via {{ stimulus_js_load_start('diaryController', first_load is defined and first_load) }}

Installation

Prerequisite

  • Adds 127.0.0.1 trailodyssey.test into your /etc/hosts file
  • Install castor

First time install

  • castor infra:build There nothing to build for now but still
  • castor infra:up
  • castor infra:install
  • castor dev:load-fixture For dev

Head up to https://trailodyssey.test and you should have a running instance!

Day to day commands

  • castor up to start the project
  • castor down to stop the project

See castor for other commands

Some screens

trail_odyssey_screen_public_2.png

Public: Display of photos with the position on the map, mobile first (but a desktop version exists)

trail_odyssey_screen_public_1.png

Public: Public sharing home page with mileage and bag summary

trail_odyssey_screen_plan.png

Planning: Display of the different stages, elevation differences, desired dates and times. Desktop version (available in mobile)

trail_odyssey_screen_path.png

Path: display of paths coming either from multiple GPXs, or from routes traced by hand or via the tool integrated into Trail Odyssey. Desktop version (available in mobile)

trail_odyssey_screen_live_1.png

Live: Display of the current stage with real-time GPS position, elevation and progress in percentage

trail_odyssey_screen_home.png

Main page with all hikes

trail_odyssey_screen_geras.png

Equipment page, with the list of equipment. From this page, you can add elements (with their weight) to find them in bag management later

trail_odyssey_screen_diary.png

"Diary" part which allows you to add geotagged photos and texts, for the public version

trail_odyssey_screen_bags.png

Bag management: Adding items, managing multiple bags, bags within bags and total weight. The checkboxes allow you to prepare your bag and not forget anything.

Resources

Licence

Code, and assets are under Apache License 2.0

Contributing

Trail Odyssey aims to be an Open Source, community-driven project. Join us by contributing code or documentation.

trailodysseyopen's People

Contributors

jrmgx avatar

Stargazers

Damien Alexandre avatar Loïck Piera avatar Jorick avatar Mathieu Santostefano avatar

Watchers

 avatar

trailodysseyopen's Issues

Offline does not really work

When saving the bookmarklet to iOS home screen and trying to load the page in plane mode, safari will ask to connect to internet.
It has worked before when the bookmarklet did not point to the trip but to the whole site

Rework z index ordering on map elements

Some important elements can be hidden by less important ones

  • the GPS position point (the blue dot) should always be on top of anything
  • the stage marker should be on top of the diary marker
  • the diary marker should be on top of the interest marker

When a tile returns an error show an error tile

Sometimes the request to get a tile can fail, either because of an error (401, 403, 50x) or because the zoom level is too much (404)

We should display a special tile like the "offline" one to show that error back (a tile for each code would be nice)

Move the compass info from button to GPS point

For now the compass info is shown on a button on the map, it would be better to have the info on the GPS point itself

It would be perfect if no action would be needed to have it started too (not sure if it is possible due to OS restriction)

Performance problem on loading tiles

When panning the map, zooming etc. at some point sooner than later, the tile would stop loading, the whole thing will be stuck for something like 10/20 seconds and then everything get back to normal.

On the server side there is no performance problem, nginx seems to be configured ok to handle many requests.

It almost looks like it is a browser issue. The problem seems to be worst on Firefox than Chrome.

Investigation is welcome

Allow to post diary from live screen even in offline

The goal would be to allow to post a diary entry from the live screen (it is already possible now) but even if in offline mode.

So it would need to save the data in a local database and when back online post the data to the server

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.