Git Product home page Git Product logo

blockpage's Introduction

BlockPage

Demo OSS blog starter web app forked from morethan-log showcasing how it can be turned into a blog posting site with wallet based authentication and subscription based access to content using Subtopia.

Prerequisites

For Developing/Running Locally

Platforms Required for Deployment

How to repurpose this demo for your own blog?

  1. Fork the repository
  2. Install dependencies
yarn install
  1. Create notion account and duplicate the template to your workspace. Publish the page to web and get the page id from the URL. The app relies on incremental static regeneration to update content. The revalidateTime setting in site.config.js controls the revalidation time for [slug], index, in seconds.
  2. Create .env file from .env.template and fill in the required values.
  3. Run the app
yarn dev
  1. Deploy the app to vercel
vercel init
vercel deploy
  1. Create a product on Subtopia TestNet and copy the product ID. Update the productID: fields in SubtopiaClient invocations within the project to link users to your product contract. This product contract is responsible for managing subscriptions and access to content, enabling the lookup of subscription metadata or membership status, among other features (detailed at Subtopia Documentation). In addition to the product contract, Subtopia will establish a locker, acting as an escrow to collect of subscription payments from users (for instance, the blog readers). Should a user opt for a subscription, they have the option to deploy a user locker. This contrasts with the creator locker by serving as a state storage for swift access to manage all Subtopia-based product contracts. Refer to documentation for detailed breakdown of existing functionality and join our discord community.

Refer to Subtopia MainNet for deploying on MainNet.

  1. Configure environment variables in vercel

  2. Done! Your blog is now live. Creating new content can be managed entirely on Notion. As long as the NOTION_PAGE_ID is set correctly and not exposed to the public, gated content will be unavailable for users without the subscription. To control content revalidation time refer to revalidateTime setting in the codebase.

Credits

morethanmin - for creating a simple and easy to use OSS blog web app that served as the base for this demo.

blockpage's People

Contributors

aorumbayev avatar

Watchers

 avatar

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.