Skip to content

Commit 971eac1

Browse files
authored
Merge pull request #205 from maxnorm/feat/doc
Feat/doc
2 parents 28d7482 + 39dddff commit 971eac1

17 files changed

Lines changed: 348 additions & 449 deletions

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Compose
1+
# Compose
2+
![Coverage](https://img.shields.io/badge/coverage-63%25-yellow) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![Discord](https://img.shields.io/badge/Discord-Join%20Chat-blue.svg)](https://discord.gg/DCBD2UKbxc)
23

34
> **⚠️ Early Stage**: Compose is currently in development and only available to contributors. It is **NOT production ready**.
45
@@ -14,14 +15,12 @@ Compose is a smart contract library that helps developers create smart contract
1415

1516
The project actively evolves based on community input—[tell us](https://github.com/Perfect-Abstractions/Compose/discussions/108) what you'd like Compose to do for you.
1617

17-
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
18-
[![Discord](https://img.shields.io/badge/Discord-Join%20Chat-blue.svg)](https://discord.gg/DCBD2UKbxc)
1918

2019
## Why Compose is Different
2120

2221
**Forget traditional smart contract design patterns**—Compose takes a radically different approach.
2322

24-
We build high-quality smart contracts by **intentionally restricting Solidity features** and following conventions designed specifically for smart contracts. This is **Smart Contract Oriented Programming (SCOP)**.
23+
We build high-quality smart contracts by <a href="https://compose.diamonds/docs/design/banned-solidity-features">**intentionally restricting Solidity features**</a> and following conventions designed specifically for smart contracts. This is **Smart Contract Oriented Programming (SCOP)**.
2524

2625
### Core Philosophy
2726

website/docs/_introOld.mdx

Lines changed: 0 additions & 231 deletions
This file was deleted.

website/docs/design/design-for-composition.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: How to design Compose facets and libraries for composition.
66

77
Here are guidelines and rules to create composable facets.
88

9-
Compose replaces source-code inheritance with onchain composition. Facets are the building blocks; diamonds wire them together.
9+
Compose replaces source-code inheritance with on-chain composition. Facets are the building blocks; diamonds wire them together.
1010

1111
We focus on building **small, independent, and easy-to-read facets**. Each facet is deployed once, then reused and combined with other facets to form complete, modular smart contract systems.
1212

@@ -63,4 +63,4 @@ For example, `ERC721EnumerableFacet` does not extend `ERC721Facet` because enume
6363

6464
***
6565

66-
This level of composability strikes the right balance: it enables highly organized, modular, and understandable onchain smart contract systems.
66+
This level of composability strikes the right balance: it enables highly organized, modular, and understandable on-chain smart contract systems.

website/docs/design/index.mdx

Lines changed: 46 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,53 @@ description: Overview for how Compose is designed
55
sidebar_class_name: hidden
66
---
77

8-
This section contains the guidelines and rules for developing new facets and Solidity libraries in **Compose**.
9-
10-
We focus on building small, independent, and easy-to-understand facets. Each facet is designed to be deployed once, then reused and composed seamlessly with others to form complete smart contract systems.
8+
import DocCard, { DocCardGrid } from '@site/src/components/docs/DocCard';
9+
import DocSubtitle from '@site/src/components/docs/DocSubtitle';
1110

11+
<DocSubtitle>
12+
This section contains the guidelines and rules for developing new facets and Solidity libraries in **Compose**. We focus on building small, independent, and easy-to-understand facets. Each facet is designed to be deployed once, then reused and composed seamlessly with others to form complete smart contract systems.
13+
</DocSubtitle>
1214
## Articles in this section
1315

14-
- [Compose Is Written to Be Read](./written-to-be-read) — Emphasizes clarity first: keep facets and libraries self-contained, ordered top-to-bottom, and easy to read. Avoid clever abstractions that reduce readability.
15-
16-
- [Repeat Yourself](./repeat-yourself) — Prefer duplication over indirection when it improves clarity.
17-
18-
- [Banned Solidity Features](./banned-solidity-features) — Solidity Features we don't use in facets/libraries.
19-
20-
- [Design for Composition](./design-for-composition) — Facets replace inheritance with onchain composition. Keep facets small and self-contained, pair each facet with a library, reuse storage layouts carefully, and extend behavior by adding new facets.
16+
<DocCardGrid columns={2}>
17+
<DocCard
18+
title="Compose Is Written to Be Read"
19+
description="Emphasizes clarity first: keep facets and libraries self-contained, ordered top-to-bottom, and easy to read. Avoid clever abstractions that reduce readability."
20+
href="./written-to-be-read"
21+
icon={<Icon name="book" size={28} />}
22+
size="medium"
23+
/>
24+
<DocCard
25+
title="Repeat Yourself"
26+
description="Prefer duplication over indirection when it improves clarity."
27+
href="./repeat-yourself"
28+
icon={<Icon name="cycle" size={28} />}
29+
size="medium"
30+
/>
31+
<DocCard
32+
title="Banned Solidity Features"
33+
description="Solidity Features we don't use in facets/libraries."
34+
href="./banned-solidity-features"
35+
icon={<Icon name="no-entry" size={28} />}
36+
size="medium"
37+
/>
38+
<DocCard
39+
title="Design for Composition"
40+
description="Build your own facets that work seamlessly with existing Compose facets using shared storage layouts and internal logic through Solidity libraries."
41+
href="./design-for-composition"
42+
icon={<Icon name="composition" size={28} />}
43+
size="medium"
44+
/>
45+
<DocCard
46+
title="Maintain Compatibility"
47+
description="Learn how facets and libraries work together through shared storage to build composable systems."
48+
href="./maintain-compatibility"
49+
icon={<Icon name="puzzle" size={28} />}
50+
size="medium"
51+
/>
52+
</DocCardGrid>
2153

22-
- [Maintain Compatibility](./maintain-compatibility) — Build facets that work with existing standards, libraries, and systems and exhibit expected behavior.
54+
:::warning[Early Development]
55+
Compose is still in early development and currently available only to contributors.
56+
It is not **production-ready** — use it in test or development environments only.
57+
:::

0 commit comments

Comments
 (0)