Code Monkey home page Code Monkey logo

dappforce / subsocial-web-app Goto Github PK

View Code? Open in Web Editor NEW
94.0 6.0 27.0 9.31 MB

Web UI for decentralized social networks and marketplaces. Features: blogs, posts, comments, likes, reputation, feed and notifications. Built with Next.js, React and Ant Design.

Home Page: http://subsocial.network

License: GNU General Public License v3.0

Dockerfile 0.05% JavaScript 1.25% Shell 0.16% TypeScript 35.75% CSS 60.04% HTML 0.04% Sass 0.33% SCSS 2.39%
blockchain polkadot substrate dapp social-network blog-platform blogging-platform comment-system commenting-system commenting

subsocial-web-app's Introduction

Subsocial Web UI by DappForce

Not Supported

⚠️ ATTENTION: This repo is not supported anymore. We keep it public because it contains the code of two technical grants supported by Web3 Foundation.

About

Subsocial is a set of Substrate pallets with web UI that allows anyone to launch their own decentralized censorship-resistant social network aka community. Every community can be a separate Substrate chain and connect with other communities via a Polkadot-based relay chain.

You can think of this as decentralized versions of Reddit, Stack Exchange or Medium, where subreddits or communities of Stack Exchange or blogs on Medium run on their own chain. At the same time, users of these decentralized communities should be able to share their reputation or transfer coins and other values from one community to another via Polkadot relay chain.

To learn more about Subsocial, please visit Subsocial Network.

Video demo

Subsocial demo #4, 2019-11-28

Run locally

If you want to develop Subsocial's web UI or just check it out locally, there is an easy way to do it.

Clone this repo:

git clone [email protected]:dappforce/dappforce-subsocial-ui.git
cd dappforce-subsocial-ui

Connect the app to Subsocial's server (Substrate node, IPFS):

cp subsocial-betanet.env .env

Install project dependencies:

yarn

Option A: Run in a DEV mode

A dev mode supports hot reloads – this is very helpful when developing UI bacuse you can see changes in your browser without restarting the app. But it takes some time (in seconds) compile updated parts of the app, after you made changes to the source code.

./run-dev.sh

Go to localhost:3003

Option B: Run in a PROD mode

A prod mode doesn't support hot reloads, but works super fast, because UI gets compiled by Next.js before running.

yarn build
yarn start

Go to localhost:3003

Build with Docker

Easy start

To start Subsocial web UI containerized (you should have docker installed):

docker run -d --rm --name subsocial-webui -p 3003:3003 dappforce/subsocial-ui:latest

Start with docker-compose

This will start Subsocial web UI with an nginx support:

  • Proxy web UI to the port 80
  • Proxy from localhost/bc to localhost:3002 (where Polkadot.js Apps should be running)
docker-compose up -t docker/docker-compose.yml -d

Build your own image

If you want to build docker image from your local repository (it takes a while...), in your shell:

docker build -f docker/Dockerfile -t [your_nickname]/subsocial-ui .

Start all parts of Subsocial at once with Subsocial Starter.

License

Subsocial is GPL 3.0 licensed.

subsocial-web-app's People

Contributors

dependabot[bot] avatar f3joule avatar olehmell avatar sagaidak avatar siman avatar subsocialdev 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  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  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  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

subsocial-web-app's Issues

Create an SSR page for Faucet

It could be called "Get Tokens (Faucet)"

  • Create an SSR page at URL /faucet
  • Add instructions on how to get tokens via Riot bot

Turn off Next.js telemetry

A message that we get from Next.js, when running in a prod mode:

Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry

Use Ant Select in "tags" mode for tag editing on Blog and Post forms

See this Select component in tags mode:
https://3x.ant.design/components/select/#components-select-demo-tags

import { Select } from 'antd';

const { Option } = Select;

const children = [];
for (let i = 10; i < 36; i++) {
  children.push(<Option key={i.toString(36) + i}>{i.toString(36) + i}</Option>);
}

function handleChange(value) {
  console.log(`selected ${value}`);
}

ReactDOM.render(
  <Select mode="tags" style={{ width: '100%' }} placeholder="Tags Mode" onChange={handleChange}>
    {children}
  </Select>,
  mountNode,
);

Infinite scroll for comments

Add infinite scroll for both root comments (at least) and replies (optional) on post preview and view post page.

This means that comments' data from Substrate and IPFS should be lazy-loaded.

Use built-in CSS support from Next.js

When running Subsocial's UI, Next.js writes in the console:

Warning: Built-in CSS support is being disabled due to custom CSS configuration being detected.
See here for more info: https://err.sh/next.js/built-in-css-disabled

Read this https://nextjs.org/docs/basic-features/built-in-css-support#less-and-stylus-support

SASS + CSS modules

Consider using SASS with CSS modules. Quotes from Next.js docs:

CSS Modules locally scope CSS by automatically creating a unique class name. This allows you to use the same CSS class name in different files without worrying about collisions.

You can use component-level Sass via CSS Modules

LESS + Ant Design?

Also, consider adding Less support – this will allow us to customize style parameters of Ant Design.

See this example: Next + Ant + LESS:
https://github.com/zeit/next.js/tree/canary/examples/with-ant-design-less

Find account by its address

Web UI can show address/profile preview by entered address from the search bar.

Current situation (bad)

Cannot find account by its address:

image

Summary - a new field on blog form

  • Should not allow markdown. Use simple textarea. Or maybe allow only links.

  • Should be <= 200 chars.

  • Add "Summary" to Blog Editor.

  • Show "Summary" in blog preview and SpaceNav

Show "Edit space" link in space nav

Currently we don't have any visible link or button to edit a space if you are the owner.

Need to add the link with a pencil icon before "Edit menu" action link.

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.