Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support subdomain #35

Closed
9 tasks done
lucca65 opened this issue Jan 11, 2021 · 0 comments
Closed
9 tasks done

Support subdomain #35

lucca65 opened this issue Jan 11, 2021 · 0 comments
Assignees
Labels
backend Issue that require backend work enhancement New feature or request frontend Issue that require frontend work READY Ready to start working on

Comments

@lucca65
Copy link
Member

lucca65 commented Jan 11, 2021

Is your feature request related to a problem? Please describe.
Communities need a custom URL to share with their users. That Url needs to change how we handle joining a community, automatic community selection and Plausible (our insight tool)

General

Community admins will be able to configure a subdomain (following certain rules and limitations) so they have address such as my community.cambiatus.io or test.cambiatus.io. This can be used share the community with friends, auto invite user even without a direct invitation link and also help us get insights on how different communities use the app

Joining communities

Today, we have a few different routes to a user join the community:

  1. Via invitation link. Generated from the dashboard, it allows the generator of the link to receive a reward on successful sign ups. Mainly used for mouth to mouth invitations.
    a. If there is no user logged, it shows the registration form and automatically adds the user to the invite community
    b. If there is a logged user, it simply asks if the user wants to join.
  2. Via the default registration method. Users simply open our Url and fill in the form, in this case they will join Cambiatus Community.

This works fine for now, but we want to expand that so that the default registration is smarter and aware of the Url being currently used. Imagine a community with an Url configured as test.cambiatus.io. If someone opens up this URL on their browser they should be greeted with a welcome message from the community and allowed to either login or register. In the case of login, nothing changes, but in the case of registration, the app should be smart enough to understand if the community requires KYC and to register the new user to that community

Automatic community selection

We currently have a community selector that allows the app to scope the information based on that. We need to build a way to make the community to be selected automatically given the URL so if an user participates on Community A and Community B, if the users types a.cambiatus.io the selector should automatically select it.

It also needs to change the Url after the selection changed.

Plausibe and insights

Since we are going to have the Url to be dynamic depending on the selected community we will need to also update the way we add plausible so its dynamic, depending on the Url. Today we have it hard coded <script async="" defer="defer" data-domain="muda.cambiatus.io" src="https://plausible.io/js/plausible.js"></script> we need to change the tag before the Elm app loads depending on the URL. This will also help us to know if users try to use invalid subdomains

The solution

To implement this feature we need to implement features in several different parts of Cambiatus:

  • [INFRA] Add SSL certificate to all subdomains
  • [Backend] [Devs] Add the ability to include an subdomain to the community configuration. This should be smart to know if a subdomain is available (for example demo and staging should never be available, as well previously configured subdomain)
  • [Frontend] [Devs] Check if the Url being used is configured on a Community, if not, redirect to app.cambiatus.io
  • [Frontend] [Design] [Devs] Understand the Url being used and show a custom welcome message with the community logo, photos and details
  • [Frontend] [Devs] Make the frontend knows if the community require KYC even without an individual invitation, but rather from the URL
  • [Frontend] [Devs] Make the app change and understand URL and sync it with the community selector
  • [Design] Understand how we can have different insights depending the URL
  • [Frontend] [Devs] Make plausible tag dynamic depending on the URL
  • [Frontend] [Devs] Adjust local storage to be shared among all subdomains
@lucca65 lucca65 added enhancement New feature or request help wanted Extra attention is needed backend Issue that require backend work frontend Issue that require frontend work In discussion Issues that are being discussed labels Jan 11, 2021
@lucca65 lucca65 added READY Ready to start working on and removed In discussion Issues that are being discussed help wanted Extra attention is needed labels Mar 2, 2021
@lucca65 lucca65 closed this as completed Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Issue that require backend work enhancement New feature or request frontend Issue that require frontend work READY Ready to start working on
Projects
None yet
Development

No branches or pull requests

4 participants