This Laravel-based application serves as the backend for a Telegram bot, featuring an administrative panel powered by Laravel Nova. Initially created for non-profit Young Folks Latvia
Before you begin, ensure you have the following:
- Docker and Docker Compose: The application is containerized, making it easy to build and deploy.
- MySQL Database: The application requires a MySQL database. MariaDB is preferable. Ensure you have access to a MySQL server instance.
- Telegram Bot API Token: You'll need to create a Telegram bot via BotFather to obtain your API token.
- Laravel Nova License: Laravel Nova is utilized for the admin panel. A license is required for its use. Purchase and more information are available at Laravel Nova.
-
Clone the Repository
Start by cloning this repository to your local machine or server.
-
Environment Configuration
Rename the
.env.example
file to.env
and update the environment variables, including your database credentials and Telegram Bot API token. -
Docker Compose
Use Docker Compose to build and start the containers. The application will be available on port 80. Run the following command in the root directory of the project:
docker-compose up -d
Ensure your DNS record is pointing to Docker. You might want to change port, the app is working on. This app requires webhooks to be accessible for Telegram.
-
Laravel Setup
After the containers are up and running, execute the following commands to set up Laravel:
docker-compose exec php-yf php artisan key:generate docker-compose exec php-yf php artisan migrate
Create UsersTableSeeder file and adjust Permissions seeders accordingly
docker-compose exec php-yf php artisan db:seed
-
Version
Currently only version 4.x is supported
-
Install Laravel Nova
Follow the instructions provided by Laravel Nova for installation. Remember, you must have purchased a license to use Laravel Nova.
-
Create Users and Permissions
After setting up Laravel Nova, you will need to create users and assign them appropriate permissions. This ensures that only authorized users can access the admin panel.
Once everything is set up, your Laravel Telegram Bot application is ready to use. Access it through your web browser at http://localhost
or the configured domain/IP address.
We welcome contributions! Please feel free to ask questions, to fork the repository, make changes, and submit pull requests.
This application is open-source software licensed under the MIT license.
Remember to customize the instructions and information based on your specific application details and requirements.