Skip to content

A React & Typescript blog that uses 3Box decentralized storage and authentication

Notifications You must be signed in to change notification settings

unstoppabledomains/3box-blog-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

3Box React Blog

A React & Typescript blog that uses 3Box decentralized storage and authentication

How to use

yarn
yarn start

This will run the website with whatever blog is specified in public/config.json.

To create a new blog you will have run src/utils/createThread.ts and then update public/config.json with the new domain, threadAddress, spaceName, & adminWallet.

How It Works

Make sure the blogConfig.json is set up properly

The app use's React useContext & useReducer function to maintain a global app state.

// State:
interface AppState {
  box: any;
  space: any;
  thread: any;
  user: {
    loggedIn: boolean;
    walletAddress?: string;
    profileImg?: string;
  };
  posts?: BlogPost[];
}

// Actions:
type ActionTypes =
  | typeof ADD_BOX
  | typeof LOG_IN
  | typeof LOG_OUT
  | typeof ADD_POST
  | typeof SET_POSTS
  | typeof DELETE_POST;

Libraries

About

A React & Typescript blog that uses 3Box decentralized storage and authentication

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages