Creating Your Bot Project
Now that you have Node.js installed and your bot account configured, it's time to create your first yurba.js project. This guide will walk you through setting up a professional project structure with proper configuration management and security practices.
Project Initialization
Step 1: Create Project Directory
First, create a dedicated directory/folder for your bot project:
cd my-yurba-botStep 2: Initialize Package.json
Initialize your Node.js project using your preferred package manager:
npm inityarn initpnpm initbun initYou'll be prompted to fill out project information. Here's an example configuration:

Step 3: Verify Package.json
After initialization, your package.json should look similar to this:
{
"name": "my-yurba-bot",
"version": "1.0.0",
"description": "A powerful bot built with yurba.js",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": ["yurba", "bot", "yurba.js", "automation"],
"author": "Your Name",
"license": "MIT"
}2
3
4
5
6
7
8
9
10
11
12
Configuration Files
Create a .env file and the config.json file
YURBA_TOKEN=your-token-here{
"prefix": "/"
}Security Warning
Never commit sensitive files like .env or config.json containing tokens to version control. These files contain private credentials that should be kept secure.
Make sure to add these files to your .gitignore to prevent accidental commits.
Git Setup
What is Git?
Git is a distributed version control system that helps you track changes in your code, collaborate with others, and manage different versions of your project.
Initialize Git
git initTIP
If you use GitHub or GitLab, you can initialize your repository with these commands:
git remote add origin https://github.com/username/repository-name.git
git branch -M main
git push -u origin maingit remote add origin https://gitlab.com/username/repository-name.git
git branch -M main
git push -u origin mainCreate .gitignore
Create a comprehensive .gitignore file to exclude sensitive and unnecessary files:
What is `.gitignore`?
The .gitignore file specifies which files and directories Git should ignore and not track in version control. Any files or folders listed in .gitignore will not be included in git commits.
# Dependencies
node_modules/
# Environment variables and configuration
.env# Dependencies
node_modules/
config.json # if it contains tokens or other sensitive information
# Environment variables and configuration
.env