diff --git a/docs-sidebar.js b/docs-sidebar.js index 1c2e00b8fc..243081f3a4 100644 --- a/docs-sidebar.js +++ b/docs-sidebar.js @@ -46,7 +46,17 @@ const sidebars = { label: 'Feature Requests', href: 'https://github.com/actualbudget/actual/issues?q=label%3A%22needs+votes%22+sort%3Areactions-%2B1-desc+', }, - 'contributing/project-layout', + { + type: 'category', + label: 'The Actual Project Structure', + link: { + type: 'doc', + id: 'contributing/project-details/index', + }, + items: [ + 'contributing/project-details/database' + ] + }, 'contributing/preview-builds', 'contributing/releasing', 'contributing/windows', diff --git a/docs/contributing/index.md b/docs/contributing/index.md index 6591259a60..f21ef54d5e 100644 --- a/docs/contributing/index.md +++ b/docs/contributing/index.md @@ -36,7 +36,7 @@ Here are some initial guidelines for how contributions will be treated: ### The Project Layout -The layout of the codebase in Actual Budget takes a bit of getting used to and finding things at first can be a little tricky, we have put together a help [document](./project-layout.md) that shows the structure of the project, while this isn't 100% complete it will give you a good starting point for your development. +The layout of the codebase in Actual Budget takes a bit of getting used to and finding things at first can be a little tricky, we have put together a help [document](./project-details/index.md) that shows the structure of the project, while this isn't 100% complete it will give you a good starting point for your development. ### Working on existing issues diff --git a/docs/contributing/project-details/database.md b/docs/contributing/project-details/database.md new file mode 100644 index 0000000000..f63a98fe4f --- /dev/null +++ b/docs/contributing/project-details/database.md @@ -0,0 +1,9 @@ +# Database Details + +Actual stores your data locally inside a sqlite database. You can see the default db structure by opening `/loot-core/default-db.sqlite` + +However this is not the 'current' structure, as the database is created as a copy from the default template, and then a series of migrations is run to get the database up to the current level. You can see these migrations in `/loot-core/migrations`. + +On the front end, actual sometimes uses views to display data. All the names with the `v_` prefix are actually views, not tables. The views are recreated every time the app starts and normalize the shape of the data to the internal tables. Makes it easy to change field names etc without actually touching the tables (especially important in this local-first world where syncing directly references tables and fields) + +Much of the interesting functionality you might be interested in can be found in `/loot-core/src/server/db` diff --git a/docs/contributing/project-layout.md b/docs/contributing/project-details/index.md similarity index 96% rename from docs/contributing/project-layout.md rename to docs/contributing/project-details/index.md index 1f809fb4f1..0b1d53255b 100644 --- a/docs/contributing/project-layout.md +++ b/docs/contributing/project-details/index.md @@ -46,7 +46,7 @@ The development version of the importer for nYNAB into Actual. ### Loot Core -### Loot Design +The shared underlying functionality component used by both the web/desktop frontend and the in-browser database server. ### Node Libofx