Skip to content

Commit c9fd11a

Browse files
committed
Add refactor notes
1 parent 186eb13 commit c9fd11a

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

refactor-notes.md

+34
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,37 @@ Questions
2222
NEEDS
2323

2424
- way for plugins to also provide their own interfaces to compose them all together for client and server runtime usage?
25+
26+
Modularization
27+
28+
We will need to have a way for an individual app load the different pieces of itself into the main application. A package would need to provide code for the client, core, and the server.
29+
30+
One proposed pattern, which reflect the data needs of each part of the application to function properly.
31+
32+
{
33+
appName: 'myApp',
34+
icon: ".../path/to/icon",
35+
assets: "../path/to/assets",
36+
fileType: "\*.agent",
37+
core: {
38+
components: Record<string, ThothComponent>,
39+
inspectorControls: Record<string, InspectorControl>,
40+
plugins: ThothPlugin[],
41+
connectors: Recird<string, Connector>
42+
},
43+
client: {
44+
windows: Record<string, WindowComponent>
45+
events: Record<string, Event>
46+
inspectorComponents: Record<string, InspectorComponent>,
47+
interface: ThothInterface,
48+
menuBar: Record<string, MenuBar>
49+
// or maybe this, which would load in all the above itself ands expose a single component.
50+
// Perhaps our client library (or client-core) gives a provider that lets people load these things into thoth from their individual app.
51+
appRoot: MyAppThothRootComponent
52+
}
53+
server: {
54+
interface: ThothInterface,
55+
// Good for custom routes for the app
56+
routes: Record<string, RouteDefinition>
57+
}
58+
}

0 commit comments

Comments
 (0)