> For the complete documentation index, see [llms.txt](https://sply-1.gitbook.io/sply/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sply-1.gitbook.io/sply/architecture-and-components.md).

# Architecture and Components

## Architecture and Components

### System layers

Daoi can be understood as a three-layer system:

### 1. On-chain protocol layer

This layer handles project creation, custody, fundraising state, template routing, market transition, and permission closure. The main contracts are:

* `LaunchFactory`
* `TemplateFactory`
* `FactoryAdmin`
* `Presale`
* `Vault`
* token cores
* deployers

### 2. Backend service layer

The backend indexes projects, serves APIs, runs automated verification, maintains admin review data, and turns chain state into public-facing responses.

### 3. Frontend product layer

The frontend exposes the home page, create flow, templates page, developer page, project pages, token pages, and admin review flow.

### Contract roles

### LaunchFactory

`LaunchFactory` is the project-level factory. It is responsible for:

* creating token, vault, and presale
* running project setup
* attaching token hooks
* handling standard token and custom core deployment paths
* managing salt pools for standard and custom token cores

### TemplateFactory

`TemplateFactory` routes template launches. It decides whether the selected template is:

* a built-in template
* an approved developer template
* a platform custom core path
* a self-deployed custom core path

### FactoryAdmin

`FactoryAdmin` governs the developer template registry:

* registering templates
* enabling and disabling templates
* storing capability flags and schema policy data
* allowing emergency shutdown of eligible projects

### Presale

`Presale` is the fundraising state machine:

* participation
* fundraising progress
* finalize
* refund and vote-related transitions when configured

### Vault

`Vault` is the custody boundary for presale funds. Its purpose is to keep fundraising assets outside of arbitrary template logic and tied to the presale state model.

### Token core

Token cores implement token behavior:

* transfers
* tax behavior
* permission gates
* market state hooks

Built-in paths and developer template paths may use different token cores, but they still need to fit the platform lifecycle.

### Ownership split

The current live architecture separates control:

* `Factory` and `TemplateFactory` stay under Safe ownership
* `FactoryAdmin` can be operated through a more flexible operator wallet

This split keeps the core launch path under stronger control while allowing faster template review and template registration operations.

***

## Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sply.fun/daoi-docs-import/architecture-and-components.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sply-1.gitbook.io/sply/architecture-and-components.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
