From 3cb81ddbf2334a4a56cb7189de184c9a67ce0d3e Mon Sep 17 00:00:00 2001 From: gagdiez Date: Fri, 9 Feb 2024 12:23:17 +0100 Subject: [PATCH] Simplify docs structure (#1707) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: back to single page for build * feat: re-org into single page * fix: landing pages * Update docs/2.develop/contracts/whatiscontract.md Co-authored-by: Damián Parrino * Update docs/2.develop/whataredatasolutions.md Co-authored-by: Damián Parrino * fix: link --------- Co-authored-by: Damián Parrino --- docs/2.develop/contracts/quickstart.md | 7 +- docs/2.develop/contracts/whatiscontract.md | 35 +- docs/2.develop/integrate/backend.md | 2 +- docs/2.develop/web3-apps/quickstart.md | 27 + docs/2.develop/welcome.md | 68 +- docs/2.develop/whataredatasolutions.md | 40 + .../examples/frontend-multiple-contracts.md | 3 +- docs/3.tutorials/welcome.md | 19 +- docs/7.primitives/whatareprimitives.md | 45 ++ docs/bos/dev/intro.md | 5 +- docs/bos/tutorial/quickstart.md | 8 +- docs/index.md | 24 +- website/docusaurus.config.js | 35 +- website/sidebars.js | 724 +++++++++--------- website/src/css/custom.scss | 44 +- 15 files changed, 595 insertions(+), 491 deletions(-) create mode 100644 docs/2.develop/web3-apps/quickstart.md create mode 100644 docs/2.develop/whataredatasolutions.md create mode 100644 docs/7.primitives/whatareprimitives.md diff --git a/docs/2.develop/contracts/quickstart.md b/docs/2.develop/contracts/quickstart.md index f6355fc0b27..db8a963c667 100644 --- a/docs/2.develop/contracts/quickstart.md +++ b/docs/2.develop/contracts/quickstart.md @@ -1,7 +1,7 @@ --- id: quickstart title: Hello Contract -sidebar_label: ⭐ Quickstart +sidebar_label: Quickstart ✨ --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; @@ -11,11 +11,6 @@ import {CodeTabs, Language, Github} from "@site/src/components/codetabs" In this quickstart tutorial, we will guide you in creating your first smart contract in the NEAR **testnet** that stores and retrieves a greeting. - -:::info -This quickstart is dedicated to creating smart contracts. We also have one dedicated only to [frontends](../integrate/quickstart.md) -::: - --- ## Prerequisites diff --git a/docs/2.develop/contracts/whatiscontract.md b/docs/2.develop/contracts/whatiscontract.md index 803dfb7a415..6043bc3d6e2 100644 --- a/docs/2.develop/contracts/whatiscontract.md +++ b/docs/2.develop/contracts/whatiscontract.md @@ -1,11 +1,13 @@ --- id: whatisacontract title: What is a Smart Contract? -sidebar_label: What is a Smart Contract? +sidebar_label: What is a Contract? --- Smart contracts are pieces of **executable code** that live in a NEAR account. They can **store data**, **perform transactions** in the account’s name, and **expose methods** so other accounts can interact with them. +![img](/docs/assets/welcome-pages/contracts.png) + Do not worry if you don't know how smart-contract blockchains work. As a developer, it is sufficient to understand that NEAR smart-contracts: 1. Have **limited** computational resources. 2. Interact with other contracts in an **asynchronous** way. @@ -17,21 +19,24 @@ Smart contracts **cannot perform HTTP requests**, meaning they can't fetch data --- -## Where do Contracts Live? -Smart Contracts are deployed into [**NEAR accounts**](../../1.concepts/basics/accounts/introduction.md). Any NEAR account can hold a contract, needing to pay for the **contract's code** and the **data it stores**. Since storage is cheap (0.01Ⓝ per kb) deploying a contract generally costs just a few cents. - -![img](/docs/assets/welcome-pages/contract-landing.png) +## Where do contracts live? +Smart Contracts are deployed into [**NEAR accounts**](../../1.concepts/basics/accounts/introduction.md). Any NEAR account can hold a contract, needing to pay for the **contract's code** and the **data it stores**. Once in an account, anyone can interact with the contract. Thanks to the underlying network structure, executing code from a contract is both **fast** (avg. 1.4s finality) and **cheap**. Moreover, **read-only** operations are **free for everyone**. +:::tip +Storing 100kb costs 1Ⓝ, so deploying a contract generally costs only a few $NEARs. +::: + --- -## Life Cycle of a Contract +## Development flow -Just like any piece of software, smart contracts have a “life cycle” - starting with its creation and ending with monitoring it, all of which we cover in our documentation. +Just like any piece of software, smart contracts have a development flow - starting with its creation and ending with monitoring it, all of which we cover in our documentation. ![img](/docs/assets/welcome-pages/contract-lifecycle.png) +The development flow can be summarized as follows: - [**Scaffold**](../contracts/quickstart.md): The simplest way to create a project is by starting from a template. - [**Build**](../contracts/): To write a contract developers can choose between Javascript and Rust. - [**Test**](../testing/introduction.md): Our Sandbox enables to simulate interactions with one or multiple contracts in a realistic environment. @@ -39,6 +44,7 @@ Just like any piece of software, smart contracts have a “life cycle” - start - [**Use**](https://mynearwallet.com): Any user can interact with the contract through their NEAR Wallet. - [**Monitor**](../monitor.md): The contract's activity can be monitored through simple APIs. +#### Supported Languages During the whole cycle, developers can choose between [JavaScript](https://www.learn-js.org/) and [Rust](https://www.rust-lang.org/), allowing them to use their favorite language at each step of their journey.
@@ -50,14 +56,9 @@ We envision that in the future, more languages will be supported and the support --- -## Contract Primitives -Contract primitives are the fundamental building blocks that can be combined to create a fully functional application. Blockchain primitives include Fungible Tokens (FT), Non Fungible Tokens (NFT), Decentralized Autonomous organizations (DAO), Link Drops and more. - -- [Fungible Tokens (FT)](/primitives/ft): Fungible token is representation of an asset on a blockchain that is interchangeable. Besides the native NEAR token, users can issue their own fungible tokens or use those that are already present in the ecosystem and created by other users or projects. - -- [Non Fungible Tokens (NFT)](/primitives/nft): In contrast with fungible tokens, non-fungible tokens (NFT) are unitary and therefore unique. This makes NFTs ideal to represent ownership of assets such as a piece of digital content, or a ticket for an event. - -- [Decentralized Autonomous organizations (DAO)](/primitives/dao): Decentralized Autonomous Organizations (DAOs) are self-organized groups that form around common purposes. Membership, decision making, and funding are coordinated by publicly voting on proposals through a smart contract. - -- [LinkDrops](/primitives/linkdrop): LinkDrops are an easy way to distribute digital assets (NFTs, FTs) via links. You provide a link for users and they can claim your drop. +## Contract primitives +Contract primitives such as FT, NFT, and DAOs are fundamental building blocks that can be combined to create awesome user experiences such as reward tokens, decision-making tools, and marketplaces. +:::tip +Check our section on [primitives](../../7.primitives/whatareprimitives.md) to learn more about them +::: \ No newline at end of file diff --git a/docs/2.develop/integrate/backend.md b/docs/2.develop/integrate/backend.md index 09ff956aaa4..5101ed6933e 100644 --- a/docs/2.develop/integrate/backend.md +++ b/docs/2.develop/integrate/backend.md @@ -1,6 +1,6 @@ --- id: backend-login -title: Login with NEAR +title: Authenticate NEAR Users --- Recently NEAR has approved a new standard that, among other things, enables users to authenticate into a backend service. diff --git a/docs/2.develop/web3-apps/quickstart.md b/docs/2.develop/web3-apps/quickstart.md new file mode 100644 index 00000000000..c0061ae0f60 --- /dev/null +++ b/docs/2.develop/web3-apps/quickstart.md @@ -0,0 +1,27 @@ +--- +id: whatareweb3apps +title: What are Web3 Apps? +--- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import {CodeTabs, Language, Github} from "@site/src/components/codetabs" + +Web3 Applications - also known as decentralized apps (dApps) - leverage [smart contracts](../contracts/whatiscontract.md) and blockchain data to offer **transparency**, **security** and **giving back control** to users over their assets and data. + +![img](/docs/assets/welcome-pages/examples.png) + +NEAR simplifies building Web3 apps for the general public, making it easy to **interact** with different blockchains, while helping to **onboard users** that are not familiarized with crypto. + +--- + +### Why Integrating NEAR to your App? +Any application can benefit from integrating NEAR, including games, financial services, social platforms, and more. + +- **Easy Onboarding**: Users can create accounts using familiar methods such as email login. Furthermore, applications can cover all transactional costs for their users, so they never have to worry about handling crypto. + +- **Ownership**: Users have true ownership of digital assets within their accounts. Fungible Tokens can be used as reward systems, Non-Fungible Tokens can denote holdings, and wallets can represent digital identities. + +- **Fast, Cheap and Scalable**: Near’s efficient consensus mechanism and fee model make transactions cost effective for both users and developers. + +- **Security & Transparency**: All transactions and data on the blockchain is transparent and auditable, thus ensuring trust in the application’s behavior. + diff --git a/docs/2.develop/welcome.md b/docs/2.develop/welcome.md index 56745245eeb..786119404c0 100644 --- a/docs/2.develop/welcome.md +++ b/docs/2.develop/welcome.md @@ -1,41 +1,57 @@ --- id: welcome -title: Developer Documentation +title: Build on NEAR sidebar_label: Home hide_table_of_contents: true +hide_breadcrumb: true --- + import {FeatureList, Column, Feature} from "@site/src/components/featurelist" import ContactUs from '@site/src/components/ContactUs.mdx'; - -Welcome! Here you will find documentation on how to develop decentralized apps using NEAR. - -Do not worry if you are new to blockchain technologies, we will get you up to speed in no time. +Welcome! Here you will find all the information on what you can **build** on NEAR and **how to** build it. Do not worry if you are new to Web3 or Blockchain, we are here to **guide you** through the process of learning. - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + - - - - - - - + + + + diff --git a/docs/2.develop/whataredatasolutions.md b/docs/2.develop/whataredatasolutions.md new file mode 100644 index 00000000000..a4d8ce303bf --- /dev/null +++ b/docs/2.develop/whataredatasolutions.md @@ -0,0 +1,40 @@ +--- +id: whataredatasolutions +title: What is Data Infrastructure? +--- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import {CodeTabs, Language, Github} from "@site/src/components/codetabs" + +NEAR offers ready-to-use solutions to access and monitor on-chain data easily. This is very useful to automate actions based on specific **events**, cache data to **reduce latency**, gather **usage data** of the blockchain, and even **study user preferences**. + +![img](/docs/assets/welcome-pages/data-lake.png) + +NEAR offers three main solutions to access and monitor on-chain data: [**BigQuery Public Dataset**](#bigquery-public-dataset), [**QueryAPI**](#queryapi-indexers-made-simple), and [**NEAR Lake**](#near-lake). Each of these solutions is designed to fit different needs and use cases, and can be used in combination to create a complete data infrastructure for your application. + +--- + +## [BigQuery: Public Dataset](/bos/queryapi/big-query) +A large dataset with on-chain data publicly available on Google Cloud Platform. Obtain near real-time blockchain data using simple SQL queries. **All the data, zero setup**. + +- Instant insights: Historic on-chain data queried at scale. No need to run your own infrastructure. +- Cost-effective: Eliminate the need to store and process bulk NEAR Protocol data. Query as little or as much data as you like. +- As easy as SQL: No prior experience with blockchain technology is required. Just bring a general knowledge of SQL to unlock insights. + +
+ +## [QueryAPI: Indexers Made Simple](/bos/queryapi/intro) + +A fully managed solution to build indexer functions, extract on-chain data, and easily query it using GraphQL endpoints and subscriptions. + +- Your data, your way: Decide how you want to store data. Design the tables and databases that better suit your needs. +- Indexers made simple: Create the logic of your indexer and we will execute it for you. Forget about infrastructure—focus on solutions. +- Plug & play to your app: Fetch your data from any application through our API. Leverage GraphQL to query exactly what you need. + +
+ +## [NEAR Lake](/tools/near-lake) +A solution that watches over the NEAR network and stores all the events for your easy access. + +- Cost-efficient solution: Cost-efficient solution for building self-hosted indexers in Rust, JavaScript, Python, Go and other languages +- Streamlined data management: Use NEAR Lake Framework to stream blocks to your server directly from NEAR Lake \ No newline at end of file diff --git a/docs/3.tutorials/examples/frontend-multiple-contracts.md b/docs/3.tutorials/examples/frontend-multiple-contracts.md index 655895f1d10..dadbc297fa1 100644 --- a/docs/3.tutorials/examples/frontend-multiple-contracts.md +++ b/docs/3.tutorials/examples/frontend-multiple-contracts.md @@ -1,6 +1,7 @@ --- id: frontend-multiple-contracts -title: Frontend Multiple Contracts +title: Frontend Interacting with Multiple Contracts +sidebar_label: Frontend & Multiple Contracts --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; diff --git a/docs/3.tutorials/welcome.md b/docs/3.tutorials/welcome.md index d041cec53e4..7e8fd227cce 100644 --- a/docs/3.tutorials/welcome.md +++ b/docs/3.tutorials/welcome.md @@ -1,8 +1,8 @@ --- id: welcome title: Examples & Tutorials +sidebar_label: Home hide_table_of_contents: true - --- import {FeatureList, Column, Feature} from "@site/src/components/featurelist" @@ -21,17 +21,20 @@ Explore our collection of Examples and Tutorials - - - - - + + + + + - - + + diff --git a/docs/7.primitives/whatareprimitives.md b/docs/7.primitives/whatareprimitives.md new file mode 100644 index 00000000000..30d8e95a5c5 --- /dev/null +++ b/docs/7.primitives/whatareprimitives.md @@ -0,0 +1,45 @@ +--- +id: whatareprimitives +title: What are Primitives? +--- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import {CodeTabs, Language, Github} from "@site/src/components/codetabs" + +Primitives are fundamental building blocks that can be combined to create a fully functional application. Blockchain primitives include [Fungible Tokens (FT)](#fungible-tokens-ft), [Non Fungible Tokens (NFT)](#non-fungible-tokens-nft), [Decentralized Autonomous organizations (DAO)](#decentralized-autonomous-organizations-dao), [Link Drops](#linkdrops) and more. + +--- + +#### Fungible Tokens (FT) +[Fungible tokens](/primitives/ft) represent an **asset** on a blockchain that is **interchangeable**. Besides the native NEAR token, users can issue their own fungible tokens or use those that are already present in the ecosystem. + +:::tip +Fungible Tokens are ideal to create **reward systems**, **fair tickets** and any other type of **token**. +::: + +
+ +#### Non Fungible Tokens (NFT) +In contrast with fungible tokens, each [non-fungible token (NFT)](/primitives/nft) is **unitary** and therefore **unique**. Users can create their own non-fungible token, transfer to other users, or exchange them in marketplaces. + +:::tip +NFTs are ideal to represent **ownership of assets** such as **collectibles**, **event tickets** and other unique assets. +::: + +
+ +#### Decentralized Autonomous organizations (DAO) +[Decentralized Autonomous Organizations (DAOs)](/primitives/dao) are **self-organized groups** that form around common purposes. Membership, decision making, and funding are **coordinated** by **publicly voting** on proposals through a smart contract. + +:::tip +DAOs are ideal to create **decentralized governance**, **funding**, and **decision-making** tools. +::: + +
+ +### LinkDrops +[LinkDrops](/primitives/linkdrop) are an easy way to **distribute digital assets** (NFTs, FTs) via links. You simply **provide a link** for users and they can **claim** your drop. + +:::tip +LinkDrops are ideal to do **drops**, and **onboard new users** into Web3 apps. +::: \ No newline at end of file diff --git a/docs/bos/dev/intro.md b/docs/bos/dev/intro.md index 11264be531a..e96932d339b 100644 --- a/docs/bos/dev/intro.md +++ b/docs/bos/dev/intro.md @@ -1,10 +1,8 @@ --- id: intro -title: Dev Environments +title: Choose your Dev Environment --- -Building, deploying, and collaborating within a new framework can be challenging. The NEAR community has created helpful workflows using new tools to simplify your development workflow. - The environments in which you can develop `Components` are divided into two categories: - [Web Tools](#web-tools): Online tools that allow you to quickly start building and sharing components. @@ -12,7 +10,6 @@ The environments in which you can develop `Components` are divided into two cate :::tip Handling collaborations If you plan to collaborate with multiple people, we recommend you to check [this repository template](https://github.com/near-examples/bos-components) which automatically deploys components each time a PR is merged. - ::: --- diff --git a/docs/bos/tutorial/quickstart.md b/docs/bos/tutorial/quickstart.md index c056c133371..f58d1239d8b 100644 --- a/docs/bos/tutorial/quickstart.md +++ b/docs/bos/tutorial/quickstart.md @@ -1,7 +1,7 @@ --- id: quickstart -title: Hello Components -sidebar_label: ⭐ Overview +title: What are NEAR Components? +sidebar_label: What is a Component? --- import Tabs from '@theme/Tabs'; @@ -10,8 +10,10 @@ import {WidgetEditor} from "@site/src/components/social-widget" NEAR Components are a new way to build web applications. They are composable, reusable and decentralized. +![img](/docs/assets/welcome-pages/bos-big.png) + :::tip -You can login to interact with some of these examples. +You can login to interact with the examples in this section. ::: --- diff --git a/docs/index.md b/docs/index.md index cb0e464f80d..2990065d7bb 100644 --- a/docs/index.md +++ b/docs/index.md @@ -18,46 +18,46 @@ Welcome, this is the starting point for all NEAR documentation. Learn to build a

Understanding NEAR

- Learn what NEAR is and how it works. + Learn what NEAR is and how it works
- +
Solutions
-

NEAR Primitives

- Reliable solutions powered by NEAR. +

Web3 Applications

+ Supercharge your App using NEAR
@@ -70,7 +70,7 @@ Welcome, this is the starting point for all NEAR documentation. Learn to build a

NEAR Tools

- Info on our SDK, API, CLI, and more. + Discover our SDK, API, CLI, and more
@@ -83,7 +83,7 @@ Welcome, this is the starting point for all NEAR documentation. Learn to build a

Query On-Chain Information

- Learn about indexers and our data lake. + Learn about indexers and our data lake
diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index cec63873d7c..b57247eb009 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -110,37 +110,14 @@ const config = { position: 'left', }, { + to: '/develop/welcome', label: 'Build', position: 'left', - items: [ - { label: 'Smart Contracts', href: '/develop/contracts/welcome' }, - { label: 'Web3 Applications', href: '/develop/integrate/welcome' }, - { label: 'Data Solutions', href: '/develop/monitor' }, - { - type: 'html', - value: '
Integrations ', - }, - { label: "Backend", href: "/develop/integrate/backend-login" }, - { label: "Frontend", href: "/develop/integrate/frontend" }, - { label: "Exchanges", href: "/integrator/exchange-integration" }, - { label: "Rollups DA", href: "/data-availability/welcome" }, - ], }, { - label: "Primitives", - position: "left", - items: [ - { label: 'Overview', href: '/primitives/welcome' }, - { - type: 'html', - value: '
', - }, - { label: "LinkDrops", href: "/primitives/linkdrop" }, - { label: "Fungible Tokens", href: "/primitives/ft" }, - { label: "Non-Fungible Tokens", href: "/primitives/nft" }, - { label: "Decentralized Exchanges", href: "/primitives/dex" }, - { label: "Autonomous Organizations", href: "/primitives/dao" }, - ] + to: '/tutorials/welcome', + label: 'Tutorials', + position: 'left', }, { type: 'dropdown', @@ -187,6 +164,10 @@ const config = { href: 'https://near-nodes.io', label: 'Validator Docs', }, + { + href: "https://aurora.dev", + label: "Aurora (EVM)", + } ], }, { diff --git a/website/sidebars.js b/website/sidebars.js index 75c4d193ccb..89529173875 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -101,106 +101,151 @@ const sidebar = { "concepts/web3/nfts" ] ], - "contracts": [ - "develop/contracts/welcome", - "develop/contracts/whatisacontract", + "build": [ + "develop/welcome", { "type": "html", "value": "
" }, { "type": "html", - "value": " Building Smart Contracts " + "value": " Smart Contracts " }, - [ - "develop/contracts/quickstart", - { - - "Anatomy of a Contract": [ - "develop/contracts/basics", - "develop/contracts/anatomy", - "develop/contracts/environment/environment", - "develop/contracts/storage", - "develop/contracts/actions", - "develop/contracts/crosscontract", - "develop/contracts/security/checklist", - { - "type": "html", - "value": "
" - }, - "develop/contracts/serialization" - ] - }, - { - "Test the Contract": [ - "develop/testing/introduction", - "develop/testing/unit-test", - "develop/testing/integration-test", - { - "type": "html", - "value": "
" - }, - "develop/testing/kurtosis-localnet", - ] - }, - { - "Deploy, Update & Lock": [ - "develop/deploy", - "develop/upgrade", - "develop/lock" - ] - }, - { - "type": "category", - "label": "Security", - "link": { - "type": "doc", - "id": "develop/contracts/security/welcome" + "develop/contracts/whatisacontract", + { + "Building Smart Contracts": [ + "develop/contracts/quickstart", + { + "Anatomy of a Contract": [ + "develop/contracts/basics", + "develop/contracts/anatomy", + "develop/contracts/environment/environment", + "develop/contracts/storage", + "develop/contracts/actions", + "develop/contracts/crosscontract", + "develop/contracts/security/checklist", + { + "type": "html", + "value": "
" + }, + "develop/contracts/serialization" + ] }, - "items": [ - "develop/contracts/security/checklist", - "develop/contracts/security/storage", - "develop/contracts/security/callbacks", - "develop/contracts/security/one-yocto", - "develop/contracts/security/sybil", - "develop/contracts/security/frontrunning", - "develop/contracts/security/reentrancy", - "develop/contracts/security/random", - { - "type": "html", - "value": "
" + { + "Test the Contract": [ + "develop/testing/introduction", + "develop/testing/unit-test", + "develop/testing/integration-test", + { + "type": "html", + "value": "
" + }, + "develop/testing/kurtosis-localnet", + ] + }, + { + "Deploy, Update & Lock": [ + "develop/deploy", + "develop/upgrade", + "develop/lock" + ] + }, + { + "type": "category", + "label": "Security", + "link": { + "type": "doc", + "id": "develop/contracts/security/welcome" }, - "develop/contracts/security/bounty" - ] - } - ], + "items": [ + "develop/contracts/security/checklist", + "develop/contracts/security/storage", + "develop/contracts/security/callbacks", + "develop/contracts/security/one-yocto", + "develop/contracts/security/sybil", + "develop/contracts/security/frontrunning", + "develop/contracts/security/reentrancy", + "develop/contracts/security/random", + { + "type": "html", + "value": "
" + }, + "develop/contracts/security/bounty" + ] + }, + { + "type": "html", + "value": "
" + }, + { + "type": "html", + "value": " 📖 Tutorials ", + }, + ] + }, { "type": "html", "value": "
" }, { "type": "html", - "value": " Standards & Primitives " + "value": " Multi-Chain Components " }, + "bos/tutorial/quickstart", { - "type": "link", - "label": "Fungible Tokens (FT) ↗", - "href": "/primitives/ft" + "Building Web3 Components": [ + "bos/dev/intro", + { + "Anatomy of a Component": [ + "bos/api/state", + "bos/api/web-methods", + "bos/api/builtin-components", + "bos/api/near", + "bos/api/social", + "bos/api/notifications", + "bos/queryapi/bos-components" + ] + }, + "bos/tutorial/bos-gateway", + { + "type": "html", + "value": "
" + }, + { + "type": "html", + "value": " 📖 Tutorials ", + }, + ] }, { - "type": "link", - "label": "Non-Fungible Tokens (NFT) ↗", - "href": "/primitives/nft" + "type": "html", + "value": "
" }, { - "type": "link", - "label": "Autonomous Organizations (DAO)", - "href": "/primitives/dao" + "type": "html", + "value": " Web3 Applications " }, + "develop/web3-apps/whatareweb3apps", { - "type": "link", - "label": "Oracles ↗", - "href": "/primitives/oracles" + "Building Web3 Applications": [ + "develop/integrate/quickstart-frontend", + "develop/integrate/frontend", + "develop/integrate/frontend-components", + "develop/relayers/build-relayer", + { + "Backend": [ + "develop/integrate/backend-login", + ] + }, + { + "type": "html", + "value": "
" + }, + { + "type": "html", + "value": " 📖 Tutorials ", + }, + ], }, { "type": "html", @@ -208,191 +253,290 @@ const sidebar = { }, { "type": "html", - "value": " Examples & Tutorials " + "value": " Primitives (FT, NFT, ...) " }, + "primitives/whatareprimitives", { - "Examples": [ - "tutorials/examples/guest-book", - "tutorials/examples/xcc", - "tutorials/examples/coin-flip", - "tutorials/examples/factory", - "tutorials/examples/advanced-xcc", - "tutorials/examples/update-contract-migrate-state" + "Primitives & Standards": [ + "primitives/ft", + "primitives/nft", + "primitives/linkdrop", + "primitives/oracles", + "primitives/dao", + "primitives/dex", + { + "type": "html", + "value": "
" + }, + { + "type": "html", + "value": " 📖 Tutorials ", + }, ] }, { - "Tutorials": [ + "type": "html", + "value": "
" + }, + { + "type": "html", + "value": " Data Infrastructure " + }, + "develop/whataredatasolutions", + { + "NEAR Data Infrastructure": [ + "bos/queryapi/big-query", { - "Non Fungible Tokens": [ - "tutorials/nfts/minting-nfts", - "tutorials/nfts/minting-nft-frontend", - "tutorials/nfts/minecraft-nfts", + "QueryAPI": [ + "bos/queryapi/intro", + "bos/queryapi/how-it-works", { "type": "link", - "label": "Building a Frontend", - "href": "https://github.com/near-examples/nft-tutorial-frontend" - } + "label": "Limitations", + "href": "/bos/queryapi/intro#known-limitations" + }, + "bos/community/indexers", + "bos/queryapi/best-practices", + "bos/queryapi/index-functions", + "bos/queryapi/context-object", + "bos/queryapi/query-data", + "bos/queryapi/migrate-from-near-lake", ] }, { - "Zero to Hero": [ + "Lake Framework": [ + "tools/near-lake", + "tutorials/indexer/near-lake-state-changes-indexer", + "tutorials/indexer/migrating-to-near-lake-framework", { - "Master NFTs on NEAR": [ + "Building Indexers": [ + "develop/lake/primitives", { - "🌐 Using the JavaScript SDK": [ - "tutorials/nfts/js/introduction", - "tutorials/nfts/js/predeployed-contract", - "tutorials/nfts/js/skeleton", - "tutorials/nfts/js/minting", - "tutorials/nfts/js/upgrade-contract", - "tutorials/nfts/js/enumeration", - "tutorials/nfts/js/core", - "tutorials/nfts/js/approvals", - "tutorials/nfts/js/royalty", - "tutorials/nfts/js/events", - "tutorials/nfts/js/marketplace" - ] + "type": "link", + "label": "NEAR Lake Primitives", + "href": "https://near.github.io/near-lake-framework-js/" }, - { - "🦀 Using the Rust SDK": [ - "tutorials/nfts/introduction", - "tutorials/nfts/predeployed-contract", - "tutorials/nfts/skeleton", - "tutorials/nfts/minting", - "tutorials/nfts/upgrade-contract", - "tutorials/nfts/enumeration", - "tutorials/nfts/core", - "tutorials/nfts/approvals", - "tutorials/nfts/royalty", - "tutorials/nfts/events", - "tutorials/nfts/marketplace", - "tutorials/nfts/series" - ] - } + "tutorials/indexer/js-lake-indexer", + "tutorials/indexer/python-lake-indexer", + "tutorials/indexer/nft-indexer", + "tutorials/indexer/python-nft-indexer" ] }, { - "Fungible Tokens 101": [ - "tutorials/fts/introduction", - "tutorials/fts/predeployed-contract", - "tutorials/fts/skeleton", - "tutorials/fts/defining-a-token", - "tutorials/fts/circulating-supply", - "tutorials/fts/registering-accounts", - "tutorials/fts/transfers", - "tutorials/fts/marketplace" + "Running NEAR Lake": [ + "tutorials/indexer/run-lake-indexer", + "tutorials/indexer/lake-start-options", + "tutorials/indexer/credentials" ] }, { - "Build a Crossword Game": [ - { - "type": "category", - "label": "Basics", - "items": [ - "tutorials/crosswords/basics/overview", - "tutorials/crosswords/basics/set-up-skeleton", - "tutorials/crosswords/basics/add-functions-call", - "tutorials/crosswords/basics/hashing-and-unit-tests", - "tutorials/crosswords/basics/simple-frontend" - ] - }, - { - "type": "category", - "label": "Beginner", - "items": [ - "tutorials/crosswords/beginner/overview", - "tutorials/crosswords/beginner/collections", - "tutorials/crosswords/beginner/structs-enums", - "tutorials/crosswords/beginner/actions", - "tutorials/crosswords/beginner/adding-a-puzzle", - "tutorials/crosswords/beginner/logging-in", - "tutorials/crosswords/beginner/logging-in-implementation" - ] - }, - { - "type": "category", - "label": "Intermediate", - "items": [ - "tutorials/crosswords/intermediate/overview", - "tutorials/crosswords/intermediate/access-key-solution", - "tutorials/crosswords/intermediate/use-seed-phrase", - "tutorials/crosswords/intermediate/linkdrop", - "tutorials/crosswords/intermediate/cross-contract-calls", - "tutorials/crosswords/intermediate/base64vecu8" - ] - } + "Lake Data Structures": [ + "develop/lake/structures/toc", + "develop/lake/structures/block", + "develop/lake/structures/chunk", + "develop/lake/structures/shard", + "develop/lake/structures/transaction", + "develop/lake/structures/receipt", + "develop/lake/structures/execution-outcome", + "develop/lake/structures/state-change" ] - } + }, ] - } + }, ] - }, + } + ], + "tutorials": [ + "tutorials/welcome", { "type": "html", "value": "
" }, { "type": "html", - "value": " Related Tools " + "value": " Examples " }, { - "type": "link", - "label": "Development Kit (SDK) ↗", - "href": "/sdk/welcome" + "Frontend & Smart Contract": [ + "tutorials/examples/count-near", + "tutorials/examples/guest-book", + "tutorials/examples/donation", + "tutorials/examples/xcc", + "tutorials/examples/coin-flip", + ] }, { - "type": "link", - "label": "NEAR API JS ↗", - "href": "/tools/near-api-js/quick-reference" + "Advanced Contracts": [ + "tutorials/examples/factory", + "tutorials/examples/advanced-xcc", + "tutorials/examples/update-contract-migrate-state", + ] }, + "tutorials/examples/frontend-multiple-contracts", { - "type": "link", - "label": "NEAR CLI ↗", - "href": "/tools/near-cli" + "type": "html", + "value": "
" }, { - "type": "link", - "label": "Remix IDE Plugin", - "href": "https://docs.welldonestudio.io/code/getting-started" + "type": "html", + "value": " Tutorials " }, { - "type": "html", - "value": "
" + "Components": [ + "bos/dev/bos-loader", + "bos/tutorial/interaction", + "bos/tutorial/ds-components", + "bos/tutorial/using-iframes", + "bos/tutorial/push-notifications", + "bos/tutorial/queryapi-websockets", + "bos/tutorial/ethers-js", + "bos/tutorial/ethers-js-best-practices", + "bos/tutorial/lido", + ] }, { - "type": "html", - "value": " Ethereum Ecosystem " + "Fungible Tokens 101 (FT)": [ + "tutorials/fts/introduction", + "tutorials/fts/predeployed-contract", + "tutorials/fts/skeleton", + "tutorials/fts/defining-a-token", + "tutorials/fts/circulating-supply", + "tutorials/fts/registering-accounts", + "tutorials/fts/transfers", + "tutorials/fts/marketplace" + ] }, { - "type": "link", - "label": "Aurora (EVM)", - "href": "https://aurora.dev" - } - ], - "primitives": [ - "primitives/welcome", + "Non-Fungible Tokens (NFT)": [ + "tutorials/nfts/minting-nfts", + "tutorials/nfts/minting-nft-frontend", + "tutorials/nfts/minecraft-nfts", + { + "type": "link", + "label": "Building a Frontend", + "href": "https://github.com/near-examples/nft-tutorial-frontend" + }, + { + "type": "html", + "value": "
" + }, + { + "🌐 Contract: Zero to Hero ": [ + "tutorials/nfts/js/introduction", + "tutorials/nfts/js/predeployed-contract", + "tutorials/nfts/js/skeleton", + "tutorials/nfts/js/minting", + "tutorials/nfts/js/upgrade-contract", + "tutorials/nfts/js/enumeration", + "tutorials/nfts/js/core", + "tutorials/nfts/js/approvals", + "tutorials/nfts/js/royalty", + "tutorials/nfts/js/events", + "tutorials/nfts/js/marketplace" + ] + }, + { + "🦀 Contract: Zero to Hero": [ + "tutorials/nfts/introduction", + "tutorials/nfts/predeployed-contract", + "tutorials/nfts/skeleton", + "tutorials/nfts/minting", + "tutorials/nfts/upgrade-contract", + "tutorials/nfts/enumeration", + "tutorials/nfts/core", + "tutorials/nfts/approvals", + "tutorials/nfts/royalty", + "tutorials/nfts/events", + "tutorials/nfts/marketplace", + "tutorials/nfts/series" + ] + } + ] + }, { - "type": "html", - "value": "
" + "Build a Crossword Game": [ + { + "type": "category", + "label": "Basics", + "items": [ + "tutorials/crosswords/basics/overview", + "tutorials/crosswords/basics/set-up-skeleton", + "tutorials/crosswords/basics/add-functions-call", + "tutorials/crosswords/basics/hashing-and-unit-tests", + "tutorials/crosswords/basics/simple-frontend" + ] + }, + { + "type": "category", + "label": "Beginner", + "items": [ + "tutorials/crosswords/beginner/overview", + "tutorials/crosswords/beginner/collections", + "tutorials/crosswords/beginner/structs-enums", + "tutorials/crosswords/beginner/actions", + "tutorials/crosswords/beginner/adding-a-puzzle", + "tutorials/crosswords/beginner/logging-in", + "tutorials/crosswords/beginner/logging-in-implementation" + ] + }, + { + "type": "category", + "label": "Intermediate", + "items": [ + "tutorials/crosswords/intermediate/overview", + "tutorials/crosswords/intermediate/access-key-solution", + "tutorials/crosswords/intermediate/use-seed-phrase", + "tutorials/crosswords/intermediate/linkdrop", + "tutorials/crosswords/intermediate/cross-contract-calls", + "tutorials/crosswords/intermediate/base64vecu8" + ] + } + ] }, { - "type": "html", - "value": " Standards " + "Data Infrastructure": + [ + "bos/tutorial/indexer-tutorials/posts-indexer", + "bos/tutorial/indexer-tutorials/hype-indexer", + "bos/tutorial/indexer-tutorials/nft-indexer", + "bos/tutorial/indexer-tutorials/feed-indexer", + "tutorials/indexer/near-lake-state-changes-indexer", + "tutorials/indexer/migrating-to-near-lake-framework", + { + "Building Indexers": [ + "develop/lake/primitives", + { + "type": "link", + "label": "NEAR Lake Primitives", + "href": "https://near.github.io/near-lake-framework-js/" + }, + "tutorials/indexer/js-lake-indexer", + "tutorials/indexer/python-lake-indexer", + "tutorials/indexer/nft-indexer", + "tutorials/indexer/python-nft-indexer" + ] + }, + { + "Running NEAR Lake": [ + "tutorials/indexer/run-lake-indexer", + "tutorials/indexer/lake-start-options", + "tutorials/indexer/credentials" + ] + }, + ] }, - "primitives/ft", - "primitives/nft", - "primitives/linkdrop", + + ], + "primitives": [ + "primitives/welcome", { "type": "html", "value": "
" }, { "type": "html", - "value": " Community Apps " + "value": " Standards " }, - "primitives/oracles", - "primitives/dao", - "primitives/dex", ], "tools": [ "tools/welcome", @@ -594,63 +738,6 @@ const sidebar = { "type": "html", "value": " Composable Apps " }, - "bos/tutorial/quickstart", - "bos/dev/intro", - { - "Anatomy of a Component": [ - "bos/api/state", - "bos/api/web-methods", - "bos/api/builtin-components", - "bos/api/near", - "bos/api/social", - "bos/api/notifications", - "bos/queryapi/bos-components" - ] - }, - "bos/tutorial/bos-gateway", - { - "Tutorials": [ - "bos/dev/bos-loader", - "bos/tutorial/interaction", - "bos/tutorial/ds-components", - "bos/tutorial/using-iframes", - "bos/tutorial/push-notifications", - "bos/tutorial/queryapi-websockets", - "bos/tutorial/ethers-js", - "bos/tutorial/ethers-js-best-practices", - "bos/tutorial/lido" - ] - }, - { - "type": "html", - "value": "
" - }, - { - "type": "html", - "value": " Web Apps " - }, - "develop/integrate/quickstart-frontend", - "develop/integrate/frontend", - "develop/integrate/frontend-components", - { - "type": "category", - "label": "Examples", - "items": [ - "tutorials/examples/count-near", - "tutorials/examples/donation", - "tutorials/examples/frontend-multiple-contracts" - ] - }, - { - "type": "html", - "value": "
" - }, - { - "type": "html", - "value": " Backend " - }, - "develop/relayers/build-relayer", - "develop/integrate/backend-login", { "type": "html", "value": "
" @@ -682,112 +769,7 @@ const sidebar = { } ], "indexers": [ - "develop/monitor", - { - "type": "html", - "value": "
" - }, - { - "type": "html", - "value": " QueryAPI " - }, - "bos/queryapi/intro", - "bos/queryapi/how-it-works", - { - "type": "link", - "label": "Limitations", - "href": "/bos/queryapi/intro#known-limitations" - }, - "bos/community/indexers", - "bos/queryapi/best-practices", - "bos/queryapi/index-functions", - "bos/queryapi/context-object", - "bos/queryapi/query-data", - "bos/queryapi/migrate-from-near-lake", - { - "Tutorials": [ - "bos/tutorial/indexer-tutorials/posts-indexer", - "bos/tutorial/indexer-tutorials/hype-indexer", - "bos/tutorial/indexer-tutorials/nft-indexer", - "bos/tutorial/indexer-tutorials/feed-indexer" - ] - }, - { - "type": "html", - "value": "
" - }, - { - "type": "html", - "value": " Data Analytics " - }, - "bos/queryapi/big-query", - "tools/indexer-for-explorer", - { - "type": "html", - "value": "
" - }, - { - "type": "html", - "value": " NEAR Lake Framework " - }, - "tools/near-lake", - "tutorials/indexer/near-lake-state-changes-indexer", - "tutorials/indexer/migrating-to-near-lake-framework", - { - "Building Indexers": [ - "develop/lake/primitives", - { - "type": "link", - "label": "NEAR Lake Primitives", - "href": "https://near.github.io/near-lake-framework-js/" - }, - "tutorials/indexer/js-lake-indexer", - "tutorials/indexer/python-lake-indexer", - "tutorials/indexer/nft-indexer", - "tutorials/indexer/python-nft-indexer" - ] - }, - { - "Running NEAR Lake": [ - "tutorials/indexer/run-lake-indexer", - "tutorials/indexer/lake-start-options", - "tutorials/indexer/credentials" - ] - }, - { - "Lake Data Structures": [ - "develop/lake/structures/toc", - "develop/lake/structures/block", - "develop/lake/structures/chunk", - "develop/lake/structures/shard", - "develop/lake/structures/transaction", - "develop/lake/structures/receipt", - "develop/lake/structures/execution-outcome", - "develop/lake/structures/state-change" - ] - }, - { - "type": "html", - "value": "
" - }, - { - "type": "html", - "value": " Track Real-time Events " - }, - { - "type": "link", - "label": "Real-time Events (Lake)", - "href": "/tutorials/indexer/nft-indexer" - }, - { - "type": "html", - "value": "
" - }, - { - "type": "html", - "value": " Ecosystem Tools " - }, - "tools/indexing" + ], "api": [ "api/rpc/introduction", diff --git a/website/src/css/custom.scss b/website/src/css/custom.scss index a786118760f..f0019fffbea 100644 --- a/website/src/css/custom.scss +++ b/website/src/css/custom.scss @@ -14,7 +14,7 @@ --ifm-color-primary: #82aaff; --near-color-royal: #82aaff; - hr{ + hr { background-color: #2d2d2d; } } @@ -30,6 +30,14 @@ article a[href^="http"]::after { margin-left: 0.3rem; } +.internal::after { + content: url("data:image/svg+xml,%3Csvg fill='%235f8afaff' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z'/%3E%3C/svg%3E"); + width: 0.6rem; + display: inline-block; + margin-left: 0.3rem; + color: var(--near-font-body) +} + body { font-family: var(--near-font-body); color: var(--ifm-font-color-base); @@ -43,8 +51,6 @@ body { padding-top: 1rem; } - - .features a[href^="http"]::after { content: ""; } @@ -59,15 +65,6 @@ hr { margin: 2.5em 0 1.5em 0; } -li hr { - height: 4px; - margin: 0.2em auto; - width: 90%; - border-width: 0; -} - - - ol li::marker { color: var(--near-color-royal); font-weight: 600; @@ -83,8 +80,6 @@ ol li::marker { text-align: center !important; } - - strong { font-weight: 600; } @@ -235,6 +230,23 @@ article { padding: .7rem .5rem !important; } +li hr { + height: 4px; + margin: 0.4em auto; + width: 93%; + border-width: 0; +} + +.menu__list .menu__list li hr { + background-color: #e8f0f9; + height: 2px; +} + +table { + display: inline-table; + min-width: 100%; +} + .theme-doc-toc-mobile { display: none; } @@ -372,8 +384,10 @@ iframe+em { } @media (min-width: 996px) { + /* columns */ - .col, .col:only-child { + .col, + .col:only-child { padding: 0 calc(var(--ifm-spacing-horizontal)/2); }