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:
- Node.js (v18 or higher)
- npm or yarn package manager
- Git for version control
- Docker (optional, for containerized deployment)
- PostgreSQL (v14 or higher)
- Redis (for caching and session management)
๐ 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:
- Frontend:
http://localhost:3000 - API:
http://localhost:3000/api - Health Check:
http://localhost:3000/health
๐ฆ 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
- Dashboard: Overview of your bounty programs
- Programs: Create and manage bug bounty programs
- Submissions: Review and triage security reports
- Integrations: Connect Discord and n8n workflows
- Knowledge Base: Access learning resources
๐งช 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
- Review the Architecture & Design Decisions
- Learn about the API Reference
- Explore Frontend Components
- Set up n8n Workflows
- Configure Discord Integration
๐ Getting Help
If you encounter issues:
- Check the Troubleshooting section
- Search existing issues
- Join our Discord community
- Create a new issue with detailed information
| โ Back to Home | Next: Architecture โ |