{"id":25972983,"url":"https://github.com/dominux/pentaract","last_synced_at":"2025-05-16T16:05:58.665Z","repository":{"id":201941162,"uuid":"706876279","full_name":"Dominux/Pentaract","owner":"Dominux","description":"Unlimited file cloud storage based on using Telegram API","archived":false,"fork":false,"pushed_at":"2025-01-05T09:51:39.000Z","size":300,"stargazers_count":335,"open_issues_count":7,"forks_count":26,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-12T14:59:02.023Z","etag":null,"topics":["asynchronous","axum","cloud","docker","filesystem","javascript","rust","solidjs","spa","telegram-bot-api","tokio"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/Dominux.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,"zenodo":null}},"created_at":"2023-10-18T19:39:21.000Z","updated_at":"2025-04-11T17:37:54.000Z","dependencies_parsed_at":"2023-10-30T17:23:37.396Z","dependency_job_id":"60bc9ee3-3876-4976-aad6-9a148462bd9f","html_url":"https://github.com/Dominux/Pentaract","commit_stats":null,"previous_names":["dominux/pentaract"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dominux%2FPentaract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dominux%2FPentaract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dominux%2FPentaract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dominux%2FPentaract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dominux","download_url":"https://codeload.github.com/Dominux/Pentaract/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254564124,"owners_count":22092122,"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":["asynchronous","axum","cloud","docker","filesystem","javascript","rust","solidjs","spa","telegram-bot-api","tokio"],"created_at":"2025-03-05T01:18:26.872Z","updated_at":"2025-05-16T16:05:58.639Z","avatar_url":"https://github.com/Dominux.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"![pentaract-github-logo](https://github.com/Dominux/Pentaract/assets/55978340/db39e76f-4119-41c1-bbfd-9b59f40ab626)\n\n[\u003cimg alt=\"GitHub Workflow Status (with event)\" src=\"https://img.shields.io/github/actions/workflow/status/Dominux/Pentaract/docker-image.yml?style=plastic\u0026logo=github\"\u003e](https://github.com/Dominux/Pentaract/actions)\n[\u003cimg alt=\"Dockerhub latest\" src=\"https://img.shields.io/badge/dockerhub-latest-blue?logo=docker\u0026style=plastic\"\u003e](https://hub.docker.com/r/thedominux/pentaract)\n[\u003cimg alt=\"Docker Image Size (tag)\" src=\"https://img.shields.io/docker/image-size/thedominux/pentaract/latest?style=plastic\u0026logo=docker\u0026color=gold\"\u003e](https://hub.docker.com/r/thedominux/pentaract/tags?page=1\u0026name=latest)\n[\u003cimg alt=\"Any platform\" src=\"https://img.shields.io/badge/platform-any-green?style=plastic\u0026logo=linux\u0026logoColor=white\"\u003e](https://github.com/Dominux/Pentaract)\n\n_Cloud storage system based on using Telegram as a storage so it doesn't use your server filesystem or any other paid cloud storage system underneath the hood._\n\n**BTC**: `18mquj59AcB4y4VBevdn5HekG5y7gvPYGk`\n\n**TON**: `UQDoGRgUIEDA30cko8k-icnI8S5i8QIq2jFvqswNvVUc9F2U`\n\n**USDT TON**: `UQDoGRgUIEDA30cko8k-icnI8S5i8QIq2jFvqswNvVUc9F2U`\n\nhttps://github.com/Dominux/Pentaract/assets/55978340/b62305a7-cae3-4e1c-a509-38e415392dcf\n\nPentaract is aimed to take as small disk space as possible. So it does not need any code interpreter/platform to run. The whole app is just several megabytes in size. It also uses Postgres as a database and we try our best to economy space by not creating unneeded fields and tables and to wisely pick proper datatypes.\n\nThe platform itself can be used differently, like as a personal (on your own server or a local machine) platform or a platform for many users with multiple storages and so on. Since it provides Rest API, you can also use it as a file system in your backend like [NextCloud](https://nextcloud.com/) or [AWS S3](https://aws.amazon.com/s3/) or S3 compatable services (like [MinIO](https://min.io/)), but for now it's so early so I don't recommend to use it in production ready apps.\n\n# Installation\n\nThis project is aimed on running the app in container, so the primary way to run it is via [Docker](https://www.docker.com/). If you don't have it installed or simply don't want to run the app via Docker, you can build it from source.\n\n\u003e NOTE: Pentaract uses [Postgres](https://www.postgresql.org/) as a database. So if you are going to run it from source or run the Pentaract image only, you will need to have a Postgres instance running and available in your network so you will connect your Pentaract app to it\n\n\u003cdetails\u003e\n  \u003csummary\u003eDocker Compose with pre-built image \u003ci\u003e(recommended)\u003c/i\u003e\u003c/summary\u003e\n\nThe simplest way to run and manage the app\n\n1. Create new directory for the app files and name it however you wish:\n\n```sh\nmkdir pentaract\n```\n\n2. Go to it and place `docker-compose.yml` file like this one:\n\n```yaml\nversion: \"3.9\"\n\nvolumes:\n  pentaract-db-volume:\n    name: pentaract-db-volume\n\nservices:\n  pentaract:\n    container_name: pentaract\n    image: thedominux/pentaract\n    env_file:\n      - .env\n    ports:\n      - ${PORT}:8000\n    restart: unless-stopped\n    depends_on:\n      - db\n\n  db:\n    container_name: pentaract_db\n    image: postgres:15.0-alpine\n    environment:\n      POSTGRES_USER: ${DATABASE_USER}\n      POSTGRES_PASSWORD: ${DATABASE_PASSWORD}\n    restart: unless-stopped\n    volumes:\n      - pentaract-db-volume:/var/lib/postgresql/data\n```\n\nAnd `.env` file like the next one. **Don't forget to set your superuser email, password and secret key**:\n\n```env\nPORT=8000\nWORKERS=4\nCHANNEL_CAPACITY=32\nSUPERUSER_EMAIL=\u003cYOUR-EMAIL\u003e\nSUPERUSER_PASS=\u003cYOUR-PASSWORD\u003e\nACCESS_TOKEN_EXPIRE_IN_SECS=1800\nREFRESH_TOKEN_EXPIRE_IN_DAYS=14\nSECRET_KEY=\u003cYOUR-SECRET-KEY\u003e\nTELEGRAM_API_BASE_URL=https://api.telegram.org\n\nDATABASE_USER=pentaract\nDATABASE_PASSWORD=pentaract\nDATABASE_NAME=pentaract\nDATABASE_HOST=db\nDATABASE_PORT=5432\n```\n\nSecret key can be set by your hand, but I strongly recommend to use long randomly generated sequences. So you either can generate it via some free websites that provide such funcionallity or by running something like this in the terminal:\n\n```sh\nopenssl rand -hex 32\n```\n\n3. For now everything is set up so we can run our app:\n\n```sh\ndocker compose up -d\n```\n\nTo check if everything works fine you can go to http://localhost:8000 or to `http://\u003cYOUR-PUBLIC-IP\u003e:8000` if you run it on a server.\n\nIf there are troubles, you can check the logs, there may be some errors:\n\n```sh\ndocker logs -f pentaract\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eDocker Compose from source\u003c/summary\u003e\n\nKind of simple way, but it's aimed to use it during development process\n\n1. Clone the repository and go inside the newly created directory:\n\n```sh\ngit clone git@github.com:Dominux/Pentaract.git\n```\n\n2. Copy `.env.example` to `.env`:\n\n```sh\ncp ./.env.example ./.env\n```\n\nand edit it like you wish.\n\n3. For now everything is set up so we can run our app:\n\n```sh\nmake up\n```\n\nTo check if everything works fine you can go to http://localhost:8000 or to `http://\u003cYOUR-PUBLIC-IP\u003e:8000` if you run it on a server.\n\nIf there are troubles, you can check the logs, there may be some errors:\n\n```sh\ndocker logs -f pentaract\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eDocker with pre-built image\u003c/summary\u003e\n\n**TODO**\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eFrom source\u003c/summary\u003e\n\nThe most complex way to run the app.\n\nRequires the next stuff to be installed:\n\n- [Cargo](https://github.com/rust-lang/cargo)\n- [Node.js](https://nodejs.org/en)\n- [pnpm](https://pnpm.io/)\n- [Postgres](https://www.postgresql.org/)\n\n1. Create a directory to place all the app files wherever in your system:\n\n```sh\nmkdir ~/pentaract\n```\n\n2. Clone the repository and go inside the newly created directory:\n\n```sh\ngit clone git@github.com:Dominux/Pentaract.git\n```\n\n3. Go to the `./pentaract` directory and build server side app:\n\n```sh\ncd ./pentaract\ncargo build --release\n```\n\nand copy the target to the app directory (or create a soft link via `ln -s`, does not matter):\n\n```sh\ncp ./target/release/pentaract ~/pentaract/pentaract\n```\n\n4. Go to the `../ui` and build the UI side of the app:\n\n```sh\ncd ../ui\npnpm run build\n```\n\nand copy built files into the app directory:\n\n```sh\ncp ./dist/* ~/pentaract/ui/\n```\n\n5. Now go to the app directory:\n\n```sh\ncd ~/pentaract\n```\n\n6. Make sure that you have Postgres database ran in your system (or available from network)\n7. Set all needed environment variables. You can check them in the [.env.example file](https://github.com/Dominux/Pentaract/blob/main/.env.example). **Don't forget to set right Postgres credentials, host and port**:\n\n```sh\nexport PORT=8000\nexport WORKERS=4\n# ...\n```\n\n8. Finally run the app:\n\n```sh\n./pentaract\n```\n\nTo check if everything works fine you can go to http://localhost:8000 or to `http://\u003cYOUR-PUBLIC-IP\u003e:8000` if you run it on a server.\n\n\u003c/details\u003e\n\n\u003cbr/\u003e\n\nIt's also recommended to use a HTTP reverse-proxy, like [Nginx](https://www.nginx.com/) or [Traefik](https://traefik.io/traefik/) if you use containarized version of the app and don't wanna work with Nginx and certbot.\n\n# Usage\n\nThe platform is tied to the \"storages\" concept. Every storage is a separated files system, like different volumes on your drive. It provides funcionallity to work with a file system like it's Google Drive: you can create files and folders, download files, see files and folders info and delete them on your wish.\n\nIn our case every storage has its own Telegram channel, where it will store all the data.\n\nThe platform also uses \"storage workers\". It is telegram bots that are used to upload and download files from the telegram API\n\n## Telegram API limitations\n\nTelegram has its policy to limit some access to their platform. For us the main limitations are:\n\n- Requests per a period for one bot (RPM)\n- File size\n\nPentaract has ways to workaround them:\n\n### RPM\n\nTo workaround RPM users can create additional storage workers. For now one user can create up to 20 bots. You can also create additional accounts to create extra bots or ask your nearest for example to do so. This way from up to Telegram limitations it becomes up to you on how fast you can upload/download in Pentaract storage.\n\nI should notice that current RPM (20 requests per minute) is completely fine to work with a single storage worker if you need the storage to be your own and don't need to upload/download big files fast.\n\n### File size\n\nCurrently Telegram API limits file download to 20 MB, hence we can't upload files more than that limit too.\n\nPentaract divides uploaded files into chunks and save them to Telegram separately and on downloading a file it fetches all the file chunks from the Telegram API and combine them into one in the order it was divided in. That grants ability to upload and download files with almost unlimited size (it's like you've ever downloaded a file with size \u003e10 GB).\n\n## Current in storage features\n\n- [x] Upload file\n- [x] Download file\n- [x] Create folder\n- [x] Get file/folder info\n- [x] Delete file/folder\n\n## Access\n\nYou can manage access to your storages by granting access to other users. For now, there are 3 possible roles:\n\n- Viewer\n- Can edit\n- Admin\n\nSo you can grant access, change it or restrict (delete access) for other users.\n\n# Donations\n\nIf you find this project useful and would like to see it continue to grow and improve, your support is greatly appreciated! Your donation will help cover the costs of development, maintenance, and future enhancements. Every contribution, no matter the size, makes a significant impact:\n\n**BTC**: `18mquj59AcB4y4VBevdn5HekG5y7gvPYGk`\n\n**TON**: `UQDoGRgUIEDA30cko8k-icnI8S5i8QIq2jFvqswNvVUc9F2U`\n\n**USDT TON**: `UQDoGRgUIEDA30cko8k-icnI8S5i8QIq2jFvqswNvVUc9F2U`\n\n# Future plans\n\nCloud storage system has a huge variety of possible ways to develop in. Like it can be a file hosting service, a cloud object storage, a cloud drive or anything else or everything in one place. And I personally don't have idea right now where to move and what users need so I'd like to know what features you would like this app to provide.\n\n# Contributing\n\nIs highly welcoming! Create issues or take existing ones and create PRs!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdominux%2Fpentaract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdominux%2Fpentaract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdominux%2Fpentaract/lists"}