TeleS3 or Telegram S3 is a free, opensource and unlimited file sharing/hosting platform based on Telegram Bot API.
- File Upload Limit : 20MB
- Free : Yes
- Unlimited : Yes
-
Frontend
The frontend of the TeleS3 is built with React in Typescript on top of the Vite template. Some important packages used are
- react-router-dom
- @reduxjs/toolkit
- axios
And Tailwind CSS is used for styling
-
Backend
The backend is built on Laravel 11. Only the api routes are used for working with the backend. There are only 4 routes that we interact with in the backend which are meant for status check, file upload, file existence check and file download.
The app can be deployed using Docker Compose. Follow the below steps accordingly.
-
Clone the github repositry in the desired directory
git clone https://github.com/yashkolambekar/teles3 .
-
Create an
.env
in the root directory (which has the docker-compose.yaml file) and fill enter all the environment variables / arguments that are mentioned in/docker-compose.yaml
The env file should look something like this
VITE_BACKEND_API=https://backend.example.com BOT_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXX (and so on)
-
Edit the
/docker-compose.yaml
file as per the requirements (if needed) -
Run the docker compose up command
docker compose up --build -d
Follow the below commands to start developing
-
Clone the github repo in the desired folder
git clone https://github.com/yashkolambekar/teles3 .
-
Frontend Setup
-
cd into the frontend folder
cd frontend
-
Clone the .env.example file
cp .env.example .env
-
Fill in the values in the .env file
VITE_BACKEND_API for development should be something like
http://localhost:8000
but it depends on your laravel config -
Install the dependencies
npm i
-
Run the development server
npm run dev
The frontend will be accessible on
http://localhost:5173
The following steps should be followed in a new terminal instance or the frontend server will be closed
-
-
Backend setup
-
cd into the backend folder
cd ../backend
-
Copy the
.env.example
filecp .env.example .env
-
Edit the values in
.env
file-
APP_ENV
should be changed from production to local -
DB_CONNECTION
should be changed as per the preference, we can choose betweensqlite
,mysql
,mariadb
andpostgres
. Please refer the laravel docs for DB env variables for specific databases -
If the DB_CONNECTION is set to sqlite, please comment the DB_DATABASE env, it is not required
-
Enter the TeleS3 Envs at the end of the file
-
-
Installing dependencies
composer install
If you get some error while doing this, install
php-xml
from apt and then retry the command -
Generate app key
php artisan key:generate
-
Run migrations
php artisan migrate:fresh
If some error is encountered while doing this, you may consider install
php-sqlite3
from apt and then retry the command -
Start the server
php artisan serve
The backend server will be up on
http://localhost:8000
-