{"id":18523948,"url":"https://github.com/liplum/meditree","last_synced_at":"2025-04-09T11:31:49.631Z","repository":{"id":65852790,"uuid":"601066691","full_name":"liplum/Meditree","owner":"liplum","description":"Share your media anywhere in a tree with various backends and frontends.","archived":false,"fork":false,"pushed_at":"2024-05-23T00:05:24.000Z","size":3571,"stargazers_count":9,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-23T00:26:51.169Z","etag":null,"topics":["backend","dart","express","flutter","frontend","fullstack","go","javascript","kotlin","nodejs","react","server","spring","spring-boot","typescript","vue","website"],"latest_commit_sha":null,"homepage":"https://liplum.github.io/Meditree/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liplum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-02-13T09:48:22.000Z","updated_at":"2024-05-23T00:26:53.982Z","dependencies_parsed_at":null,"dependency_job_id":"bcc68060-ef2b-4c72-be99-62ac16281f77","html_url":"https://github.com/liplum/Meditree","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liplum%2FMeditree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liplum%2FMeditree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liplum%2FMeditree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liplum%2FMeditree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liplum","download_url":"https://codeload.github.com/liplum/Meditree/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248031562,"owners_count":21036430,"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":["backend","dart","express","flutter","frontend","fullstack","go","javascript","kotlin","nodejs","react","server","spring","spring-boot","typescript","vue","website"],"created_at":"2024-11-06T17:38:34.210Z","updated_at":"2025-04-09T11:31:47.081Z","avatar_url":"https://github.com/liplum.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Meditree\n\n## Backend\n\n### Node.js /backend-js\n\nThis is an Express.js server that provides the following features:\n\n1. It serves a local file tree on the file system and monitors changes made to it.\n2. It supports plugins to add more features.\n\nTo learn more about `backend-js`, please refer to its [README](/backend-js/README.md).\n\n### Go /backend-go\n\nTo learn more about `backend-go` please refer to its [README](/backend-go/README.md).\n\n## Frontend\n\n### React /web-react\n\nThis is a single-page application (SPA) created with JavaScript and React Functional Component.\nIt offers the following features:\n\n1. A directory-tree-like view that makes it easy to browse files in one place.\n2. Case-insensitive file search in the root directory.\n3. Client-side routing for a better loading experience and to reduce server-side overhead.\n4. The same URL will end up with the same file. This can be shared across `web-react` and `web-vue`.\n\nTo learn more about `web-react` please refer to its [README](/web-react/README.md).\n\n### Vue /web-vue\n\nThis is a single-page application (SPA) created with TypeScript and Vue3 Composition API.\nIt offers the following features:\n\n1. A file-explorer-like view makes more sense for users.\n2. Case-insensitive file search in the current directory.\n3. Client-side routing for a better loading experience and to reduce server-side overhead.\n4. The same URL will end up with the same file. This can be shared across `web-react` and `web-vue`.\n\nTo learn more about `web-vue` please refer to its [README](/web-vue/README.md).\n\n## Application\n\n### Flutter /app-flutter\n\nTo learn more about `app-flutter` please refer to its [README](/app-flutter/README.md).\n\n## Deployment\n\nYou can combine ANY frontend implmenetation with ANY backend implmenetation\non the same server or multiple servers for free.\n\nHere's an example to deploy the `backend-js` + `web-react` + `nginx`.\n\nFirst, run `npm run build` to build the bundled production of `web-react`.\n\nThen you can configure the `meditree.json` like below.\nNote when you runs the `backend-js`, some essential settings will be generated on the fly.\n\n```json5\n{\n  \"name\": \"My-Meditree\", // Name to show.\n  \"port\": 8080, // 8080 doesn't require sudo on linux.\n  \"root\": \"/path/to/root\", // [optional] the root direcotry of a local file tree.\n  \"plugin\": {\n    \"homepage\": { // Use homepage plugin to serve a static webiste.\n      \"root\": \"/path/to/web-react/dist\"\n    },\n    \"watch\": true // Use watch plugin to watch local file changes.\n  }\n}\n```\n\nAfter configuring, run `npm start` in `backend-js`.\nYou can access the \"http://localhost:8080\" to check if the homepage is available,\nand access \"http://localhost:8080/list\" to ensure the backend is working.\n\nFinally, configure the nginx for port forwarding.\n\n```ruby\nserver {\n    listen 80;\n    server_name your_site.com;\n\n    # For example, serving the backend on 8080 port locally, and proxy it to 80 port and \"/\" externally.\n    location / {\n        proxy_pass http://localhost:8080;\n        proxy_set_header Host $host;\n        proxy_set_header X-Real-IP $remote_addr;\n    }\n}\n```\n\n## Interface\n\n### Payload structure\n\n```ts\ninterface File {\n  \"*type\": string\n  \"*tag\"?: Record\u003cstring, number | string | boolean\u003e\n  \"*hide\"?: boolean\n  size?: number\n}\n\ninterface Directory {\n  \"*tag\"?: Record\u003cstring, number | string | boolean\u003e\n  \"*hide\"?: boolean\n  [name: string]: File | Directory | Directory[\"*tag\"] | Directory[\"*hide\"]\n}\n```\n\n### Example\n\n```json5\n{\n  \"name\": \"MyServer\",\n  \"root\": {\n      // path: `/myText.txt`\n      \"myText.txt\": {\n        \"*type\": \"text/plain\",\n      },\n      // path: `/myFolder`\n      \"myFolder\": {\n        // path: `/myFolder/myVideo.mp4`\n        \"myVideo.mp4\": {\n          \"*type\": \"video/mp4\",\n        }\n      }\n  }\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliplum%2Fmeditree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliplum%2Fmeditree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliplum%2Fmeditree/lists"}