Skip to content

docs: update backend directory-structure.md to match the current source tree - #1679

Open
onitshubham14 wants to merge 4 commits into
AOSSIE-Org:devfrom
onitshubham14:docs/backend-directory-structure-part1
Open

onitshubham14 wants to merge 4 commits into
AOSSIE-Org:devfrom
onitshubham14:docs/backend-directory-structure-part1

Conversation

@onitshubham14

@onitshubham14 onitshubham14 commented Nov 2, 2026 •

Copy link
Copy Markdown

Addressed Issues:

Fixes #1671

Screenshots/Recordings:

N/A

Additional Notes:

Updates docs/backend/backend_python/directory-structure.md so it matches the backend on dev (checked at 5e30cb2):

  • Adds the missing entries for database/, models/, routes/, schemas/ and utils/
  • Adds new sections for the logging/ and share/ folders
  • Adds logging/ and share/ to the directory tree at the top
  • Removes the stale utils/microservice.py entry, since the file no longer exists

Not changed: routes/test.py is not added, and the existing schemas/test.py entry is left as it is, because #1480 removes the former and #1499 plans to remove the latter. Those entries can be handled once those land.
I read each file and checked where it is used before writing its description.

AI Usage Disclosure:

We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact. AI slop is strongly discouraged and may lead to banning and blocking. Do not spam our repos with AI slop.

Check one of the checkboxes below:

  • This PR does not contain AI-generated code at all.
  • This PR contains AI-generated code. I have read the AI Usage Policy and this PR complies with this policy. I have tested the code locally and I am responsible for it.

I have used the following AI models and tools: Claude (Anthropic), to help me understand the code of the files I was documenting and to check my descriptions against it.

Checklist

  • My PR addresses a single issue, fixes a single bug or makes a single improvement.
  • My code follows the project's code style and conventions
  • If applicable, I have made corresponding changes or additions to the documentation
  • If applicable, I have made corresponding changes or additions to tests
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • I have read the Contribution Guidelines
  • Once I submit my PR, CodeRabbit AI will automatically review it and I will address CodeRabbit's comments.
  • I have filled this PR template completely and carefully, and I understand that my PR may be closed without review otherwise.

Summary by CodeRabbit

  • Documentation
    • Expanded the backend directory guide with logging and sharing components, including shared media access and album-sharing routes.
    • Added entries covering database connection handling, memories, video frames, and related modules.
    • Expanded the listed models, routes, schemas, and utilities, and refined existing descriptions, including the legacy test-schema description.
    • Removed the microservice utility entry from the guide.

@github-actions github-actions Bot added documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers labels Nov 2, 2026
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Walkthrough

The backend directory documentation now lists logging and sharing directories. It adds descriptions for database, model, route, schema, sharing, and utility components, and removes the stale microservice.py entry.

Changes

Backend directory documentation

Layer / File(s) Summary
Update the backend directory reference
docs/backend/backend_python/directory-structure.md
The directory listing and module descriptions now cover logging, sharing, and additional database, model, route, schema, and utility components. The stale microservice.py entry is removed.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other · Severity of issue fixed: Low

Suggested reviewers: code-builder-io

Merge Risk: Minimal · up to 1534f

The directory reference is ready to merge after normal checks; no actionable mismatch was identified.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Linked Issues check Warning Issue #1671 lists routes/test.py among the 35 undocumented Python files. backend/app/routes/test.py exists at the merge base, so this requirement is live. At the reviewed head, the routes table … Add a routes/test.py row with a short description to the routes table in docs/backend/backend_python/directory-structure.md. Write the description from reading the file. Alternatively, obtain an updated requirement from #1671 or its m…
Passed Passed checks: 3 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: updating the backend directory structure documentation to match the current source tree.
Out of Scope Changes check Passed All changes stay in docs/backend/backend_python/directory-structure.md. The diff from the merge base adds the logging/ and share/ tree entries and sections. It adds the missing database, models,…
Full details: Out of Scope Changes check

Explanation

All changes stay in docs/backend/backend_python/directory-structure.md. The diff from the merge base adds the logging/ and share/ tree entries and sections. It adds the missing database, models, routes, schemas, and utils rows. It refines existing rows, including the schemas/test.py description, and removes the stale utils/microservice.py entry. The database rows that were already present at the merge base, such as image_embeddings.py and image_export.py, remain in the same file. These changes support #1671 and do not touch other files. The diff output was truncated, so the schemas section was checked only through the head file content and the change summary.

Full details: Linked Issues check

Explanation

Issue #1671 lists routes/test.py among the 35 undocumented Python files. backend/app/routes/test.py exists at the merge base, so this requirement is live. At the reviewed head, the routes table in docs/backend/backend_python/directory-structure.md has no test.py row. The table lists albums, config, dependencies, face_clusters, folders, images, memories, metadata_export, models, share, shutdown, user_preferences, and videos. The head implements the other requirements: the database, models, routes, schemas, and utils entries; the logging and share sections; the tree updates; and the removal of the utils/microservice.py entry. The PR description defers routes/test.py to #1480. That deferral is the author's choice. Issue #1671 is still open and still lists the file. No updated requirement removes it.

Resolution

Add a routes/test.py row with a short description to the routes table in docs/backend/backend_python/directory-structure.md. Write the description from reading the file. Alternatively, obtain an updated requirement from #1671 or its maintainers that removes routes/test.py from the scope of this issue.

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit checks the folders in the guide,
New logging and sharing paths appear inside.
Database and model notes join the page,
Routes and schemas take their place.
One stale utility entry hops away.

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between bed50b9 and 1534f70.

Files selected for processing: 1
  • docs/backend/backend_python/directory-structure.md
Files skipped from review as they are similar to previous changes: 1
  • docs/backend/backend_python/directory-structure.md

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

@coderabbitai coderabbitai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Fix comments: Fix CodeRabbit comments on this PR

@rohan-pandeyy

Copy link
Copy Markdown
Member

Please fix the lint errors @onitshubham14

@coderabbitai coderabbitai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Fix comments: Fix CodeRabbit comments on this PR

@onitshubham14

Copy link
Copy Markdown
Author

@rohan-pandeyy fixed the Markdown lint errors and addressed the additional suggestions from CodeRabbit. All changes have been pushed to the existing PR. Thank you for the feedback! The PR is now ready for your review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DOC: backend directory-structure.md is out of date (35 undocumented files, 2 missing folders, 1 stale entry)

2 participants