{"id":22718633,"url":"https://github.com/carry0987/filetree-api","last_synced_at":"2025-03-29T22:44:33.350Z","repository":{"id":228519417,"uuid":"774205234","full_name":"carry0987/FileTree-API","owner":"carry0987","description":"FileTree-API: A Go-based, Dockerized API for fast and efficient directory traversal and file listing, ideal for large-scale file systems.","archived":false,"fork":false,"pushed_at":"2024-12-31T11:18:20.000Z","size":77,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-05T00:28:14.247Z","etag":null,"topics":["aes-gcm","filelist","filetree","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/carry0987.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-19T06:07:03.000Z","updated_at":"2024-12-31T11:18:23.000Z","dependencies_parsed_at":"2024-04-08T14:27:21.538Z","dependency_job_id":"0db86d95-5f19-4862-b7ab-8c80be16d9b0","html_url":"https://github.com/carry0987/FileTree-API","commit_stats":null,"previous_names":["carry0987/filetree-api"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carry0987%2FFileTree-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carry0987%2FFileTree-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carry0987%2FFileTree-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carry0987%2FFileTree-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carry0987","download_url":"https://codeload.github.com/carry0987/FileTree-API/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246254100,"owners_count":20747948,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aes-gcm","filelist","filetree","golang"],"created_at":"2024-12-10T14:11:19.453Z","updated_at":"2025-03-29T22:44:33.317Z","avatar_url":"https://github.com/carry0987.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FileTree-API\nFileTree-API is a high-performance, scalable server application built with Go that provides a RESTful API for recursively traversing and listing files within a specified directory structure. Utilizing the concurrency power of Go's goroutines and optimized file system traversal strategies, this API is designed to efficiently handle large-scale file operations across multi-threaded environments. Packaged with Docker, the FileTree-API is easy to deploy and integrate into any infrastructure, offering a robust solution for applications requiring rapid access to file metadata and structure. Perfect for cloud storage services, file management systems, or any application dealing with extensive file directories.\n\n## Features\n- **Secure Encryption**: Uses AES encryption and signature verification to secure directory path.\n- **Easy Integration**: Built with the Go, allowing for straightforward integration into any Go application.\n- **Optimized Performance**:\n    - **Concurrent File Traversal**: Utilizes Go's goroutines to traverse directories concurrently.\n    - **Efficient File System Operations**: Implements optimized file system traversal strategies for high-performance file operations.\n    - **Scalable Architecture**: Designed to handle large-scale file operations across multi-threaded environments.\n    - **Optimize JSON Marshalling**: Uses `jsoniter` for faster JSON marshalling.\n    - **Support WebSockets**: Supports WebSocket for real-time file system monitoring.\n- **Dockerized**: Packaged with Docker for easy deployment and integration into any infrastructure.\n\n## Getting Started\n1. Build the Go application\n```bash\ngo build -o filetree-api ./cmd/server\n```\n\n2. Create the necessary environment variables for secure encryption:\n    Generate `FILETREE_SECRET_KEY`:\n    ```sh\n    echo FILETREE_SECRET_KEY=$(xxd -g 2 -l 32 -p /dev/random | tr -d '\\n')\n    ```\n\n    Generate `FILETREE_SECRET_SALT`:\n    ```sh\n    echo FILETREE_SECRET_SALT=$(xxd -g 2 -l 32 -p /dev/random | tr -d '\\n')\n    ```\n\n    After generating these keys, make sure to set them as environment variables in your development environment or include them in your deployment configuration.\n\n3. Set the environment variables\n```bash\nexport FILETREE_PORT=8080\nexport FILETREE_SECRET_KEY=your-secret-key\nexport FILETREE_SECRET_SALT=your-secret-salt\n```\n\n4. Run the Go application\n```bash\n./filetree-api\n```\n\n## API Usage\nMake a GET request to the service with a signature and an encrypted folder path to retrieve the file tree structure of the specified directory.  \nThe signature is generated using the `FILETREE_SECRET_KEY` and `FILETREE_SECRET_SALT` environment variables.  \nThe encrypted folder path is generated using the `FILETREE_SECRET_KEY` and `FILETREE_SECRET_SALT` environment variables.\n```\nhttp://your-domain.com:your-port/\u003csignature\u003e/enc/\u003cencrypted_folder_path\u003e\n```\n\n## Projects Using FileTree-API\nSeveral projects are built on top of or with FileTree-API to extend its capabilities and offer more features. Here's a list of such projects:\n\n- [PHP-FileTree](https://github.com/carry0987/PHP-FileTree): A PHP script for generating signed and encrypted URLs with FileTree-API, using AES-256-GCM and HMAC-SHA256.\n\nWe encourage the community to build more projects leveraging FileTree-API's powerful image processing capabilities. If you have a project that uses FileTree-API, feel free to open a pull request to add it to this list!\n\n## Contributing\nWe welcome all forms of contributions, whether it be submitting issues, writing documentation, or sending pull requests.\n\n## License\nThis project is licensed under the [MIT](LICENSE) License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarry0987%2Ffiletree-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarry0987%2Ffiletree-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarry0987%2Ffiletree-api/lists"}