Skip to the content.

Getting Started Guide

Welcome to the BugBounty KSP platform! This guide will help you get up and running quickly.

๐Ÿ“‹ Prerequisites

Before you begin, ensure you have the following installed:

๐Ÿš€ Quick Start

1. Clone the Repository

git clone https://github.com/BugBounty-MockingBird/YourRepository.git
cd YourRepository

2. Install Dependencies

npm install
# or
yarn install

3. Environment Configuration

Create a .env file in the root directory:

# Database Configuration
DATABASE_URL=postgresql://user:password@localhost:5432/bugbounty_ksp
REDIS_URL=redis://localhost:6379

# API Configuration
API_PORT=3000
API_BASE_URL=http://localhost:3000

# Discord Configuration
DISCORD_BOT_TOKEN=your_discord_bot_token
DISCORD_CLIENT_ID=your_client_id
DISCORD_CLIENT_SECRET=your_client_secret

# n8n Configuration
N8N_WEBHOOK_URL=http://localhost:5678

# Security
JWT_SECRET=your_secret_key
SESSION_SECRET=your_session_secret

# Environment
NODE_ENV=development

4. Database Setup

Initialize the database and run migrations:

npm run db:setup
npm run db:migrate
npm run db:seed

5. Start the Application

Development mode with hot-reload:

npm run dev

Production mode:

npm run build
npm start

6. Verify Installation

Open your browser and navigate to:

๐Ÿ“ฆ Project Structure

.
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ api/          # API endpoints and controllers
โ”‚   โ”œโ”€โ”€ components/   # React components
โ”‚   โ”œโ”€โ”€ services/     # Business logic services
โ”‚   โ”œโ”€โ”€ models/       # Database models
โ”‚   โ”œโ”€โ”€ utils/        # Utility functions
โ”‚   โ””โ”€โ”€ config/       # Configuration files
โ”œโ”€โ”€ docs/             # Documentation
โ”œโ”€โ”€ tests/            # Test files
โ”œโ”€โ”€ public/           # Static assets
โ””โ”€โ”€ package.json      # Dependencies

๐Ÿ”‘ First Steps

1. Create Your First User

npm run create-user -- --email admin@example.com --password secure123

2. Access the Dashboard

Log in with your credentials at http://localhost:3000/login

3. Explore the Features

๐Ÿงช Running Tests

Run the test suite:

# Run all tests
npm test

# Run with coverage
npm run test:coverage

# Run specific test file
npm test path/to/test.spec.js

๐Ÿ› Troubleshooting

Port Already in Use

If port 3000 is already in use:

# Change port in .env file
API_PORT=3001

Database Connection Issues

Verify PostgreSQL is running:

# Check PostgreSQL status
sudo systemctl status postgresql

# Restart PostgreSQL
sudo systemctl restart postgresql

Module Not Found Errors

Clear cache and reinstall:

rm -rf node_modules package-lock.json
npm install

๐Ÿ“š Next Steps

๐Ÿ†˜ Getting Help

If you encounter issues:

  1. Check the Troubleshooting section
  2. Search existing issues
  3. Join our Discord community
  4. Create a new issue with detailed information

โ† Back to Home Next: Architecture โ†’