Skip to content
This repository was archived by the owner on Feb 27, 2026. It is now read-only.

feat: add folder system#241

Merged
danielalves96 merged 59 commits into
kyantech:nextfrom
tommy141x:feature/folders
Sep 9, 2025
Merged

feat: add folder system#241
danielalves96 merged 59 commits into
kyantech:nextfrom
tommy141x:feature/folders

Conversation

@tommy141x
Copy link
Copy Markdown
Contributor

@tommy141x tommy141x commented Sep 7, 2025

feat: add folder system

🎯 Please make sure you are opening this Pull Request against the next branch!

📝 Description

Adds folder functionality to Palmr. Users can now create folders, organize files within them, and share entire folders.

  • Create/edit/delete folders with parent-child relationships
  • New move function for files and folders
  • Share folders the same way as files, and files and folders can be shared together
  • Hierarchical tree view in file selection modals
  • Unified file/share view components using the same base component so as not to duplicate a ton of code (share view now has grid mode, bulk download, etc.)
  • Folder navigation with breadcrumbs
  • Folders support inline editing and renaming, as well as moving and sharing just like files do
  • Removed the preview action from the 3 dot drop down, clicking on a file previews it, clicking on a folder enters it - since adding move to the file and folder dropdown was getting a little cluttery
  • Share modal and move files modal use a new file tree component
  • 15 language translations for folder features

Files now have a folderId to link them to folders. Folders can be shared using the same system as files through a ShareFolders table.

Added API endpoints for folder operations, has equivilant routes and controllers as files, except for presigned and download URLs.

Created tree navigation components, folder management modals, and made the FilesView component work for both the files page and share pages so as not to duplicate a ton of code.

This work was based off the main branch since the next branch was behind main when I started.

This is the largest PR I've ever made and I'm ready to make any necessary changes based on feedback.

🔗 Related Issue(s)

#193 Folders
#114 [Feature] Create folder organization for files and allow shares to be created from folders

💡 Motivation and Context

I like Palmr but wanted folders, and noticed others did too. Flat file structure doesn't scale well for users with many files who need organization.

🤖 Use of Artificial Intelligence (AI)

  • Did you use any AI tools (such as GitHub Copilot, ChatGPT, etc.) to help develop this PR?
    • Yes, AI tools assisted in the development of this PR (please specify which ones and how they were used):
      • Tool(s) used: GitHub Copilot, Claude Sonnet 4
      • Brief description of how AI contributed: Copilot for tab completion and inline suggestions. Claude for architecture and design suggestions after reviewing the entire codebase. Implementation and design decisions were suggested by AI after reviewing the entire codebase and reviewed by me after reviewing the entire codebase. Implementations were created by me and then reviewed by AI to match the style of the original code.
  • Was this PR generated entirely by an AI tool (i.e., with minimal human intervention)?
    • No

🧪 How Has This Been Tested?

Through both the development environment and after building the full app, I tested the following myself (not utilizing any test framework since I did not see one in the project):

  • Folder CRUD operations through UI
  • File upload/move between folders
  • Folder sharing with different permission levels
  • Tree navigation in all modals
  • Bulk operations across folders
  • Grid/list view switching
  • Multi-language interface
  • Full app build and TypeScript compilation

📸 Screenshots (if appropriate)

image image image image image image image image image image

🔄 Types of Changes

  • ✨ New feature (non-breaking change which adds functionality)

✅ Checklist

  • My code follows the code style of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • I have rebased and/or merged on top of the latest next branch

🙏 Thank you for your contribution!

danielalves96 and others added 30 commits June 23, 2025 16:04
- Add Folder model with parent-child self-references
- Add folderId foreign key to File model
- Include folder sharing support via ShareFolders relation
- Establish database schema foundation for folder functionality
- Add folder CRUD operations and service layer
- Support hierarchical folder navigation
- Include folder content listing and management
- Add folder move/rename functionality with validation
- Update file module to handle folder contexts
- Extend share module for folder sharing capabilities
- Add folder routes to server configuration
- Update API documentation for folder endpoints
- Add folder API client methods and types
- Support folder CRUD and navigation operations
- Include hierarchical folder management utilities
- Add folder context to file operations
- Update file and share types for folder relationships
- Include folder-aware file management methods
- Add complete folder management proxy endpoints
- Support folder CRUD, navigation, and content operations
- Maintain API consistency with backend folder module
- Add file move proxy endpoint for folder organization
- Update file proxy routes with folder support
- Enable file-to-folder movement operations
- Add share-specific folder operations
- Support adding/removing folders from shares
- Include folder context in share management
- Implement hierarchical folder breadcrumb navigation
- Add folder action dialogs (create, rename, delete)
- Include move items modal for folder organization
@danielalves96
Copy link
Copy Markdown
Contributor

@tommy141x

Thank you so much for this amazing PR! This feature has been requested by users for quite some time, and your contribution will definitely be of great value.
I’ll start with an initial code review to check the new component structure and organization. I’ll also see if I can help with some of the missing points so we can release this new feature as soon as possible.

Thanks again!

@tommy141x
Copy link
Copy Markdown
Contributor Author

@tommy141x

Thank you so much for this amazing PR! This feature has been requested by users for quite some time, and your contribution will definitely be of great value. I’ll start with an initial code review to check the new component structure and organization. I’ll also see if I can help with some of the missing points so we can release this new feature as soon as possible.

Thanks again!

Sounds good, I'm going to see about consolidating the new breadcrumb and empty state components I added. Also should I rebase this PR off the main branch?

@danielalves96
Copy link
Copy Markdown
Contributor

@tommy141x
Muito obrigado por este incrível PR! Este recurso tem sido solicitado pelos usuários há algum tempo, e sua contribuição certamente será de grande valor. Começarei com uma revisão inicial do código para verificar a nova estrutura e organização dos componentes. Também verei se posso ajudar com alguns pontos que faltam para que possamos lançar este novo recurso o mais rápido possível.
Obrigado novamente!

Parece bom. Vou ver como consolidar os novos componentes de trilha de navegação e estado vazio que adicionei. Devo também rebasear este PR a partir do branch principal?

Great! No need to rebase with main. You can keep it as it is on top of next. When merging, I’ll use a squash merge so your contribution goes into main as a single commit under your authorship, without mixing it with any of my previous commits.

<div className="relative">
<IconFolder className="h-24 w-24 text-muted-foreground/30" />
<div className="absolute inset-0 flex items-center justify-center">
<div className="text-4xl">📭</div>
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.

Could we use an icon from Tabler Icons here?

Comment thread apps/server/prisma/schema.prisma Outdated
description String?
objectName String

// Hierarchical structure
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.

I noticed you’ve added several inline comments throughout the code. Since your implementation is already very clear and self-explanatory, it might be nice to remove most of them so we can keep the codebase clean. That said, please feel free to keep any comments you think are truly important for clarifying specific parts.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Of course, will do👍

@tommy141x
Copy link
Copy Markdown
Contributor Author

The screenshots in the docs may need updating. I can try to replicate your setup for them if you’d like, or you could update them, or they can just be left as is. I’ve run the migration once with Prisma, and another perspective on testing/reviewing would be helpful in case I missed something.

@tommy141x tommy141x marked this pull request as ready for review September 8, 2025 23:24
@danielalves96 danielalves96 merged commit abd8366 into kyantech:next Sep 9, 2025
@danielalves96
Copy link
Copy Markdown
Contributor

Thank you so much @tommy141x!

The folder system feature will be available in the next release of Palmr. This feature will definitely bring a huge improvement to the software. I truly appreciate your amazing contribution, it will have a lasting impact on the future of the project!

anthony0030 pushed a commit to anthony0030/Palmr that referenced this pull request Jan 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants