Skip to content

Commit

Permalink
Merge pull request #90 from smoke-indica/package_updates
Browse files Browse the repository at this point in the history
Multiple fixes for the webapp
  • Loading branch information
smoke-indica authored May 11, 2021
2 parents 9419b9d + bf9376e commit 21a1e12
Show file tree
Hide file tree
Showing 138 changed files with 2,111 additions and 10,942 deletions.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
FROM node:7.5

ARG SOURCE_COMMIT
ENV SOURCE_COMMIT ${SOURCE_COMMIT}
ARG DOCKER_TAG
ENV DOCKER_TAG ${DOCKER_TAG}

# yarn > npm
#RUN npm install --global yarn

Expand Down
29 changes: 14 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# Condenser


Condenser is the react.js web interface to the world's first and best blockchain-based social media platform, smoke.io. It uses [STEEM](https://github.com/steemit/steem), a blockchain powered by Graphene 2.0 technology to store JSON-based content for a plethora of web applications.
Condenser is the react.js web interface to the world's first and best blockchain-based social media platform, smoke.io. It uses [SMOKE](https://github.com/steemit/steem), a blockchain powered by Graphene 2.0 technology to store JSON-based content for a plethora of web applications.

## Why would I want to use Condenser (smoke.io front-end)?
* Learning how to build blockchain-based web applications using STEEM as a content storage mechanism in react.js
* Learning how to build blockchain-based web applications using SMOKE as a content storage mechanism in react.js
* Reviewing the inner workings of the smoke.io social media platform
* Assisting with software development for smoke.io

Expand Down Expand Up @@ -49,19 +49,12 @@ mkdir tmp

Install at least Node v7.5 if you don't already have it. We recommend using `nvm` to do this as it's both the simplest way to install and manage installed version(s) of node. If you need `nvm`, you can get it at [https://github.com/creationix/nvm](https://github.com/creationix/nvm).

Condenser is known to successfully build using node 7.5, npm 4.1.2, and yarn 1.1.0.

Using nvm, you would install like this:
```bash
nvm install v7.5
```

We use the yarn package manager instead of the default `npm`. There are multiple reasons for this, one being that we have `steem-js` built from source pulling the github repo as part of the build process and yarn supports this. This way the library that handles keys can be loaded by commit hash instead of a version name and cryptographically verified to be exactly what we expect it to be. Yarn can be installed with `npm`, but afterwards you will not need to use `npm` further.
We use the yarn package manager instead of the default `npm`. There are multiple reasons for this, one being that we have `smoke-js` built from source pulling the github repo as part of the build process and yarn supports this. This way the library that handles keys can be loaded by commit hash instead of a version name and cryptographically verified to be exactly what we expect it to be. Yarn can be installed with `npm`, but afterwards you will not need to use `npm` further.

```bash
npm install -g yarn
yarn global add babel-cli
yarn install
yarn install --frozen-lockfile
yarn run build
```
To run condenser in production mode, run:
Expand All @@ -80,7 +73,7 @@ yarn run start

It will take quite a bit longer to start in this mode (~60s) as it needs to build and start the webpack-dev-server.

By default you will be connected to smoke.io's public steem node at `wss://steemd.steeemit.com`. This is actually on the real blockchain and you would use your regular account name and credentials to login - there is not an official separate testnet at this time. If you intend to run a full-fledged site relying on your own, we recommend looking into running a copy of `steemd` locally instead [https://github.com/steemit/steem](https://github.com/steemit/steem).
By default you will be connected to smoke.io's public steem node. This is actually on the real blockchain and you would use your regular account name and credentials to login - there is not an official separate testnet at this time. If you intend to run a full-fledged site relying on your own, we recommend looking into running a copy of `smoked` locally instead [https://github.com/smokenetwork/smoke](https://github.com/smokenetwork/smoke).

#### Configuration

Expand Down Expand Up @@ -113,7 +106,7 @@ Once set up, you can set the mysql server configuration option for condenser usi
Example:

```bash
export SDC_DATABASE_URL="mysql://root:[email protected]/steemit_dev"
export SDC_DATABASE_URL="mysql://root:[email protected]/smoke_dev"
```

Here are instructions for setting up a mysql server and running the necessary migrations by operating system:
Expand Down Expand Up @@ -146,10 +139,10 @@ GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';
FLUSH PRIVILEGES;
```

Now launch mysql client and create steemit_dev database:
Now launch mysql client and create smoke_dev database:
```bash
mysql -u root
> create database steemit_dev;
> create database smoke_dev;
> quit
```

Expand Down Expand Up @@ -188,6 +181,12 @@ Test the interactive console:
```bash
user@example:~$ tarantool
```
#### Debugging SSR code

`yarn debug` will build a development version of the codebase and then start the
local server with `--inspect-brk` so that you can connect a debugging client.
You can use Chromium to connect by finding the remote client at
`chrome://inspect/#devices`.

#### Style Guides For Submitting Pull Requests

Expand Down
10 changes: 5 additions & 5 deletions config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"google_analytics_id": "UA-106330268-3",
"helmet": {
"directives": {
"childSrc": "'self' www.youtube.com staticxx.facebook.com w.soundcloud.com open.spotify.com player.vimeo.com www.theweedtube.com emb.d.tube player.twitch.tv www.twitch.tv gleam.io js.gleam.io",
"childSrc": "'self' emb.d.tube player.twitch.tv www.youtube.com staticxx.facebook.com w.soundcloud.com open.spotify.com player.vimeo.com www.theweedtube.com emb.d.tube player.twitch.tv www.twitch.tv gleam.io js.gleam.io",
"connectSrc": "'self' smoke.io rpc.smoke.io https://rpc.smoke.io wss://rpc.smoke.io pubrpc.smoke.io api.smoke.io",
"defaultSrc": "'self' www.youtube.com staticxx.facebook.com player.vimeo.com open.spotify.com",
"defaultSrc": "'self' emb.d.tube www.youtube.com staticxx.facebook.com player.vimeo.com open.spotify.com",
"fontSrc": "data: fonts.gstatic.com",
"frameAncestors": "'none'",
"imgSrc": "* data:",
Expand Down Expand Up @@ -78,9 +78,9 @@
}
},
"server_session_secret": "exiKdyF+IwRIXJDmtGIl4vWUz4i3eVSISpfZoeYc0s4=",
"session_cookie_key": "stm-dev",
"session_key": "steemses",
"site_domain": "steemitdev.com",
"session_cookie_key": "smk-dev",
"session_key": "smokeses",
"site_domain": "smoke.io",
"tarantool": {
"host": "localhost",
"password": "",
Expand Down
2 changes: 1 addition & 1 deletion doc/LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2016 Smoke, Inc., and contributors.
Copyright (c) 2020 Smoke, Inc., and contributors.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
Loading

0 comments on commit 21a1e12

Please sign in to comment.