arhen / teledrive

The Google Drive/OneDrive/etc alternative using Telegram API

Home Page:https://teledriveapp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸš€ TeleDrive

This is the open source project of Google Drive/OneDrive/iCloud/Dropbox alternative using Telegram API for the free unlimited cloud storage.

img

Motivation

Requirements

  • node ^14
  • psql ^13
  • yarn

Getting Started

  • Create Telegram application

  • Create a Telegram bot for forwarding messages from the contact form to your Telegram with BotFather

  • Install the PostgreSQL as a database and sync the schema

    yarn server typeorm schema:sync

Installation

  • Define .env in ./server/.env from ./server/.env-example and ./web/.env from ./web/.env-example

    • Server variables

      env required description
      RPS no Rate limit API per second, default: 20
      TG_API_ID yes Application ID from your Telegram App
      TG_API_HASH yes Application hash from Telegram App
      TG_BOT_TOKEN yes Telegram bot token
      TG_BOT_OWNER_ID yes Chat ID for sending messages to you
      DB_HOST no Database host URI, default: localhost
      DB_NAME yes Database name
      DB_PORT no Database port, default: 5432
      DB_USERNAME yes Database username
      DB_PASSWORD yes Database password
      GITHUB_TOKEN yes GitHub token for getting contributors
      API_JWT_SECRET yes Random string for hashing auth token
      FILES_JWT_SECRET yes Random string for encrypt public files
      PAYPAL_CLIENT_ID yes Client ID for PayPal subscription
      PAYPAL_CLIENT_SECRET yes Client secret for PayPal subscription
      PAYPAL_PLAN_PREMIUM_ID yes Product ID for premium plan
    • Web variables

      env required description
      REACT_APP_API_URL no Base URL for the API, default: '' (empty string)
  • Install dependencies

    yarn install
  • Build all

    yarn workspaces run build
  • Run

    # All services will served in server with Express
    yarn server node .

Or, if you want to run in the local environment:

  • Build server

    yarn server build -w
  • Run server

    yarn server start
  • Run web

    # Define the REACT_APP_API_URL in web/.env first, then
    yarn web start

How to Contribute

  • Fork and clone this repository
  • Commit your changes
  • Create a pull request to the staging branch

Or, just send us an issue for reporting bugs and/or ask the questions, share your ideas, etc in discussions.

Folder Structure

We using the monorepo structure with yarn workspaces.

.
β”œβ”€β”€ README.md
β”œβ”€β”€ package.json
β”œβ”€β”€ server
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ src
β”‚   β”‚   └── index.ts
β”‚   └── tsconfig.json
β”œβ”€β”€ web
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ public
β”‚   β”œβ”€β”€ src
β”‚   β”‚   β”œβ”€β”€ pages
β”‚   β”‚   └── App.tsx
β”‚   β”œβ”€β”€ tsconfig.json
β”‚   └── yarn.lock
└── yarn.lock

About

The Google Drive/OneDrive/etc alternative using Telegram API

https://teledriveapp.com

License:GNU General Public License v3.0


Languages

Language:TypeScript 95.3%Language:JavaScript 2.7%Language:HTML 1.3%Language:CSS 0.8%Language:Less 0.0%