This document provides detailed instructions on how to install and run Pagu for development purposes.
Before proceeding, ensure that your system meets the following requirements:
- Go: Pagu is developed using the Go programming language. You can find installation instructions here.
- Database: Pagu uses MySQL as its primary database in production. For local development, you can use SQLite.
Follow these steps to install and configure Pagu on your local machine:
Clone the Pagu repository to your local machine:
git clone https://github.com/pagu-project/pagu.git
cd pagu
Install the necessary development tools by running:
make devtools
You can run local Pactus nodes and configure them in your config.yml
.
Refer to the Pactus Daemon documentation.
Alternatively, Pagu can fetch information from public nodes without requiring a local node.
Pagu requires a Pactus wallet to manage transactions. If you don’t have a wallet, follow the instructions to create one. A wallet is essential for sending transactions through Pagu.
If you plan to run Pagu on a Discord server, you will need a Guild ID and a Discord application token. These can be obtained by following the Discord Developer Guide.
If you plan to run Pagu on Telegram, you will need a Telegram Bot Token.
Run Pagu using the Command-Line Interface (CLI) without the need for integration into Discord or Telegram. Use the following command:
go run ./cmd/cli -c ./config/config.sample.yml run
We are excited to welcome contributions to Pagu! To get started, follow these steps:
-
Fork the Repository Create a fork of the Pagu repository in your GitHub account.
-
Create a New Branch Create a feature-specific branch for your work:
git checkout -b feature/YourFeature
-
Make Your Changes Implement your feature or fix as needed.
-
Build and Test Your Changes Ensure your changes build successfully and pass all tests:
make build make test
-
Follow Linting and Code Conventions Verify that your code adheres to Pagu's linting rules and coding standards:
make check
-
Commit Your Changes Write a clear and concise commit message describing your changes:
git commit -m "Add feature: YourFeature"
-
Push to Your Branch Push your changes to the branch in your forked repository:
git push origin feature/YourFeature
-
Open a Pull Request (PR) Submit a Pull Request to the original Pagu repository. Include a detailed description of your changes and reference any related issues.