Giter Club home page Giter Club logo

openhospitalitynetwork / sleepy.bike Goto Github PK

View Code? Open in Web Editor NEW
20.0 3.0 4.0 29.55 MB

Decentralised platform for a community of bicycle touring travellers and those who want to host them. The members own their data and will be able to connect with other similar communities in the greater hospitality exchange network.

Home Page: https://sleepy.bike/

License: MIT License

HTML 1.12% TypeScript 93.63% SCSS 3.03% CSS 1.85% JavaScript 0.37%
decentralized hospex hospitality-exchange solid-protocol slow-travelers

sleepy.bike's Introduction

Sleepy.bike

a decentralized hospitality exchange community for slow travellers

We're developing based on wireframes and design (WIP - do you want to help? Join our bi-weekly OpenHospitalityNetwork calls and tell us)

Developer quick start

This is a single page application written in React.

You need Node v16. You can use nvm to switch to that particular version. You also need yarn.

  1. Clone this repository on your computer

    git clone https://github.com/OpenHospitalityNetwork/sleepy.bike.git
  2. Go to the project directory

    cd sleepy.bike
  3. Install dependencies

    yarn
  4. Run the app

    yarn start

You can also configure the app with environment variables, e.g.:

REACT_APP_COMMUNITY="https://community.example/community#us" REACT_APP_COMMUNITY_CONTAINER="community-example" yarn start`

Testing

We use Cypress to test the application.

To start the tests, run yarn cy:dev, wait a bit, and Cypress will open. Select "E2E tests" from the options, then pick your preferred browser (Electron and Chromium work, Firefox fails), and select a test suite to run.

sleepy.bike's People

Contributors

mariha avatar mrkvon avatar petr-hajek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sleepy.bike's Issues

Map: Cannot open user profiles in new tab: Need to re-login, and then sent back to start page. | Multiple tabs do not work?

When I browse the map, click a marker, and then middle-click on the username to open it in a new tab, I am requested to log in again (and after logging in I get again to the starting page of sleepy.bike, not the user profile).

Sometimes actually it directly loads the profile, but in most cases I just see the login page on the new tab.

And after logging in there and reloading the map page, I have to re-login there.

Seems that multiple tabs with the same login do not work, and all other tabs get logged out as soon as I login in another tab? (It is the same browser with the same cookie context for all those tabs.)

Current website does not represent the project well enough

sleepy.bike website lacks information about for who it is built, why and how.

Here we gather resources to facilitate discussion about the content and design we want to present on the main page. It is a Work In Progress, feel free to add and edit what is below.


The page should present some basic information about the community it is serving and the project in general.

There are two dimentions/perspectives: users and contributors that create two intertwined communities we want to serve. We need to keep them both in mind and try to find good balance between them.

The page should answer questions:

  • what?
  • why? What motivates people to participate in hospitality exchange? Why we started this project?
  • how? How a user interacts with the platform? How this project solves the issues other hospex communities have faced?
  • for who? Who are members of a community at large and contributors community

Have a logo and speak our values.

  • logo

What are our values?
Trust built on transparency, Openness (open finances, open source, open governance (democratic, well described and followed), open collaboration of volunteers, open communication with members (user-centric))

Do we want to have a tag line (aka short description)? What would it be?

How much of a background story of the project to present?
Do we want to write about Solid or keep it as a technical / internal architecture choice?


Some of the user researchish information that we have, to get some insights into the bicycle touring community preferences:
What do we know about bicycle touring community, based on the survey and our own experiances

Add mastodon handler to the frontpage/footer.

Add a link to mastodon profile to the frontpage. It should have rel="me" attribute so that our account can be trusted as being owned by sleepy.bike in our mastodon profile metadata (it will show as verified).

<a rel="me" href="https://floss.social/@sleepybike">mastodon</a>

The link can be a text or maybe mastodon logo (next to GH and OC logos?).

UI sometimes doesn't update after editing data

Sometimes, while sending messages, updating profile, or adding a hosting offer, the app doesn't display the new data, but stays stuck with the older version. I have to refresh the app to update them.

It probably has something to do with cache invalidation in @tanstack/react-query, or in solid servers.

It can help to install @tanstack/react-query-devtools and study carefully what's going on.

Improve structure of Join page

This is a follow-up of #49 suggested by @mariha

So I just checked the https://sleepy-bike-git-join-info-ohn.vercel.app/ (which btw is great that we can preview PR changes like this ๐Ÿ’š), and I may have a few more suggestions, but I think it's already great value in it how it is right now and the suggestions can go separately (if ever). Up to you.

I am not sure if there are 2 or 3 options possible:

  1. you own your identity - your own domain points to some provided Pod where you store your data
  2. you own your identity and data - you host your own Solid Pod under your own domain name
  3. (?) you own your data but not identity

The last tab: I want more control I'll change like this (if I understand everything correctly)

(I use text styling to emphasise the modifications)

If you own a domain name, you can have your WebID on your domain pointing to a provided Solid Pod. This gives you more control over your Solid identity.

Choose option "Use my existing WebID to access my Pod" with one of these providers:
...

To complete the process, you must prove that the WebID on your domain belongs to you. Afterwards, the WebID must point to your Profile Document. (This may need more explanation.)


Or use your server space and domain to host your own Solid Pod. This will give you full control over your data. However, it's more complicated to set up, and requires maintenance. We recommend Community Solid Server.

Read more about running your own Solid server.

This way the options are presented in order of increasing control (and complexity).

With this approach, also the main options could be reordered to:

  • Choose for me! / Use the default provider
  • Show me some providers!
  • I want more control

I'd also probably prefer the options to be presented vertically (as in small screen) than horizontally. Also, the text in bold makes a sort of an overview / structure, although I'm not sure about keeping both things [what it takes and the implications] in bold or maybe one emphasised and the other in bold...

In general though, it's already very cool (and informative ;)) as it is right now.

Originally posted by @mariha in #49 (comment)

Roadmap for sleepy.bike

This list is an ongoing Work In Progress, by intention.

Roadmap for sleepy.bike

  • Grow and maintain production community at https://sleepy.bike

    • maintain server infrastructure (app(s), sleepy bike community pod, index for geosearch, email notifications service, ...)
    • maintain social media site(s)
    • spread the information about the community
  • #70
    to make search of accommodations scalable

  • #71
    Email notifications service will receive notifications about new items in members' inbox, and send email when appropriate

  • #104
    That's a long way to go...

  • Internationalization (i18n) - translate the website and make it available in multiple languages
    People should be able to use the website in different languages, and also provide their information in multiple languages

  • Extract library for querying data, and make it more efficient
    so other people can use it

  • Make the community independent of a single list of members (https://community.sleepy.bike)
    To remove the single point of failure and control, which central list of members is

  • Build app for community management
    A less-than-minimal version already exists, but it's buggy and many functionalities are missing

  • Support ESS (Enterprise Solid Server) and Trinpod and other Solid pods

    • support ACP access control? (Access Control Policies is alternative way of access control to ACL (Access Control List) that is used by ESS)
  • Make option to have invite-only community
    Some communities want to grow more slowly and be more exclusive

  • Make it easy to deploy the app for different communities

    • customization of looks and functionality
    • good documentation
  • ...


  • Long term: make other community apps that members can use
    • The goals of these apps are:

      • meaningful connections
      • reality
      • sustainability
    • Some ideas include:

      • collaboration
      • founding intentional communities
      • unschooling
      • sharing spaces and resources
      • ....

Fix design, UI & UX of the app

Let's track possible improvements here:

  • #101
  • show feedback messages (toast) #105
  • better messages experience
  • #106 (only zoom)
  • #107
    • put titles to form inputs
    • add form validation
    • disallow posting location [0,0]
    • safety: encourage people not to select their exact localization
  • improve initial loading and profile setup
  • make bundle smaller - for faster load (e.g. fix lodash importing, split bundle, ...)
  • feature: enable markdown for messages, profile description, etc.
  • support emojis (low priority)
  • make clear "email verified" message when person follows email verification link OpenHospitalityNetwork/simple-email-notifications@ce8d013
  • add initial walk through the app

Improve error messages

I wanted to give the application a try, but I got stuck connecting:

image

Looking at the console, it seems to be related with a CORS issue. I am using an account in solidcommunity.net.

sleepy-bike puts some sensitive information in publicly available solid pod card (images, interests, maybe "about me").

I have set up a sleepy.bike account for me.

After doing so, I found publicly accessible:

  • List of my interests,
  • uploaded profile picture.

Also the "about me" was put into my profile card.

I still can delete the profile picture and the about me from the profile card, and they are still in the hospex/sleepy-bike card. But the interests seem not to be stored in the sleepy-bike card.

To have everything contained within sleepy-bike card and to not accidentally publish information that should be accessible only for sleepy-bike users and to maintain individual manageability of cards, sleepy-bike should only write into it's own card and not change other cards in the Solid pod.

Also, sleepy.bike does not work anymore if I disable public access to my public solid pod card, which I did because sleepy.bike stores sensible information there.

Please fix that.

Also, after changing the descriptive text in the public card, on sleepy.bike there is still my old text (as it should be), but when I click on "edit profile", it shows the new text from the public card, not from the hospex/sleepy-bike card. Something is bogous here, too.

Regards!

Create-react-app isn't maintained anymore

This project has been started with create-react-app. However, it looks like create-react-app isn't maintained anymore, and isn't even shown among recommended ways to start a React project anymore.

For this reason, we may want to migrate to e.g. Vite + React. It isn't mentioned in the React documentation either, but i've seen it recommended multiple times as the alternative to build Single-Page Applications (SPAs). The migration could be relatively straightforward.

Let's do this after React 19 is released (hopefully later this year), in case there are some breaking changes.

Can't join two communities with one Solid account

Actual behaviour

When i've joined https://sleepy.bike and then i try to join https://dev.sleepy.bike, the joining screen gets stuck on setup hospex document and storage.

Expected behaviour

When person joins multiple communities, the app should recognize that they are already a member of the current community. Additionally, the app should use the data relevant for that particular community; not mix them together.

Cause

We currently don't properly filter the data for the particular community. During querying we put all the discovered hospitality exchange documents together, and we use only the first community we encounter (so we don't recognize that the document for the second community is already set up)
During querying, we should be able to fiter only the hospitality exchange documents relevant for us: Those documents that contain triple <webId> sioc:memberOf <relevantCommunityUri>.

Solid server at solidweb.me may need support to keep operating

The server solidweb.me is deprecated. It's an issue for sleepy.bike, because we have around 50 of the first ~100 members registered there.

This situation also clearly highlights weak spot of Solid, which is dependency of identities and relationships on domain names.

Possible next steps:

  • remove solidweb.me from recommended options for sign-up #93
  • offer @ewingson help with maintenance of solidweb.me or other form of support, or offer taking ownership of solidweb.me (as some dedicated team) with goal of keeping solidweb.me up in the longer-term future. (preferred)
  • warn members who registered with solidweb.me that their account will disappear, and help them migrate somewhere else (fallback)
  • ...

Currently, the site says:

Welcome to the (deprecated) 6.1.0 version of the Community Solid Server.
This server is located in Strasbourg, France and is around since estimated September 2021.
Development has happened.
Because this site is implemented and maintained in a hobbyist and autodidactic manner it does not match up-to-date security standards.
It has become increasingly difficult to keep the production Debian 10 machine running Solid with an underlying Nginx in a way that is maintainable and manageable to be sufficient useful for the community.

But it is understandable for the author that we can't simply take the site offline.
Momentary daily 502 outages take place. We restart the machine manually whenever we get aware and consider using pm2 monitoring software.

The learning curve while deploying and running this system was and is invaluable.
The time for this machine is running down.
We encourage everyone to migrate sensible user data to a more secure provider. You might want to use tools of Jeff Zucker, Otto-AA or www.muze.nl for these processes.

If I may add a personal experience, since I was onboarded in 2018 by Mitzi, uncountable learning lessons were made.
The account data is triple backup'ed and weekly backups are still done.
Estimated year turn 2024/2025 we will take the site offline.

As of Sun 2024-03-17 we have 543 accounts. Thank you.

User stops being able to send requests after a period of inactivity

When signed in with CSS, I'm being signed out after a period of inactivity. The UI still looks normally (no error message), but I can't do any actions anymore. I have to refresh the app and sign in again to keep using it.

This has probably something to do with Solid refresh token. After a period of inactivity it likely gets expired and can't be used anymore.

Possible next steps

  • ask Solid developers
  • ask authors of @inrupt/solid-client-authn-browser library
  • send regular requests in the background in order to keep the refresh token up to date.
  • at least make it clear that person is signed out in UI.

Requests are slowing down UI

User interface (UI) is very slow when data are fetched and processed. For example, open the sleepy.bike, go to "travel", and try to move the map while the accommodations are loading. It's going to be very slow, almost unresponsive.

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.