The SNI website is comprised of a headless CMS built with FastAPI and a frontend built with NextJS.
The server relies on Docker Compose for environment management. Ensure Docker Compose is installed on your system. To aid in local development, just
commands are also provided.
Getting Started:
cd server
.docker compose -f docker-compose.local.yml build
just build
for a simplified process.docker compose -f docker-compose.local.yml up -d
just up
for convenience.This will automatically handle data migrations and imports.
API Access: The API is accessible at http://localhost:8000
.
Local Document Serving: For local serving of PDFs, ePubs, etc., download the necessary files from here and place them in server/static/docs
.
The frontend uses pnpm
for package management. Ensure pnpm
is installed before proceeding.
Getting Started:
cd client
./etc/hosts
file with satoshi.localhost
:
127.0.0.1 satoshi.localhost
::1 satoshi.localhost
Note: if you do not want these redirects, instead add .env.local
to the client directory:
MAP_DOMAIN=false
pnpm i
.pnpm dev
.Website Access: The site is available at http://localhost:3000
.
The SNI platform is designed with i18n and l10n at its core, actively supporting and encouraging the translation of content across various sections, including the Mempool, the library, content pages, and application strings.
To contribute Mempool translations:
Markdown Front Matter: Include the required metadata using the schema below:
title: # Translated post title
slug: # Translated slug (ASCII only) (Optional)
excerpt: # Key quote (refer to English posts) (Optional)
translation_url: # Original translation URL (Optional)
translation_site: # Original publication name (Optional)
translation_site_url: # Original publication URL (Optional)
translators: # List of translator slugs (Optional)
image_alt: # Translated header image alt text (Optional)
File Placement: Save the markdown file in server/content/mempool
with the naming convention <slug>.<ietf-code>.md
(e.g., speculative-attack.es.md
).
For library content translations, follow these guidelines:
Markdown Front Matter: Utilize the schema below for metadata:
title: # Translated document title
slug: # Translated slug (ASCII only) (Optional)
subtitle: # Translated subtitle (Optional)
display_title: # Display title in the translated language (Optional)
external: # Source URL of the translation (Optional)
sort_title: # Title for sorting purposes (Optional)
image_alt: # Translated document header image alt text (Optional)
formats: # Available formats [pdf, epub, mobi, txt] (Optional)
translators: # Translator slugs list (Optional)
File Placement: Save the markdown file in server/content/library
with the naming convention <slug>.<ietf-code>.md
(e.g., bitcoin.es.md
).
client/content/pages
and add localized files using the <filename>.<ietf-code>.md
format.client/locales
.Locales
and LocaleType
in server/sni/constants.py
, as well as languages
and locales
in client/i18n.ts
. Then, execute pnpm translate:extract
within the client
directory.NakamotoInstitute.org is licensed under the GNU Affero License.