Skip to content

Commit

Permalink
feat: Docs v0.1.0 (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
darioAnongba authored Sep 2, 2024
1 parent 4967148 commit c831103
Show file tree
Hide file tree
Showing 28 changed files with 876 additions and 149 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
release:
permissions:
contents: write

runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}

- name: Log in to DigitalOcean Container Registry with short-lived credentials
run: doctl registry login --expiry-seconds 14400

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
target: serve
tags: |
registry.digitalocean.com/swissknife/docs:latest
registry.digitalocean.com/swissknife/docs:${{ github.ref_name }}
45 changes: 45 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# syntax=docker/dockerfile:1

# Stage 1: Base image.
## Start with a base image containing NodeJS so we can build Docusaurus.
FROM node:lts as base
## Disable colour output from yarn to make logs easier to read.
ENV FORCE_COLOR=0
## Enable corepack.
RUN corepack enable
## Set the working directory to `/opt/docusaurus`.
WORKDIR /opt/docusaurus

# Stage 2a: Development mode.
FROM base as dev
## Set the working directory to `/opt/docusaurus`.
WORKDIR /opt/docusaurus
## Expose the port that Docusaurus will run on.
EXPOSE 3000
## Run the development server.
CMD [ -d "node_modules" ] && yarn start --host 0.0.0.0 --poll 1000 || yarn install && yarn start --host 0.0.0.0 --poll 1000

# Stage 2b: Production build mode.
FROM base as prod
## Set the working directory to `/opt/docusaurus`.
WORKDIR /opt/docusaurus
## Copy over the source code.
COPY . /opt/docusaurus/
## Install dependencies with `--immutable` to ensure reproducibility.
RUN yarn install --immutable
## Build the static site.
RUN yarn build

# Stage 3a: Serve with `docusaurus serve`.
FROM prod as serve
## Expose the port that Docusaurus will run on.
EXPOSE 3000
## Run the production server.
CMD ["yarn", "serve", "--host", "0.0.0.0", "--no-open"]

# Stage 3b: Serve with Caddy.
FROM caddy:2-alpine as caddy
## Copy the Caddyfile.
COPY --from=prod /opt/docusaurus/Caddyfile /etc/caddy/Caddyfile
## Copy the Docusaurus build output.
COPY --from=prod /opt/docusaurus/build /var/docusaurus
58 changes: 19 additions & 39 deletions docs/account/index.mdx
Original file line number Diff line number Diff line change
@@ -1,47 +1,27 @@
---
title: Numeraire Account
sidebar_position: 1
image: /img/social.png
---

# Tutorial Intro
Numeraire Account is the easiest gateway to the Bitcoin ecosystem.

Let's discover **Docusaurus in less than 5 minutes**.
You can get started by [registering a Numeraire account](account/register.mdx).

## Getting Started
<div class="center-container">
<img
src="/img/article_images/account/wallet_overview.png"
alt="Numeraire Account"
/>
</div>

Get started by **creating a new site**.
### What can I do with a Numeraire Account?

Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**.

### What you'll need

- [Node.js](https://nodejs.org/en/download/) version 18.0 or above:
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.

## Generate a new site

Generate a new Docusaurus site using the **classic template**.

The classic template will automatically be added to your project after you run the command:

```bash
npm init docusaurus@latest my-website classic
```

You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor.

The command also installs all necessary dependencies you need to run Docusaurus.

## Start your site

Run the development server:

```bash
cd my-website
npm run start
```

The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there.

The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.

Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes.
- Access to a powerful and user-friendly dashboard
- Send and receive Bitcoin at the speed of light
- Register a LN address (*your_username@numeraire.tech*)
- Send and receive Zaps on Nostr
- Sort and filter your transactions
- Manage a list of contacts
- Generate invoices
- And much more...
7 changes: 7 additions & 0 deletions docs/account/register.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Getting Started
sidebar_position: 2
image: /img/social.jpg
---

To register a new account, head to the [Dashboard](https://app.numeraire.tech/login) and click on the "Sign up" link. Fill in the required information or login using your favorite social platform.
9 changes: 9 additions & 0 deletions docs/developers/api-keys.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: API Keys
sidebar_position: 2
image: /img/social.jpg
---

(WIP - Feature Coming soon)

API Keys are used to authenticate requests to the [Numeraire API](https://api.numeraire.tech/docs). They are generated in the [Dashboard](https://app.numeraire.tech) and can be used to access the API endpoints.
50 changes: 11 additions & 39 deletions docs/developers/index.mdx
Original file line number Diff line number Diff line change
@@ -1,47 +1,19 @@
---
title: Numeraire for Developers
sidebar_position: 1
image: /img/social.png
---

# Tutorial Intro
Happy that you are interested in integrating and building on Bitcoin! We are here to help you get started.

Let's discover **Docusaurus in less than 5 minutes**.
:::info
This documentation is a work in progress, we strongly appreciate any feedback or contribution you may have. Theses docs are open source and can be found on [**GitHub**](https://github.com/bitcoin-numeraire/doc)
:::

## Getting Started
## API Access

Get started by **creating a new site**.
Whether registering a [Numeraire Account](account/index.mdx) or deploying your own [Numeraire SwissKnife](swissknife/index.mdx), developers can access all the features via [API Keys](developers/api-keys.mdx) and [webhooks](developers/webhooks.mdx) through the [REST API](https://api.numeraire.tech/docs).

Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**.

### What you'll need

- [Node.js](https://nodejs.org/en/download/) version 18.0 or above:
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.

## Generate a new site

Generate a new Docusaurus site using the **classic template**.

The classic template will automatically be added to your project after you run the command:

```bash
npm init docusaurus@latest my-website classic
```

You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor.

The command also installs all necessary dependencies you need to run Docusaurus.

## Start your site

Run the development server:

```bash
cd my-website
npm run start
```

The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there.

The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.

Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes.
:::tip
If you cannot find what you are looking for, we will be happy to discuss with you potential new features or improvements. Please reach out to us by opening a [**GitHub issue**](https://github.com/swissknife/issues) or by contacting us on [**Twitter**](http://x.com/NumeraireBTC) or [**Nostr**](https://nostr.com/npub1m8pwckdf3n5lyd2m463ad3u4kk98qmwfs9s7hrmj6knd07frenlsfr0uje)
:::
10 changes: 10 additions & 0 deletions docs/developers/webhooks.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Webhooks
sidebar_position: 3
image: /img/social.jpg
---

(WIP - Feature Coming soon)

Webhooks are a way for an app to provide other applications with real-time information. A webhook delivers data to other applications as it happens, meaning you get data immediately.
Unlike typical APIs where you would need to poll for data very frequently in order to get it real-time. This makes webhooks much more efficient for both provider and consumer.
62 changes: 62 additions & 0 deletions docs/glossary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
title: Bitcoin Glossary
description: A glossary to aid you in your Bitcoin journey!
sidebar_position: 5
image: /img/social.png
---

This glossary is open source and consistently being updated. If you'd like a term to be added, please [create an issue](https://github.com/bitcoin-numeraire/doc/issues) or create a pull request and define one yourself!

WIP...

## A

## B

## C

## D

## E

## F

## G

## H

## I

## J

## K

## L

## M

## N

## O

## P

## Q

## R

## S

## T

## U

## V

## W

## X

## Y

## Z
Loading

0 comments on commit c831103

Please sign in to comment.