@@ -7,52 +7,140 @@ description: Overview of the Cherit frontend file structure.
77
88``` sh
99 src
10- ├── App.svelte # Main Svelte App
11- ├── assets
12- │ └── fonts
13- │ ├── DTNightingale-Light.woff2
14- │ └── Recoleta-RegularDEMO.otf
15- ├── components # Components for the App
16- │ ├── breadcrumb_path
17- │ │ └── index.svelte
18- │ ├── context_menu
19- │ │ └── index.svelte
20- │ ├── root_folder_selector
21- │ │ └── index.svelte
22- │ ├── sidebar
23- │ │ ├── bottom_sidebar.svelte
24- │ │ ├── file_manager
25- │ │ │ ├── file_manager_context_menu.ts
10+ ├── distribute # A dir related to distribution of the software
11+ │ └── linux
12+ │ └── flatpak
13+ ├── index.html # the SPA html
14+ ├── package.json
15+ ├── public
16+ ├── src
17+ │ ├── App.svelte
18+ │ ├── assets
19+ │ │ └── fonts # Fonts Assets for App
20+ │ ├── components # Components are organized by how they appear in the Layout of the UI
21+ │ │ ├── general # Components that are generally used by the App
22+ │ │ │ ├── breadcrumb_path
23+ │ │ │ │ └── index.svelte
24+ │ │ │ ├── context_menu
25+ │ │ │ │ └── index.svelte
26+ │ │ │ ├── root_folder_selector
27+ │ │ │ │ ├── index.svelte
28+ │ │ │ │ └── states.svelte.ts
29+ │ │ │ └── submit_button
30+ │ │ │ └── index.svelte
31+ │ │ ├── main_section # Components Responsible for the Main UI of the app
2632│ │ │ ├── index.svelte
27- │ │ │ ├── items_renderer.svelte
28- │ │ │ ├── README.md
29- │ │ │ └── toolbar.svelte
30- │ │ └── index.svelte
31- │ ├── text_editor
32- │ │ ├── index.svelte
33- │ │ ├── obsidian_theme.ts
34- │ │ ├── prosemark.svelte
35- │ │ └── toolbar_buttons.ts
36- │ └── titlebar
37- │ └── index.svelte
38- ├── fonts.css
39- ├── lib # various modules made to be consumed by the app
40- │ ├── file_tree # modules serving the purpose of file tree related stuff
41- │ │ ├── builder.ts
42- │ │ ├── index.ts
43- │ │ ├── operations.ts
44- │ │ └── utils
45- │ │ ├── file_tree_utils.ts
33+ │ │ │ ├── pane_menu
34+ │ │ │ │ └── index.svelte
35+ │ │ │ ├── pdf_export_dialog
36+ │ │ │ │ ├── index.svelte
37+ │ │ │ │ └── states.svelte.ts
38+ │ │ │ ├── text_editor
39+ │ │ │ │ ├── editor
40+ │ │ │ │ │ ├── context_menu.ts
41+ │ │ │ │ │ ├── editor_config
42+ │ │ │ │ │ │ ├── index.ts
43+ │ │ │ │ │ │ ├── keymaps.ts
44+ │ │ │ │ │ │ ├── theme.css
45+ │ │ │ │ │ │ └── theme.ts
46+ │ │ │ │ │ └── index.svelte
47+ │ │ │ │ ├── editor_state.svelte.ts
48+ │ │ │ │ ├── editor_toolbar_mobile
49+ │ │ │ │ │ ├── index.svelte
50+ │ │ │ │ │ └── toolbar_buttons.ts
51+ │ │ │ │ └── index.svelte
52+ │ │ │ └── titlebar
53+ │ │ │ └── index.svelte
54+ │ │ └── sidebar_section # Components Responsible for the Sidebar UI of the app
55+ │ │ ├── bottom_sidebar.svelte
56+ │ │ ├── file_manager
57+ │ │ │ ├── context_menu.ts
58+ │ │ │ ├── index.svelte
59+ │ │ │ ├── items_renderer.svelte
60+ │ │ │ ├── README.md
61+ │ │ │ ├── states.svelte.ts
62+ │ │ │ └── toolbar.svelte
63+ │ │ └── index.svelte
64+ │ ├── lib # Functions, Types and States that are used through out the components
65+ │ │ ├── operations # Function that facilitate various features
66+ │ │ │ ├── editor
67+ │ │ │ │ ├── commands
68+ │ │ │ │ │ └── index.ts
69+ │ │ │ │ └── index.ts
70+ │ │ │ ├── file_tree
71+ │ │ │ │ ├── builder.ts
72+ │ │ │ │ ├── index.ts
73+ │ │ │ │ ├── operations.ts
74+ │ │ │ │ └── utils
75+ │ │ │ │ ├── file_tree_utils.ts
76+ │ │ │ │ ├── index.ts
77+ │ │ │ │ └── platform_utils.ts
78+ │ │ │ ├── pdf_export
79+ │ │ │ │ └── index.ts
80+ │ │ │ ├── picker_dialog
81+ │ │ │ │ └── index.ts
82+ │ │ │ ├── user_activity
83+ │ │ │ │ └── index.ts
84+ │ │ │ ├── window_listeners
85+ │ │ │ │ └── index.ts
86+ │ │ │ └── workspace
87+ │ │ │ ├── index.ts
88+ │ │ │ └── operations.svelte.ts
89+ │ │ ├── states # States that represent shared Component States
90+ │ │ │ ├── domain_specific
91+ │ │ │ │ ├── context_menu.svelte.ts
92+ │ │ │ │ ├── index.ts
93+ │ │ │ │ ├── os.svelte.ts
94+ │ │ │ │ ├── user_activity.svelte.ts
95+ │ │ │ │ └── workspace.svelte.ts
96+ │ │ │ ├── global
97+ │ │ │ │ └── index.svelte.ts
98+ │ │ │ └── index.ts
99+ │ │ └── types # Types needed through the app
46100│ │ ├── index.ts
47- │ │ └── platform_utils.ts
48- │ ├── states # various UI states. All items are .svelte.ts files
49- │ │ ├── ui_states.svelte.ts
50- │ │ ├── index.ts
51- │ │ └── context_menu.svelte.ts
52- │ └── user_activity # module serve the user activity saving logic
53- │ └── index.ts
54- ├── main.ts # main loader for the svelte app and other css modules
55- ├── types
56- │ └── index.ts
57- └── vite-env.d.ts
101+ │ │ └── schema.ts
102+ │ ├── main.ts # Entry Point
103+ │ ├── styles
104+ │ │ ├── fonts.css # css for Fonts loading
105+ │ │ └── global.css # global css rules
106+ │ └── vite-env.d.ts
107+ ├── svelte.config.js
108+ ├── test
109+ │ └── components
110+ │ └── main_section
111+ │ └── text_editor
112+ │ └── editor
113+ │ └── index.test.ts
114+ ├── tsconfig.app.json
115+ ├── tsconfig.json
116+ ├── tsconfig.node.json
117+ ├── uno.config.ts
118+ └── vite.config.ts
119+
120+ ```
121+
122+ - the components dir will contains
123+ - svelte file
124+ - state files that are only needed for current component or child compoenents
125+ - the lib dir contains
126+ - operations function definitions which perform some sort of operation
127+ - states that are needed for more than 2 sections of the app
128+
129+ ## Backend
130+
131+ ``` sh
132+ ├── src-tauri
133+ │ ├── build.rs
134+ │ ├── capabilities
135+ │ │ └── default.json
136+ │ ├── Cargo.lock
137+ │ ├── Cargo.toml
138+ │ ├── gen
139+ │ │ └── android # Android configs and functions
140+ │ ├── src
141+ │ │ ├── desktop_test.rs
142+ │ │ ├── lib.rs # Tauri Commands, and other rust functions
143+ │ │ └── main.rs
144+ │ ├── tauri.conf.json
145+ │ └── versoview
58146```
0 commit comments