1
0
mirror of https://github.com/bigchaindb/site.git synced 2024-11-22 09:46:57 +01:00
site/_src/getstarted.html

375 lines
15 KiB
HTML
Raw Normal View History

2017-06-15 18:54:34 +02:00
---
layout: page
title: Get started
2017-12-18 21:23:34 +01:00
description: "Explore drivers, tools & documentation to get started with BigchainDB"
tagline: "Explore drivers, tools & documentation"
2017-06-15 18:54:34 +02:00
image: share-image-getstarted.png
2017-06-15 19:16:45 +02:00
js: page-getstarted.min.js
redirect_from:
- /community/
2017-06-27 01:03:50 +02:00
- /start/
2017-06-15 18:54:34 +02:00
---
{% assign content = site.data.getstarted %}
2017-06-22 14:31:49 +02:00
<section class="section section--firsttransaction">
2017-06-27 16:16:51 +02:00
2017-06-22 14:31:49 +02:00
<div class="row row--wide">
2017-06-27 21:59:58 +02:00
<h1 class="section-title">{{ content.firsttransaction.title }}</h1>
2017-06-22 14:31:49 +02:00
<div class="grid grid--full grid-small--half grid--gutters">
<div class="grid__col">
2017-06-22 17:23:48 +02:00
<form id="form-transaction" class="form form--transaction js-parsley">
2017-06-27 16:16:51 +02:00
<fieldset class="form--transaction__content">
2017-06-27 16:16:51 +02:00
<p class="form-group">
<input id="message" class="form-control" type="text" name="message" required>
<label class="form-label" for="message">{{ content.firsttransaction.message.label }}</label>
2017-06-27 16:16:51 +02:00
</p>
2017-06-27 21:59:58 +02:00
<p class="message alert alert--info">{{ content.firsttransaction.message.request }}</p>
<button class="btn btn-primary" id="post" disabled>{{ content.firsttransaction.message.button }}</button>
2017-06-27 16:16:51 +02:00
</fieldset>
</form>
2017-06-29 15:16:10 +02:00
</div>
<div class="grid__col">
<div class="waiting">
<pre>
<code class="waiting">Beep, boop, waiting for your input...</code>
</pre>
</div>
<div class="response highlight hide">
<pre>
<code class="output language-json">{
"asset": {
"data": {
"msg": "Blockchain all the things!"
}
},
"id": "04c00267af82c161b4bf2ad4a47d1ddbfeb47eef1a14b8d51",
...</code>
</pre>
</div>
<div class="message message--success alert alert--success hide">
<p>{{ content.firsttransaction.message.response }}</p>
2017-12-18 21:23:34 +01:00
<p><a class="transaction-link" href="{{ site.bigchaindb_api_url }}/api/v1/transactions/">Check out your transaction on BigchainDB Testnet</a></p>
2017-06-29 15:16:10 +02:00
</div>
<p class="message message--fail alert alert--warning hide">Shenanigans! Something's off. Would you mind trying again?</p>
</div>
</div>
</div>
<div class="row row--wide">
<aside class="code-example">
<ul class="nav nav-tabs">
<li class="nav-item">
2017-07-06 17:37:17 +02:00
<a class="nav-link active" href="#python" data-toggle="tab" role="tab">Python</a>
2017-06-29 15:16:10 +02:00
</li>
<li class="nav-item">
<a class="nav-link" href="#nodejs" data-toggle="tab" role="tab">Node.js</a>
</li>
</ul>
<div class="tab-content">
2017-07-06 17:37:17 +02:00
<div class="tab-pane active" id="python" role="tabpanel">
{% capture python %}
```python
from bigchaindb_driver import BigchainDB
from bigchaindb_driver.crypto import generate_keypair
2017-07-06 17:37:58 +02:00
bdb = BigchainDB(
2017-12-18 21:23:34 +01:00
'{{ site.bigchaindb_api_url }}',
2017-12-18 20:12:21 +01:00
headers={'app_id': 'Get credentials from testnet.bigchaindb.com',
2017-09-09 13:28:12 +02:00
'app_key': 'by signing up and going to your Applications screen'})
alice = generate_keypair()
tx = bdb.transactions.prepare(
2017-07-06 17:37:58 +02:00
operation='CREATE',
signers=alice.public_key,
asset={'data': {'message': 'Blockchain all the things!'}})
signed_tx = bdb.transactions.fulfill(
2017-06-29 16:43:32 +02:00
tx,
2017-07-06 17:37:58 +02:00
private_keys=alice.private_key)
bdb.transactions.send(signed_tx)
```
{% endcapture %}{{ python | markdownify }}
2017-06-29 15:16:10 +02:00
</div>
2017-06-29 15:16:10 +02:00
<div class="tab-pane highlight" id="nodejs" role="tabpanel">
{% capture nodejs %}
```js
const driver = require('bigchaindb-driver')
2017-07-06 17:37:58 +02:00
const alice = new driver.Ed25519Keypair()
const conn = new driver.Connection(
2017-12-18 21:23:34 +01:00
'{{ site.bigchaindb_api_url }}/api/v1/',
2017-12-18 20:12:21 +01:00
{ app_id: 'Get credentials from testnet.bigchaindb.com',
2017-09-09 13:28:12 +02:00
app_key: 'by signing up and going to your Applications screen' })
2017-07-06 17:37:58 +02:00
const tx = driver.Transaction.makeCreateTransaction(
{ message: 'Blockchain all the things!' },
null,
[ driver.Transaction.makeOutput(
driver.Transaction.makeEd25519Condition(alice.publicKey))],
alice.publicKey)
const txSigned = driver.Transaction.signTransaction(tx, alice.privateKey)
conn.postTransaction(txSigned)
```
{% endcapture %}{{ nodejs | markdownify }}
</div>
2017-06-22 18:23:47 +02:00
2017-06-22 14:31:49 +02:00
</div>
2017-06-29 15:16:10 +02:00
</aside>
2017-06-22 14:31:49 +02:00
</div>
2017-06-22 17:03:05 +02:00
</section>
2017-06-15 18:54:34 +02:00
2017-06-26 22:38:25 +02:00
<nav class="menu--sub" data-gumshoe-header>
2017-06-15 18:54:34 +02:00
<div class="row row--wide">
2017-06-26 22:38:25 +02:00
<div class="menu-overflow" data-gumshoe>
<a class="menu__link" href="#server" data-scroll><span class="number">1</span> {{ content.server.title }}</a>
<a class="menu__link" href="#drivers" data-scroll><span class="number">2</span> {{ content.drivers.title }}</a>
<a class="menu__link" href="#docs" data-scroll><span class="number">3</span> {{ content.docs.title }}</a>
<a class="menu__link" href="#community" data-scroll><span class="number">4</span> {{ content.community.title }}</a>
2017-06-15 18:54:34 +02:00
</div>
</div>
</nav>
<section class="section section--server background--darker" id="server">
2017-06-22 14:31:49 +02:00
<div class="row row--wide">
<header class="section-header text-left">
2017-06-27 20:39:49 +02:00
<h1 class="section-title section-title--numbered"><span class="number">1</span> {{ content.server.title }}</h1>
<p class="section-description">{{ content.server.description }}</p>
2017-06-22 14:31:49 +02:00
</header>
</div>
2017-06-27 01:02:54 +02:00
<aside class="starbase starbase--server">
<div class="row row--wide">
<figure class="starbase__image">
<img class="img--responsive" src="/assets/img/nosprite/starbase-server.svg" alt="Starbase" width="1111" height="343">
</figure>
</div>
</aside>
2017-06-27 01:02:54 +02:00
<section class="choice">
<div class="row row--wide">
<div class="grid grid--full grid-small--half grid--gutters">
<div class="grid__col">
2017-12-18 21:23:34 +01:00
<span class="pretitle">{{ content.server.network.pretitle }}</span>
<h2 class="choice__title">{{ content.server.network.title }}</h2>
<p>{{ content.server.network.description }}</p>
<a class="btn btn-primary" href="{{ content.server.network.link }}">{{ content.server.network.button }}</a>
</div>
<div class="grid__col">
<span class="pretitle">{{ content.server.bdb.pretitle }}</span>
<h2 class="choice__title">{{ content.server.bdb.title }}</h2>
<p>{{ content.server.bdb.description }}</p>
<a class="btn btn-secondary" href="{{ content.server.bdb.link }}">{{ content.server.bdb.button }}</a>
</div>
2017-06-22 14:31:49 +02:00
</div>
</div>
</section>
2017-06-15 18:54:34 +02:00
</section>
2017-06-27 01:02:54 +02:00
<section class="section section--drivers background--darker" id="drivers">
2017-06-22 14:31:49 +02:00
<div class="row row--wide">
<header class="section-header text-left">
<h1 class="section-title section-title--numbered"><span>2</span> {{ content.drivers.title }}</h1>
<p class="section-description">{{ content.drivers.description }}</p>
2017-06-22 14:31:49 +02:00
</header>
</div>
2017-06-26 20:15:44 +02:00
<aside class="starbase starbase--drivers">
<div class="row row--wide">
<figure class="starbase__image">
<img class="img--responsive" src="/assets/img/nosprite/starbase-drivers.svg" alt="Starbase" width="1060" height="166">
2017-06-26 20:15:44 +02:00
</figure>
</div>
</aside>
2017-06-27 01:02:54 +02:00
<section class="choice">
<div class="row row--wide">
2017-06-22 14:31:49 +02:00
2017-06-27 01:02:54 +02:00
<div class="grid grid--full grid-small--half grid--gutters">
<div class="grid__col">
2017-06-22 14:31:49 +02:00
<h3 class="choice__title">{{ content.drivers.title_official }}</h3>
2017-06-22 14:31:49 +02:00
2017-06-27 01:02:54 +02:00
<div class="grid grid--full grid-small--half grid--gutters">
2017-06-22 14:31:49 +02:00
2017-06-27 01:02:54 +02:00
{% for driver in site.data.drivers.official %}
2017-09-13 11:41:22 +02:00
{% if driver.external %}
{% capture url %}https://github.com/{{ driver.external }}/{{ driver.repo }}{% endcapture %}
{% else %}
{% capture url %}https://github.com/bigchaindb/{{ driver.repo }}{% endcapture %}
{% endif %}
2017-06-27 01:02:54 +02:00
<div class="grid__col">
2017-09-13 11:41:22 +02:00
<a class="driver" href="{{ url }}">
2017-06-27 01:02:54 +02:00
<h2 class="driver__title">{{ driver.title }}</h2>
<svg class="driver__logo">
<use xlink:href="/assets/img/sprite.svg#{{ driver.icon }}"></use>
</svg>
<p class="driver__meta">
<span class="driver__repo">{{ driver.repo }}</span>
<span class="driver__version">{{ driver.version }}</span>
</p>
</a>
</div>
{% endfor %}
2017-06-22 14:31:49 +02:00
2017-06-26 20:15:44 +02:00
</div>
</div>
2017-06-27 01:02:54 +02:00
<div class="grid__col">
2017-06-22 14:31:49 +02:00
<h3 class="choice__title">{{ content.drivers.title_tools }}</h3>
2017-06-27 01:02:54 +02:00
<div class="grid grid--full grid-small--half grid--gutters">
2017-06-26 20:15:44 +02:00
2017-06-27 01:02:54 +02:00
{% for driver in site.data.drivers.tools %}
<div class="grid__col">
<a class="driver" href="https://github.com/bigchaindb/{{ driver.repo }}">
<h2 class="driver__title">{{ driver.title }}</h2>
2017-06-26 20:15:44 +02:00
2017-06-27 01:02:54 +02:00
<p class="driver__meta">
<span class="driver__repo">{{ driver.repo }}</span>
<span class="driver__version">{{ driver.version }}</span>
</p>
</a>
</div>
{% endfor %}
2017-06-22 14:31:49 +02:00
2017-06-26 20:15:44 +02:00
</div>
</div>
</div>
2017-06-22 14:31:49 +02:00
</div>
2017-06-26 20:15:44 +02:00
2017-06-27 01:02:54 +02:00
<div class="row row--wide">
<h3 class="choice__title">{{ content.drivers.title_community }}</h3>
2017-06-27 01:02:54 +02:00
<div class="grid grid--half grid-medium--fit grid--gutters">
2017-06-26 20:15:44 +02:00
2017-06-27 01:02:54 +02:00
{% for driver in site.data.drivers.community %}
<div class="grid__col">
<a class="driver driver--community" href="{{ driver.link }}">
<svg class="driver__logo">
<use xlink:href="/assets/img/sprite.svg#{{ driver.icon }}"></use>
</svg>
<h2 class="driver__title">{{ driver.title }}</h2>
<p class="driver__meta">
<span class="driver__repo">{{ driver.repo }}</span>
</p>
</a>
</div>
{% endfor %}
2017-06-22 14:31:49 +02:00
</div>
</div>
2017-06-27 01:02:54 +02:00
</section>
2017-06-15 18:54:34 +02:00
</section>
2017-06-22 14:31:49 +02:00
<section class="section section--docs background--light" id="docs">
<div class="row row--wide">
2017-06-22 14:31:49 +02:00
<header class="section-header">
<h1 class="section-title section-title--numbered"><span>3</span> {{ content.docs.title }}</h1>
<p class="section-description">{{ content.docs.description }}</p>
2017-06-22 14:31:49 +02:00
</header>
</div>
<div class="row row--wide">
2017-06-22 14:31:49 +02:00
<div class="grid grid--full grid-small--fit grid--gutters">
{% for category in content.docs.categories %}
<div class="grid__col">
<h2 class="docs__title">{{ category.title }}</h2>
<ul class="docs__list">
{% for item in category.items %}
<li><a href="{{ item.link }}">{{ item.title }}</a></li>
{% endfor %}
</ul>
</div>
{% endfor %}
2017-06-22 14:31:49 +02:00
</div>
2017-06-15 18:54:34 +02:00
</div>
2017-06-27 16:00:49 +02:00
<div class="row row--wide text-center">
<div class="docs__actions">
<a class="btn btn-secondary" href="https://docs.bigchaindb.com">{{ content.docs.button }}</a>
</div>
</div>
2017-06-15 18:54:34 +02:00
</section>
2017-06-15 19:16:45 +02:00
<section class="section section--community" id="community">
2017-06-15 18:54:34 +02:00
<div class="row">
2017-06-15 19:16:45 +02:00
<header class="section-header">
<h1 class="section-title section-title--numbered"><span>4</span> {{ content.community.title }}</h1>
<p class="section-description">{{ content.community.description }}</p>
2017-06-15 19:16:45 +02:00
</header>
</div>
2017-06-15 19:16:45 +02:00
<div class="row community__actions">
<div class="grid grid--full grid-small--fit grid--gutters">
<div class="grid__col">
<svg class="icon icon--social icon--gitter">
<use xlink:href="/assets/img/sprite.svg#gitter"></use>
</svg>
<p>{{ content.community.gitter.text }}</p>
<a href="{{ site.social.gitter.url }}" class="btn btn-primary btn-sm">{{ content.community.gitter.button }}</a>
</div>
<div class="grid__col">
<svg class="icon icon--social icon--github">
<use xlink:href="/assets/img/sprite.svg#github"></use>
</svg>
<p>{{ content.community.github.text }}</p>
<a href="{{ site.social.github.url }}/{{ site.social.github.repo }}" class="btn btn-primary btn-sm">{{ content.community.github.button }}</a>
</div>
<div class="grid__col">
<svg class="icon icon--social icon--github">
<use xlink:href="/assets/img/sprite.svg#icon-book"></use>
</svg>
<p>{{ content.community.guidelines.text }}</p>
<a href="{{ site.social.github.url }}/{{ site.social.github.repo }}/blob/master/CONTRIBUTING.md" class="btn btn-primary btn-sm">{{ content.community.guidelines.button }}</a>
</div>
</div>
</div>
<div class="row">
2017-06-15 19:16:45 +02:00
<div class="grid grid--full grid-small--fit grid--gutters">
<div class="grid__col">
<h5>{{ content.community.follow.title }}</h5>
<p>{{ content.community.follow.description }}</p>
2017-06-15 19:16:45 +02:00
{% for link in site.social %}
2017-06-29 14:36:26 +02:00
{% unless link[1].title == 'Gitter' %}
2017-06-15 19:16:45 +02:00
<a class="social-link js-social-link" href="{{ link[1].url }}" title="{{ link[1].title }}">
<svg class="icon icon--social icon--{{ link[0] }}" aria-labelledby="title">
<title>{{ link.title }}</title>
<use xlink:href="/assets/img/sprite.svg#{{ link[0] }}"></use>
</svg>
<span class="social-link__title">{{ link[1].title }}</span>
</a>
2017-06-29 14:36:26 +02:00
{% endunless %}
2017-06-15 19:16:45 +02:00
{% endfor %}
</div>
</div>
2017-06-15 18:54:34 +02:00
</div>
2017-06-15 19:16:45 +02:00
2017-06-15 18:54:34 +02:00
</section>
2017-06-15 19:16:45 +02:00
{% include sections/section-newsletter.html %}