How To Run Utopian.io on Your Local Machine

in utopian-io •  9 months ago

header.png

Run The Environment Locally

Find below all the information to properly run Utopian.io on your local machine if you wish to contribute to development of the project.

Run the frontend

Clone and Install

git clone https://github.com/utopian-io/utopian.io utopian.io

cd utopian.io

npm install

Generate and Export SSL Certificates

openssl req -x509 -sha512 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes

export SERVER_SSL_CERT="/path/cert.pem"

export SERVER_SSL_KEY="/path/key.pem"

export NODE_TLS_REJECT_UNAUTHORIZED=0

Replace path with the path to the generated .pem files.
You may need to authorise your browser in using a self-signed SSL certificate

Run The Frontend

npm run dev-server

Run the backend

Run a MongoDB Instance

  • Create a database named utopian-io
  • Create the following collections:
  • a. users
  • b. moderators
  • c. posts
  • d. sessions
  • e. sponsors
  • f. projects
  • g. stats
  • h. faqs

Clone and Install

git clone https://github.com/utopian-io/api.utopian.io api.utopian.io

cd api.utopian.io

npm install

Create .env file

UTOPIAN_GITHUB_SECRET=GITHUB_SECRET_HERE
UTOPIAN_GITHUB_CLIENT_ID=GITHUB_CLIENT_ID_HERE
UTOPIAN_GITHUB_REDIRECT_URL=http://localhost:3000/github/callback
UTOPIAN_STEEMCONNECT_SECRET=STEEM_CONNECT_SECRET
MONGO_HOST=mongodb://localhost/utopian-io

You can generate a Steem Connect secret by creating an application on https://v2.steemconnect.com/apps/create.

Replace the Github values by creating a test app for your local environment.

Generate and Export SSL Certificates

export NODE_TLS_REJECT_UNAUTHORIZED=0

openssl req -x509 -sha512 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes

export SERVER_SSL_CERT="/path/cert.pem"

export SERVER_SSL_KEY="/path/key.pem"

Replace path with the path to the generated .pem files.
You may need to authorise your browser in using a self-signed SSL certificate

Run The Backend

npm run build

npm run dev-server


Utopian Community-Driven Witness

We are made of developers, system administrators, entrepreneurs, artists, content creators, thinkers. We embrace every nationality, mindset and belief.

Utopian.io is the first Community-Driven Witness. Every decision will be taken as per the consensus of the entire community using our public Discord server and soon via a public voting system.

mooncryption-utopian-witness-gif


Top Sponsors


@freedom - Vote Witness

@misterdelegation

@ned

@transisto

@wackou - Vote Witness

@xeldal - Vote Witness

@lafona-miner - Vote Witness

@cnts

@steempty - Vote Witness

@thecryptodrive - Vote Witness

Top Moderators


@ruah

@espoem

@knowledges

@arie.steem

@elear

@damla

@mcfarhat

@rosatravels

@omeratagun

@manishmike10

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

This is great! Thank you for this! Up until now I've been unable to figure out the schema of the mongo database so i've been using http://api.utopian.io which was a pain because I could never debug things for moderators. This is a huge help!
I plan on dropping some development soon

·

Looking forward to that!

For loggin in these 2 environment variables are needed as well:

export UTOPIAN_APP=appid
export UTOPIAN_STEEMCONNECT_SECRET=secret

I am very happy to join @utopian-io and be a witness, thank you very much @utopian-io

@utopion-io great tutorial, was expecting this.
You guys just opened new way on internet for developers and creative thinkers. Thanks.

Thank you for the nice and easy enough guid :)

It is okay the way you are giving a decent message to the world...

why we need to run the Utopian.io in our machine, i think it is working fine on web and we can submit our contributions flawlessly.

·

This is for developers willing to contribute on the development of the project

·
·

ok thank you very much, i understand it now.

Poilalalalalaal ^^
Thx !

I would like to know how do you add the witness voting GIF at the bottom of your post?

·

The procedure of adding the GIF's and photographs are same, if you able to add the photography in post's then you can repeat the same process while adding GIF's.

Thanks for the information!!

very recommendation for linux users :D

Even though im not a developer im low key excited about this! I've been saying for the past year that we need more real life tech in this space. This is a huge step in that direction, I cant wait to see the types of things people come up with.

trims about your information

Thank you so much for this useful post.

Can we create our own projects ?

Hi @utopian-io i came across this post and just have to say this looks awesome! Good job, and this really is a great community, making the world better one program at i time!

This is great and highly advance. Does the installation support mac os or is os of it own? I trust @topian-io to be the first world wide open source platform who pays programmers and contributors on their performance. This is amazing fact.

ican't log in
there is a problem with server

what should i do i am getting this when i logged in

{"error":"Failed to create session"}

very nice and helpful information, thanks for sharing @utopian-io.
I always wait for your work. good luck always for all

Interesting.

I wonder if you guys would be open to someone creating an electron application using the utopian code base as well as a mobile application for us Developers on the go?

I think I will mess around with the code base and a kotlin/flutter app and see what comes out.

Utopian Witness proxed: I Love you, @utopian-io! 💗

Schermata 2018-01-26 alle 10.33.23.png

I just finished registering.
It's really a new thing for me!

I am looking forward to it.

Great post tnx for sharing I just upvoted steemit all the way check out my new post.