Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion website/docs/contribution/cli/templates.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
sidebar_position: 3
title: New Project Templates
title: "CLI Project Templates"
sidebar_label: "Templates"
description: How to add new project templates to the Compose CLI and keep the template registry in sync.
---

Expand Down
5 changes: 4 additions & 1 deletion website/docs/contribution/code-style-guide.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
sidebar_position: 3
title: Code Style Guide
title: "Code Style Guide — Solidity Conventions"
sidebar_label: "Code Style"
description: Code style guidelines for developing Compose facets and modules
---

# Code Style Guide

This section outlines the code style guidelines for developing new facets and Solidity modules in **Compose**.

Follow [Compose's design principles](/docs/design) when contributing code.
Expand Down
1 change: 1 addition & 0 deletions website/docs/contribution/documentation/all-components.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
sidebar_position: 2
title: All Components - Complete Reference
sidebar_label: "All Components"
description: Complete reference of all documentation UI components—Badge, Callout, Accordion, APIReference, and more—with usage examples for Compose docs.
draft: true
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
sidebar_position: 1
title: Documentation Design Guide
sidebar_label: "Design Guide"
description: Comprehensive guide for creating consistent, high-quality documentation
draft: true
---
Expand Down
5 changes: 4 additions & 1 deletion website/docs/contribution/how-to-contribute.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
sidebar_position: 1
title: How to Contribute
title: "How to Contribute to Compose"
sidebar_label: "How to Contribute"
description: Learn how to contribute to Compose
---

# How to Contribute

Thank you for your interest in contributing to Compose!

Compose is a community developed project. We welcome you and want your help.
Expand Down
5 changes: 4 additions & 1 deletion website/docs/contribution/testing.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
sidebar_position: 4
title: Testing
title: "Testing — Behavior-First with Foundry"
sidebar_label: "Testing"
description: Compose tests are **behavior-first** and primarily written with Foundry fuzz tests.
---

# Testing

Compose tests are **behavior-first** and primarily written with Foundry fuzz tests.

## Testing Philosophy
Expand Down
5 changes: 4 additions & 1 deletion website/docs/design/banned-solidity-features.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
---
sidebar_position: 4
title: Banned Solidity Features
title: "Banned Solidity Features"
sidebar_label: "Banned Features"
description: Solidity language features that are banned from Compose facets and modules.
---

import Callout from '@site/src/components/ui/Callout';

# Banned Solidity Features

The following Solidity language features are **banned** from Compose facets and modules.

Compose restricts certain Solidity features to keep facet and library code **simpler**, **more consistent**, and **easier to reason about**.
Expand Down
7 changes: 5 additions & 2 deletions website/docs/design/design-for-composition.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
---
sidebar_position: 5
title: Design for Composition
sidebar_position: 3
title: "Design for Composition — Guidelines & Rules"
sidebar_label: "Composition"
description: How to design Compose facets and modules for composition.
---

import Callout from '@site/src/components/ui/Callout';
import ExpandableCode from '@site/src/components/code/ExpandableCode';

# Design for Composition

Here are the guidelines and rules for creating composable facets.

Compose replaces source-code inheritance with on-chain composition. Facets are the building blocks; diamonds wire them together.
Expand Down
3 changes: 2 additions & 1 deletion website/docs/design/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
sidebar_position: 1
title: Compose Design
title: "Design Principles"
sidebar_label: "Overview"
description: Overview for how Compose is designed
sidebar_class_name: hidden
---
Expand Down
7 changes: 5 additions & 2 deletions website/docs/design/maintain-compatibility.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
sidebar_position: 6
title: Maintain Compatibility
sidebar_position: 5
title: "Maintain Compatibility — Standards & Interoperability"
sidebar_label: "Compatibility"
description: Maintain compatibility with existing standards, libraries, and systems
---

# Maintain Compatibility

Build for interoperability. Before implementing a facet or feature, identify existing standards and expected behaviors, and ensure your implementation behaves the same where it matters. Code style can differ; externally observable behavior should not.

Implementation checklist:
Expand Down
6 changes: 4 additions & 2 deletions website/docs/design/repeat-yourself.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
---
sidebar_position: 3
title: Repeat Yourself
sidebar_position: 2
title: "Repeat Yourself — Intentional Code Duplication"
sidebar_label: "Repeat Yourself"
description: Repeat yourself when it makes your code easier to read and understand.
---

import Callout from '@site/src/components/ui/Callout';

# Repeat Yourself

The DRY principle — *Don't Repeat Yourself* — is a well-known rule in software development. We **intentionally** break that rule.

Expand Down
6 changes: 4 additions & 2 deletions website/docs/design/written-to-be-read.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
sidebar_position: 2
title: Compose Is Written to Be Read
sidebar_position: 1
title: "Written to Be Read — Code Readability First"
sidebar_label: "Readability"
description: Compose is written to be read by other developers.
---

# Written to Be Read

The primary design principle of Compose is **the code should be easy to read and understand**.

Expand Down
7 changes: 5 additions & 2 deletions website/docs/foundations/composable-facets.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
---
sidebar_position: 6
title: Composable Facets
sidebar_position: 5
title: "Composable Facets — Modular Building Blocks"
sidebar_label: "Composable Facets"
description: Mix and match facets to build complex systems from simple, interoperable building blocks.
---

import Callout from '@site/src/components/ui/Callout';

# Composable Facets

The word **"composable"** means *able to be combined with other parts to form a whole*.

In **Compose**, facets are designed to be **composable**. They're built to interoperate seamlessly with other facets inside the same diamond.
Expand Down
7 changes: 5 additions & 2 deletions website/docs/foundations/custom-facets.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
---
sidebar_position: 8
title: "Custom Functionality: Compose Your Own Facets"
sidebar_position: 7
title: "Custom Facets — Build Your Own"
sidebar_label: "Custom Facets"
description: "Build your own facets that work seamlessly with existing Compose Functionality."
---

import Callout from '@site/src/components/ui/Callout';

# Custom Facets

Many projects need custom functionality beyond the standard facets.
Compose is designed for this — you can build and integrate your own facets that work seamlessly alongside existing Compose facets.

Expand Down
7 changes: 5 additions & 2 deletions website/docs/foundations/diamond-contracts.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
---
sidebar_position: 2
title: Diamond Contracts
sidebar_position: 1
title: "Diamond Contracts — Facets, Storage & Delegation"
sidebar_label: "Diamond Contracts"
description: "Understand Diamonds from the ground up—facets, storage, delegation, and how Compose uses them."
---

import SvgThemeRenderer from '@site/src/components/theme/SvgThemeRenderer';
import Callout from '@site/src/components/ui/Callout';

# Diamond Contracts

A **diamond contract** is a smart contract that is made up of multiple parts instead of one large block of code. The diamond exists at **one address** and holds **all of the contract's storage**, but it uses separate smart contracts called **facets** to provide its functionality.

Users interact only with the **diamond**, but the diamond's features come from its **facets**. Each facet provides a small, focused set of functions, and the diamond uses those functions to perform its actions.
Expand Down
7 changes: 5 additions & 2 deletions website/docs/foundations/facets-and-modules.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
sidebar_position: 7
title: "Understanding Facets and Modules"
sidebar_position: 6
title: "Facets and Modules — How They Work Together"
sidebar_label: "Facets & Modules"
description: Learn how facets and modules work together through shared storage to build composable systems.
---

# Facets and Modules

Compose uses two complementary patterns for smart contract development:

### Facets (Complete Implementations)
Expand Down
5 changes: 4 additions & 1 deletion website/docs/foundations/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Foundations
title: "Foundations — Core Concepts"
sidebar_label: "Overview"
description: Compose smart contracts are designed to be composable.
sidebar_class_name: hidden
---
Expand All @@ -10,6 +11,8 @@ import Icon from '@site/src/components/ui/Icon';
import CalloutBox from '@site/src/components/ui/CalloutBox';
import Callout from '@site/src/components/ui/Callout';

# Foundations: Core Concepts of Compose

<DocSubtitle>
Compose is a new approach to smart contract development that changes how developers build and deploy smart contract systems. This section introduces the core concepts that make Compose unique.
</DocSubtitle>
Expand Down
7 changes: 5 additions & 2 deletions website/docs/foundations/onchain-contract-library.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
---
sidebar_position: 4
title: On-chain Library
sidebar_position: 3
title: "On-chain Contract Library"
sidebar_label: "On-chain Library"
description: Compose provides a set of reusable on-chain contracts that already exist on blockchains
---

import DocSubtitle from '@site/src/components/docs/DocSubtitle';
import Callout from '@site/src/components/ui/Callout';

# On-chain Contract Library

<DocSubtitle>
**Compose takes a different approach.**

Expand Down
7 changes: 5 additions & 2 deletions website/docs/foundations/reusable-facet-logic.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
---
sidebar_position: 5
title: Reusable Logic
sidebar_position: 4
title: "Reusable Facet Logic — Deploy Once, Reuse Everywhere"
sidebar_label: "Reusable Logic"
description: Deploy once, reuse everywhere. Compose facets are shared across thousands of projects.
---

import DiamondFacetsSVG from '@site/static/img/svg/compose_diamond_facets.svg'
import Callout from '@site/src/components/ui/Callout';

# Reusable Facet Logic

You might be wondering: **How can I create a new project without deploying new smart contracts?**

The answer lies in Compose's smart contract architecture, which is based on [diamond contracts](/docs/foundations/diamond-contracts).
Expand Down
6 changes: 4 additions & 2 deletions website/docs/foundations/solidity-modules.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
---
sidebar_position: 3
title: Solidity Modules
sidebar_position: 2
title: "Solidity Modules — Reusable Logic Outside Contracts"
sidebar_label: "Solidity Modules"
description: What Solidity modules are, how they differ from contracts and libraries, and how Compose uses them for reusable facet logic and shared storage.
---

import ExpandableCode from '@site/src/components/code/ExpandableCode';

# Solidity Modules

Solidity **modules** are Solidity files whose top-level code lives *outside* of contracts and Solidity libraries. They contain reusable logic that gets pulled into other contracts at compile time.

Expand Down
3 changes: 3 additions & 0 deletions website/docs/getting-started/installation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
sidebar_position: 1
title: "Installation"
sidebar_label: "Installation"
description: "Get up and running with Compose in just a few minutes."
---

import DocSubtitle from '@site/src/components/docs/DocSubtitle';
Expand Down
4 changes: 3 additions & 1 deletion website/docs/intro.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
sidebar_position: 1
slug: /
title: "Introduction"
title: "Smart Contract Library for ERC-2535 / ERC-8153 Diamonds"
sidebar_label: "Introduction"
description: Compose is a smart contract library for building smart contract systems using the ERC-2535 Diamond standard.
---

Expand All @@ -10,6 +11,7 @@ import DocCard, { DocCardGrid } from '@site/src/components/docs/DocCard';
import Callout from '@site/src/components/ui/Callout';
import FeatureGrid, { FeatureGridItem } from '@site/src/components/features/FeatureGrid';

# Introduction to Compose

<DocSubtitle>
**Compose** is a smart contract library that helps developers build smart contract systems using the [ERC-2535 Diamond](https://eips.ethereum.org/EIPS/eip-2535) standard. It's designed from the ground up for **code clarity**, **reusability**, and **on-chain composability**.
Expand Down
1 change: 1 addition & 0 deletions website/docs/library/access/Owner/TwoSteps/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: "Two Steps"
sidebar_label: "Two Steps"
description: "Two Steps components for Compose diamonds."
---

Expand Down
1 change: 1 addition & 0 deletions website/docs/library/access/Owner/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: "Owner"
sidebar_label: "Owner"
description: "Single-owner access control pattern."
---

Expand Down
7 changes: 5 additions & 2 deletions website/docs/library/access/index.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
---
title: "Access Control"
title: "Access Control — Diamond Permission Management"
sidebar_label: "Access Control"
description: "Access control patterns for permission management in Compose diamonds."
---

import DocCard, { DocCardGrid } from '@site/src/components/docs/DocCard';
import DocSubtitle from '@site/src/components/docs/DocSubtitle';
import Icon from '@site/src/components/ui/Icon';

# Diamond Permission Management

<DocSubtitle>
Access control for Compose diamonds.
Manage who can access your diamond using Ownership or Role-Based Access Control
</DocSubtitle>

<DocCardGrid columns={2}>
Expand Down
5 changes: 4 additions & 1 deletion website/docs/library/diamond/index.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
---
title: "Diamond Core"
title: "Diamond Core — Proxy Functionality"
sidebar_label: "Diamond Core"
description: "Core diamond proxy functionality for ERC-2535 diamonds."
---

import DocCard, { DocCardGrid } from '@site/src/components/docs/DocCard';
import DocSubtitle from '@site/src/components/docs/DocSubtitle';
import Icon from '@site/src/components/ui/Icon';

# Diamond Core: Proxy Functionality

<DocSubtitle>
Core diamond proxy functionality for ERC-8153 diamonds.
</DocSubtitle>
Expand Down
5 changes: 4 additions & 1 deletion website/docs/library/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: "Library"
title: "On-chain Contract Library"
sidebar_label: "Library"
description: "Contract references for Compose modules and facets—interfaces, storage layout, and upgrade wiring."
sidebar_class_name: "hidden"
---
Expand All @@ -9,6 +10,8 @@ import DocSubtitle from '@site/src/components/docs/DocSubtitle';
import Icon from '@site/src/components/ui/Icon';
import Callout from '@site/src/components/ui/Callout';

# Compose Smart Contracts Library

<DocSubtitle>
Contract-level docs for each **Compose** module and facet. What to call on-chain, how state is organized, and how upgrades work.
</DocSubtitle>
Expand Down
Loading
Loading