-
Clone the Repository: Clone the repository and navigate to its directory.
-
Create the
.env
File: Copy the.env.example
file to create your.env
file:cp .env.example .env
-
Configure the
.env
File: Edit the.env
file to set up the application URL, database connection, and other necessary configurations. -
Install Dependencies: Run the following commands to install PHP and Node.js dependencies, generate the application key, and run database migrations:
composer install php artisan key:generate php artisan migrate npm install npm run build
-
Add Telegram Bot API Token: Add your Telegram bot API token to the
.env
file:TELEGRAM_TOKEN=your-telegram-bot-token
-
Initialize the Bot: Run the following command to set up the bot's commands and description:
php artisan bot:init
-
Access @BotFather: Find
@BotFather
in the Telegram app or open the following URL in the browser https://BotFather.t.me/. -
Configure the Mini App:
- Send the
/setmenubutton
command to@BotFather
. - Choose the bot you want to associate with the Mini App.
- Provide the Mini App URL, e.g.,
https://example.com/telegram-web-app
. - Set the button title, for example, "Tasks".
- Send the
For local development, follow the same steps as for production installation, with a few modifications:
-
Start the Development Server: Use the following command to start the development server:
npm run dev
To set up the Mini App for local development, provide @BotFather
with the local development URL of your app.