All Projects → OriginProtocol → origin-website

OriginProtocol / origin-website

Licence: MIT license
The code powering our website

Programming Languages

HTML
75241 projects
python
139335 projects - #7 most used programming language
CSS
56736 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects
Mako
254 projects

Projects that are alternatives of or similar to origin-website

origin-bridge
We've moved to a monorepo: https://github.com/OriginProtocol/origin/tree/master/infra/bridge
Stars: ✭ 14 (-61.11%)
Mutual labels:  origin, origin-protocol
thegraph-react
⚛️ React bindings for helping build decentralized applications quickly on Ethereum and IPFS using GraphQL.
Stars: ✭ 31 (-13.89%)
Mutual labels:  ipfs
git-lfs-ipfs
Use IPFS as a git-lfs endpoint
Stars: ✭ 41 (+13.89%)
Mutual labels:  ipfs
php-ipfs-api
php client library for ipfs
Stars: ✭ 46 (+27.78%)
Mutual labels:  ipfs
ethereum-dapp-ipfs-node.js-mongodb
以太坊开发DApp实战教程——用区块链、星际文件系统(IPFS)、Node.js和MongoDB来构建电商平台
Stars: ✭ 46 (+27.78%)
Mutual labels:  ipfs
superhighway84
USENET-inspired, uncensorable, decentralized internet discussion system running on IPFS & OrbitDB
Stars: ✭ 437 (+1113.89%)
Mutual labels:  ipfs
nft-art-maker
NFT Art Maker - generates images and metadata files, packs them into IPFS CAR files, and uploads them using nft.storage. All from provided PNG layers.
Stars: ✭ 77 (+113.89%)
Mutual labels:  ipfs
kotal
Blockchain Kubernetes Operator
Stars: ✭ 137 (+280.56%)
Mutual labels:  ipfs
nebula-crawler
🌌 A libp2p DHT crawler, monitor, and measurement tool that exposes timely information about DHT networks.
Stars: ✭ 97 (+169.44%)
Mutual labels:  ipfs
react-native-sdk
[DEPRECATED] React Native bindings for https://github.com/textileio/go-textile
Stars: ✭ 38 (+5.56%)
Mutual labels:  ipfs
ipfs-eth-database
An example of usage IPFS in Ethereum Smart Contracts
Stars: ✭ 55 (+52.78%)
Mutual labels:  ipfs
demo-ipfs-todo
Simple ToDo app using window.ipfs
Stars: ✭ 16 (-55.56%)
Mutual labels:  ipfs
ipfs-add-from-url
A command line executable to add a file to IPFS from a URL instead of a file path
Stars: ✭ 24 (-33.33%)
Mutual labels:  ipfs
martianpins
Self hosted IPFS pinning service.
Stars: ✭ 23 (-36.11%)
Mutual labels:  ipfs
ipfs-dag-builder-vis
See how the DAGs get built
Stars: ✭ 19 (-47.22%)
Mutual labels:  ipfs
IPFSStreamingVideo
IPFS Streaming Video
Stars: ✭ 28 (-22.22%)
Mutual labels:  ipfs
nftool
A suite of tools for NFT generative art.
Stars: ✭ 145 (+302.78%)
Mutual labels:  ipfs
pollinations
Generate Art
Stars: ✭ 100 (+177.78%)
Mutual labels:  ipfs
ipfs-blog
IPFS Blog & News
Stars: ✭ 31 (-13.89%)
Mutual labels:  ipfs
ehr-blockchain
Electronic Health Record (EHR) and Electronic Medical Record (EMR) systems. However, they still face some issues regarding the security of medical records, user ownership of data, data integrity etc. The solution to these issues could be the use of a novel technology, i.e., Blockchain. This technology offers to provide a secure, temper-proof pl…
Stars: ✭ 41 (+13.89%)
Mutual labels:  ipfs

origin_github_banner

origin_license

Head to https://www.originprotocol.com/developers to learn more about what we're building and how to get involved.

originprotocol.com

Official website for Origin Protocol

This is a Flask app with the source code for www.originprotocol.com. The code is all Python 3.9.2 with Postgres for the database (basically just for the mailing list). The database is not required to be configured if you're just working on the website.

Installing

Clone

git clone https://github.com/OriginProtocol/origin-website.git

Setup and activate a Python virtualenv

python3 -m venv origin-website/venv
source origin-website/venv/bin/activate

Install

pip install -e .[dev]

Rename the file sample.env to .env, and update env variables as desired.

mv sample.env .env

Run it!

python main.py

Open browser to view

open http://127.0.0.1:5000/

Problems? Hit us up in the #engineering channel on Discord if you need help.

Run the Tests

Throughout the development process and before committing or deploying, run:

pytest

Run individual test files simply as:

pytest path/to/test.py

Run a single test case, or an individual test, using:

pytest path/to/test.py::test_case_name

Running locally with Celery

We use Celery for running background tasks (mostly just sending emails). To get this working on your local machine, you'll want to make sure:

  • Your .env has CELERY_DEBUG: False
  • Redis is installed and running: redis-server
  • An active Celery worker is running: celery -A util.tasks worker --loglevel=INFO

Celery Flower is useful for monitoring tasks: flower -A util.tasks --port=5555

Running locally with Docker Compose

You can run the website in combination with a local PostgreSQL, Redis and Celery using Docker Compose.

Remove the .[deploy] at the end of the requirements.txt

cd origin-website
docker-compose up

Note: you can login to the container running the app with the following command:

docker exec -ti origin-website /bin/bash

Running cron jobs locally

Some scripts use Heroku cron jobs. Use the following command to test them locally

PYTHONPATH=$(pwd) PROJECTPATH=$(pwd) python ./logic/scripts/update_token_insight.py

When running on docker, a container named crontainer will run these scripts every 5 minutes. If you want to run them manually:

docker exec -it -e PYTHONPATH=/app -e PROJECTPATH=/app origin-website python ./logic/scripts/update_token_insight.py

Running cron jobs on Production/Staging

Running token_stats on Staging:

heroku run -a staging-originprotocol-com PROJECTPATH=/app python ./logic/scripts/token_stats.py

Running token_stats on Production:

heroku run -a originprotocol-com PROJECTPATH=/app python ./logic/scripts/token_stats.py

System Requirements

  • Docker version 18 or greater: docker --version
  • Docker Compose For Mac and Windows docker-compose should be part of desktop Docker installs: docker-compose --version
  • Git: git --version
  • Unix-based system (OSX or Linux) needed to run the bash scripts

Getting Started

  1. Clone the repository

git clone https://github.com/OriginProtocol/origin-website && cd origin-website

  1. From the root of the repository run docker-compose up. The first time this command runs it will take some time to complete due to the initial building of the containers.

When this completes you should be able to access the website at http://localhost:5000.

Localization

See translations directory.

Database changes

Set FLASK_APP env variable to point to the executable... e.g.:

export FLASK_APP=~/projects/origin-website/main.py

We use Flask Migrate to handle database revisions. If you make changes to the database, use flask db migrate to generate the required migration file and then flask db upgrade to implement and test your changes on your local database before committing.

Heroku Deploy

To deploy a development copy of the site on Heroku, just choose which branch you would like to use and follow the instructions:

stable branch
(v1.11.1)
master branch
(active development)
Deploy Deploy

Heroku will prompt you to set config variables. At a minium, you must set these two:

Config Value
FLASK_SECRET_KEY (make something up)
HOST (domain name of your dev heroku app)

See sample.env for a full list of other optional config variables. You can get Recaptcha keys from Google.

We use both the python and the nginx buildpacks:

heroku buildpacks:set heroku/python
heroku buildpacks:add https://github.com/heroku/heroku-buildpack-nginx

Deployment Dependencies

To update the deployment dependencies, update reuirements.txt. To use the deps from your local env, you can run the freeze script in the root directory:

./freeze.sh

This will include any installed deps, and the deps defined in deploy in extras_require.

Connect to Heroku instance

In order to run Celery jobs manually you can ssh into Heroku staging with: heroku ps:exec --app staging-originprotocol-com

or into Heroku production heroku ps:exec --app originprotocol-com

Contributing

We'd love to have you join us and contribute to this project. Please join our #engineering channel on Discord and read our guidelines on contributing to get started.

Shoutouts

Special thanks to the following companies for their support:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].