Skip to content

Commit 8a8b2f2

Browse files
committed
Add product design for project type (goplus#2998)
1 parent 1f0b612 commit 8a8b2f2

File tree

2 files changed

+214
-1
lines changed

2 files changed

+214
-1
lines changed

docs/product/project-type.md

Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
# Project Type
2+
3+
## Background
4+
5+
XBuilder is evolving from a creation platform that primarily supports a single Project type into one that supports multiple Project Types. The core of this design is to establish Project Type as a foundational product concept that runs through key scenarios such as creation, browsing, editing, import/export, and tutorials.
6+
7+
## Goals
8+
9+
* Introduce an explicit Project Type for each Project as part of its core metadata.
10+
* Surface Project Type in key scenarios such as project lists, search, explore, project detail pages, and editors.
11+
* Provide a stable information model and product structure for future Project Type expansion.
12+
* Preserve compatibility with existing projects and historical import/export files without requiring manual migration.
13+
14+
## Non-goals
15+
16+
* Detailed feature design for editors of different Project Types.
17+
* Billing or quota management.
18+
* Long-term operational or recommendation strategies for every type.
19+
20+
## Core Concepts and Rules
21+
22+
This section focuses on product concepts, information relationships, and product rules independent of specific UI layouts.
23+
24+
### Project
25+
26+
A Project is the core unit of creation and management in XBuilder. Users create, edit, save, publish, search, explore, share, remix, import, and export around Projects.
27+
28+
A Project contains at least two parts:
29+
30+
* Metadata: such as Owner, Name, Type, visibility, creation time, and update time.
31+
* Content: the actual project content structure for a given type, such as game content, comic content, or robot app content.
32+
33+
### Project Type
34+
35+
Project Type is the top-level classification of a Project. It defines what kind of creative artifact the Project represents.
36+
37+
Project Type directly affects:
38+
39+
* The creation entry point and default template.
40+
* The selected editor or editor mode.
41+
* The selected runtime or preview mode.
42+
* How creation, browsing, and editing entry points are organized.
43+
* How imported or exported files are restored to the correct Project.
44+
45+
Project Type is not just a display label. It is part of a Project's core identity.
46+
47+
### Confirmed and Illustrative Project Types
48+
49+
At the current stage, the confirmed Project Type is `game`, which corresponds to existing spx projects.
50+
51+
To illustrate the multi-type mechanism, this document also introduces two example types: `comic` and `robot-app`. They are used only to discuss information structure, page organization, and user flows. They do not imply committed product directions.
52+
53+
These three types can be understood as follows:
54+
55+
* `game`: A confirmed type, shown to users as "Game". It corresponds to Builder's more mature game-creation capability and is also the default compatibility type for historical projects.
56+
* `comic`: An illustrative type, shown to users as "Comic". It represents creation centered on comics, storyboards, and visual storytelling.
57+
* `robot-app`: An illustrative type, shown to users as "Robot App". It represents applications centered on robots or physical-device interaction.
58+
59+
### Project Identity Rules
60+
61+
A Project is identified by Owner and Name. Project Type is one of its core attributes, but it does not change the uniqueness rule of Name.
62+
63+
The rules are:
64+
65+
* Under the same Owner, Project Name must be globally unique across types. In other words, the same user cannot own projects with the same name but different types, such as a `game` project `alice/hello` and another project of a different type also named `alice/hello`.
66+
* Project Type cannot be changed after creation.
67+
68+
### Account and Global State
69+
70+
The account system is not split by Project Type. Users enter XBuilder with one account and manage Projects of all types under that same account.
71+
72+
Specifically:
73+
74+
* User identity is global rather than type-specific.
75+
* Personal homepage, profile, follow relationships, Likes, and similar behaviors are unified across types.
76+
77+
Cross-type billing and quota implications introduced by this unified account system are out of scope for this document.
78+
79+
### Tutorial and Project Type
80+
81+
The Tutorial system remains unified and is not split into separate product lines by Project Type.
82+
83+
A Course or Course Series may be related to a specific Project Type, or it may be type-agnostic. For example:
84+
85+
* "Build a platformer game" targets `game`.
86+
* "Create a four-panel comic" targets `comic`.
87+
* "Make a robot patrol along a line" targets `robot-app`.
88+
* "Get to know the Builder homepage" is not tied to a specific type.
89+
90+
Therefore:
91+
92+
* `Course` and `Course Series` do not store Project Type information.
93+
* The relationship between a course and a type is expressed through course semantics and referenced sample Projects, rather than through strong data modeling.
94+
95+
### XBP
96+
97+
XBP is XBuilder's project file format for local import and export.
98+
99+
Under the multi-type design, XBP is defined as a type-agnostic unified project package format:
100+
101+
* All Project Types can be exported as `.xbp`.
102+
* XBP remains a unified outer container, while different Project Types may have different internal content structures.
103+
* XBP metadata must include Project Type so the system can choose the correct handling logic during import.
104+
105+
### Copilot and Project Type
106+
107+
Copilot should expand together with the Project Types supported by Builder rather than serving only a single type.
108+
109+
Specifically:
110+
111+
* Copilot should support the interfaces and workflows of all supported Project Types, including different editors and related interactions.
112+
* Copilot should be able to load domain knowledge and tools for different Project Types on demand.
113+
114+
### Asset Library and Project Type
115+
116+
Asset Library is XBuilder's unified asset reuse mechanism and is not split by Project Type.
117+
118+
The following rules apply:
119+
120+
* All Project Types share the same Asset Library mechanism.
121+
* The Asset Types reusable by different Project Types may differ.
122+
* Different Project Types are not required to share the same asset dataset; whether assets are shared depends on whether those types can consume the same Asset Type.
123+
* The Asset Library capability layer remains unified, while the asset data it carries is organized by the Asset Types consumable by each Project Type.
124+
125+
### Compatibility Rules
126+
127+
To preserve backward compatibility, the following rules apply:
128+
129+
* Historical Projects without an explicit Project Type are treated as `game` by default.
130+
* Historical `.xbp` files without Project Type are treated as `game` by default.
131+
* If the system encounters a type that is not supported by the current version, it should show a clear message rather than fail silently.
132+
133+
## User Stories
134+
135+
This section focuses on how users perceive and use multi-type Projects across concrete pages and interaction flows.
136+
137+
In any scenario that displays a Project list, Project Type should be visible through badges, icons, or text labels before the user makes a click decision. This includes the homepage, user project pages, liked-project pages, search results, and the Open Project modal.
138+
139+
### Homepage
140+
141+
The homepage remains a cross-type entry point rather than being split into separate homepages by type. It serves two purposes:
142+
143+
* Help users quickly resume creation and manage their projects.
144+
* Help users discover public content of different types and enter the corresponding Explore pages.
145+
146+
Under the multi-type design, the homepage includes separate sections for different Project Types, with each section acting as an entry point for exploration of that type. In the current version, they are analogous to blocks such as "The community is liking" and "The community is remixing", and can later be organized further by type.
147+
148+
The primary purpose of these sections is to guide users to the corresponding Explore page, such as `/explore/game`, rather than to support deep browsing directly on the homepage.
149+
150+
### Create a Project
151+
152+
When users start creating a project, they must choose the target Type first. This flow continues to use the existing creation modal and the single "New Project" entry in the navigation bar, without introducing a new route.
153+
154+
After clicking "New Project", the user first selects a Project Type in the modal, then fills in the project name and other required information. After creation, the system should go directly to the editor for that type.
155+
156+
### Browse User-related Projects
157+
158+
When viewing a user's projects or liked projects, the default should be to show results across all types, with a type filter available. Type is expressed through a URL query parameter. If `type` is absent, it means all types. For example:
159+
160+
* User projects: `/user/<user>/projects?type=game`
161+
* Liked projects: `/user/<user>/likes?type=game`
162+
163+
### Search Projects
164+
165+
Search is also a cross-type aggregation scenario and uses query parameters for filtering. If `type` is absent, results should include all types, with a type filter available. For example:
166+
167+
* `/search?q=platform&type=game`
168+
169+
### Open a Project
170+
171+
"Open Project" remains a modal. By default, it shows the user's projects across all types and provides a type filter.
172+
173+
After the user selects a project, the system should determine the navigation target based on the project's actual type rather than the current page context.
174+
175+
### Explore a Type
176+
177+
Explore is a type-specific discovery page, with Type reflected in the URL path:
178+
179+
* `/explore/game`
180+
181+
Each Project Type has its own Explore entry point. Unlike cross-type aggregation scenarios such as the homepage or search, Explore focuses on content discovery for a single type.
182+
183+
Different types of Explore can use different content organization, recommendation dimensions, and visual layouts. For example:
184+
185+
* `game`: emphasizes playability, themes, and interactive experience.
186+
* `comic`: emphasizes visuals, narrative, style, and themes.
187+
* `robot-app`: emphasizes device capabilities, use cases, and control logic.
188+
189+
### View Project Details
190+
191+
The project detail page should clearly surface the Project Type and present the content structure appropriate for that type.
192+
193+
Type is placed directly in the route path:
194+
195+
* `/<type>/<user>/<name>`
196+
* For example: `/game/alice/hello`
197+
198+
The page uses the route type to choose the correct rendering logic. The detail page can keep a shared structural skeleton, such as the title area, author information, and basic action area, while allowing type-specific modules to be injected.
199+
200+
### Open and Edit a Project
201+
202+
The editor should enter the correct editing environment based on Project Type. The route format is:
203+
204+
* `/<type>/<user>/<name>/edit`
205+
* For example: `/game/alice/hello/edit`
206+
207+
The system chooses the editing logic based on the route type. When entering the editor from project lists, the Open Project modal, or project detail pages, the navigation target should always be determined by the project's actual type.
208+
209+
### Import or Export a Project
210+
211+
When exporting, all types use the same `.xbp` format. When importing, the system restores the Project based on the Project Type recorded in the file.
212+
213+
If the imported file's type does not match the current context, the system should either notify the user clearly or guide them into the correct type context, rather than failing silently.

docs/product/project-type.zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Copilot 不是仅服务于某一种 Project Type 的辅助能力,而应当跟
127127
这意味着:
128128

129129
* Copilot 应支持所有已支持 Project Type 对应的界面与工作流,包括不同类型的编辑器及相关交互界面。
130-
* Copilot 需要能够掌握或按需加载不同 Project Type 的领域知识/工具
130+
* Copilot 需要能够掌握或按需加载不同 Project Type 的领域知识和工具
131131

132132
### Asset Library 与 Project Type 的关系
133133

0 commit comments

Comments
 (0)