Giter Club home page Giter Club logo

tabula's Introduction

Tabula

Build Status Contributor Covenant

Instant web3 publications for writers, DAOs, and any Ethereum-based account. Built on Poster (EIP-3722).

Poster Format

Tag

"PUBLICATION"

Content

Any properties can be added to articles; this is just a representation of the properties that are utilized in the current version of the Tabula user interface.

Create Publication

Lets any account create a new publication. On creation, the message sender gets all permissions. This can be edited via the publication/permissions action.

Property Type Value
action* String "publication/create"
title* String Publication title
tags String Array Relevant publication tags
description String Publication description
image String IPFS hash for an image

Update Publication

Lets an account update a publication's information. The present properties will overwrite old properties (if a property does not exist, it will be created). The message sender must have publication/update permissions to the referenced publication.

Property Type Value
action* String "publication/update"
id* String ID of publication to update (available from the subgraph or created manually using the event.transaction.hash + "-" + event.logIndex from the publication creation event)
title String Content title
tags String Array Relevant content tags. Providing an empty string ("") will set tags to [].
description String Content description
image String IPFS hash for an image. Providing an empty string ("") will set image to null.

Delete Publication

Lets an account delete a publication, along with all associated articles and permissions. The sender must have publication/delete permissions to the referenced publication.

Property Type Value
action* String "publication/delete"
id* String ID of publication to delete (available from the subgraph or created manually using the event.transaction.hash + "-" + event.logIndex from the publication creation event)

Set Publication Permissions

Lets an account give and/or revoke permissions for an account to a publication. The message sender must have publication/permissions permissions to the referenced publication.

Property Type Value
action* String "publication/permissions"
id* String ID of publication to set permissions on (available from the subgraph or created manually using the event.transaction.hash + "-" + event.logIndex from the publication creation event)
account* String The address to set permissions for
permissions* String (JSON object) A JSON object with permissions to set (details below)
{
  "article/create": true,
  "article/update": true,
  "article/delete": true,
  "publication/delete": true,
  "publication/update": true,
  "publication/permissions": true
}

Create Article

Lets an Account post a new article to a publication. The message sender needs article/create permissions to the publication.

Property Type Value
action* String "article/create"
publicationId* String The ID of the publication this article should be created in.
article* String IPFS hash (pointing to a Markdown document) or a markdown formatted string
title* String Content title
authors String Array Author addresses or names
tags String Array Relevant content tags
description String Content description
image String IPFS hash for an image

Update Article

Lets an account update an article. The present properties will overwrite old properties (if a property does not exist, it will be created). The message sender needs article/update permission for the publication.

Property Type Value
action* String "article/update"
id* String ID of article to update (available from the subgraph or created manually using the event.transaction.hash + "-" + event.logIndex from the article creation event)
article String IPFS hash (pointing to a Markdown document) or a markdown formatted string
title String Content title
authors String Array Author addresses or names. Providing an empty string ("") will set authors to [].
tags String Array Relevant content tags. Providing an empty string ("") will set tags to [].
description String Content description. Providing an empty string ("") will set description to null.
image String IPFS hash for an image string. Providing an empty string ("") will set image to null.

Delete Article

Lets an account can delete an article. The message sender needs article/delete permission to the publication.

Property Type Value
action* String "article/delete"
id* String ID of article to delete (available from the subgraph or created manually using the event.transaction.hash + "-" + event.logIndex from the article creation event)

* means requires

tabula's People

Contributors

asgeir-s avatar auryn-macmillan avatar cedricwaxwing avatar juliopavila avatar riccardo-gnosis avatar samepant avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

tabula's Issues

Cleanup of old naming, routes and old components

We currently have used the words Post in some places and Article in other places. I think we need to clean this up to that it's consistent.

There are also some leftover (and unused) components and routes etc. (like the PostView) that should be removed.

Articles should be uploaded to IPFS if an pinning service is configured

If a pinning service is configurated, upload the article content to IPFS and only include the hash in the article/create action's article property.

This will make publishing articles much cheaper for the user.

When no pinning service is configurated, it should function as it does today.

Make it possible for an account to update articles in a publication

An account that has article/update permissions to a publication should be able to update (overwrite) properties of articles in that publication.

Can use the same form as when creating an article, just pre-populate it with the article to be updated.

  • Subgraph
  • App
  • Design

Add IPFS pinning

We should add this via the implementation-agnostic API: https://ipfs.github.io/pinning-services-api-spec/.

The user should be able to:

  1. Select a pinning service or provide an endpoint to a pinning service in adherence with the pinning-services-api-spec. For instance: https://api.pinata.cloud/psa.
  2. The user should provide the accessToken/API key.
    3. Everything that's added to IPFS should be pinned using the pinning service (if the pinning service is not configurated, the user should get a warning or error that makes it hard to upload content without pinning it).

Both the selected service and the accessToken/API key should be saved in the user's browser storage (localStorage). This is configured on the browser level and used for all the user's interactions (any publication).

Tabula should also be usable without a pinning service:

  • If a pinning service is configurated, images and the article text content should be uploaded to IPFS, and only a hash included in the transaction content.

  • If a pinning service is not configurated, image uploads should be disabled with a warning (until #47) and article text content included directly in the article property of the article/create/article/update transaction (like it is today).

  • Design

  • App

Deeplink to all the things

The publication ID is not in the URL when setting permissions. This is likely true for other routes as well. Wherever possible, we should make deeplinking possible by uniquely identifying the page int he URL.

Add multiple authors to posts

On the subgraph, we can define multiple authors on one post. It would be really nice to expose this feature in the app. #83 is also related.

Remove "continue reading" button

The "continue reading" button on the publication view is redundant and the copy is weird. Let's remove the button altogether.

Display the article preview image

The article preview image should be displayed in:

  • the article list, and in
  • the article page.

Use Medium as a reference for how to do this.

Instead of asking the user to change the network, we ask the wallet software to change the chain

Instead of asking the user to change the network (chain), we can ask the wallet software to change the chain.

Separated from #56 into this issue.

Notes

  • Sometimes, there is more than one "correct" network to change to.
  • Only when connecting a wallet to an already open publication do we know what network should be connected to.

Implementation

Tasks

  • If there are multiple options: let the user select one of the supported networks. When one is selected/clicked, request the wallet software to change the network.
  • If there is one correct network: request the wallet software to change that network.
  • If the network (selected) is not added to the user's wallet software: request the wallet software to add the network, then request it to change to the new network (if it does not happen automatically).

Fix author under title on article

Under the title on the article view, there is currently a link to back to the publication. This is redundant since there is also a link back to the publication above the title.

Presumably, this was meant to be a link to the author's profile, or something similar.

We should change this to list each of the author addresses/profiles.

Validate IPFS node input

We don't validate that the provided IPFS endpoint actually works until we try to use it.
In practice, this means that incorrectly entered details will cause pinning to fail after a transaction has already been sent.
To avoid this, we should:

  • be explicit about which permissions are required if using Pinata.
  • check the details on save and throw an error if they don't work.
  • secret token should be a password input, so that it is not cached by the browser.

Make it possible for a user to view a list of articles posted in a publication

Make it possible for a user to browse a publication.

Should include the publication info and the articles posted to the publication.

  • App
  • Design

It should be possible to get directly to a publication via a URL. Something like: /publication/{publicationId}. This should not require or "push" a reader to connect a wallet. Should be browsable for "web2 users".

Make it possible for an account to update publications

An account with the publication/update permission to a publication, should be able to update/overwrite the publication's properties.

Can use the same form as when creating a publication, just pre-populate it with the publication to be updated.

  • Subgraph
  • App
  • Design

On the publish page, show publications from every netowrk

Currently, the publications/publish route only lists publications on the network that the wallet is connected to. It should list publications in which the wallet has permissions on every network, regardless of the network the wallet is connected to.

Author/user view

It would be really great to have an author/user view which exposes the author/user's interactions; what publications they contribute to, the posts they have authored, etc.

Related to #83 and #84.

Have the chain id as part of the publication id

Have the chain id as part of the publication id. So that the frontend can use that to select the correct subgraph and chain when a user connects a wallet (from within a publication or article).

  • app
  • subgraph

It should be possible to go directly to articles via a URL

It should be possible to get directly to an article via a URL. Something like /publication/{publicationId}/article/{articleId}. This should not require or "push" a reader to connect a wallet. Should be browsable for "web2 users".

Custom DNS resolution for Publications

For instance, make blog.gnosis.com "point to" the Gnosis Tabula publication.

Proposed solution

  1. Make a CNAME record for blog.gnosis.com, pointing to the tabula domain (domain where the app is hosted).
  2. When the Tabula app loads, it should check the current href (current URL).
  3. If the current URL is not the Tabula app URL, we request a TXT record from the domain using DNS over HTTPS, here is for instance, the solution from CloudFlare The TXT record returns the publication id for the publication to display (we can make the publication ID start with the chain ID).
What a user will need to do to set this up
  1. Set a CNAME record pointing to the Tabula App.
  2. Set a TXT record with a publication ID.
Pros
  1. Relatively easy for a user to set up.
  2. DNS over HTTPS can increase user privacy and security by preventing eavesdropping and manipulation of DNS data (ref: https://en.wikipedia.org/wiki/DNS_over_HTTPS).
  3. No server needed (for us to run).
Cons
  1. The lookup relies on a DNS over HTTPS provider.

Make it possible for an account to create publications

An account should be able to create a publication via a publication/create action.

The account that creates the publication should get all permissions for the publication on creation (can be changed later).

  • Subgraph
  • App
  • Design

Remove all use of the old subgraph in the app

  • REACT_APP_API_URL needs to be removed from packages/app/.env.example.
  • The client (that uses REACT_APP_API_URL) should be removed: packages/app/src/services/graphql.ts.
  • All dependencies on that client need to be removed and converted to the new subgraph using BASE_SUBGRAPH_URL.

Mismatched blockies

The blocky in the nav bar does not match the address (appears to be using the checksumed address as input, rather than lowercase).

Article direct link bugs

Screenshot 2022-04-21 at 12 01 36

  • When going directly to an article in a publication that I have not visited before the publication header is not loaded. Can be reproduced by opening an article directly in an incognito window.
  • Also, can we make the URL like this:

/#/publication/{publicationId}/article/{articleId}

  • Reloading the page when visiting an article brings the user to the Tablua landing page. It should instead keep the user on the article.

Update meta tags and favicon

The metatags and favicon on the app are still the default from the create react app template.
We should update the:

  • tabula favicon
  • metatags on the home page
    • og:title "Tabula"
    • og:site_name "Tabula"
    • og:description "Instant web3 publications for writers, DAOs, and any Ethereum-based account."
    • og:type website
    • og:url https://tabula.gg
    • og:image full URL to a preview image
  • metatags on a publication page
    • og:title "{Publication Name}"
    • og:site_name "Tabula"
    • og:description "{Publication Description}"
    • og:type website
    • og:url https://tabula.gg/{publication Id}
    • og:image full URL to publication preview image
  • metatags on an article page
    • og:title "{Article Title}"
    • og:site_name "{Publication Name}"
    • og:description "{Article Description}"
    • og:type website
    • og:url https://tabula.gg/{publication Id}-{article id}
    • og:image full URL to article preview image

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.