Developer Onboarding Guide for Digital Samba Voice Chatbot
Introduction
This document provides a comprehensive guide for developers who are new to the Digital Samba Voice Chatbot repository. It's designed to help you understand the codebase and contribute effectively, even if you're not an expert in all the technologies used.
Important Note: Setting up a local development environment is optional. All commits to the main branch are automatically deployed to https://voicebot-dev.digitalsamba.com/. This means you can make changes in three ways:
- Directly through GitHub's web interface
- By cloning the repository and using your preferred editor (recommended)
- By setting up a full local development environment (for complex changes)
Repository Overview
The Digital Samba Voice Chatbot is a voice-enabled chatbot integration for Digital Samba's WebRTC video conferencing platform. The project allows users to interact with the platform using voice commands, enhancing the accessibility and user experience of Digital Samba's video conferencing solution.
Getting Started
Contribution Workflows
You have three options for contributing to this project:
Option 1: GitHub Web Interface (Quick Changes)
- Browse the code directly on GitHub
- Make changes using the GitHub web editor
- Commit changes to a new branch
- Create a pull request to merge your changes
- View your changes at https://voicebot-dev.digitalsamba.com/ once merged to main
This approach is perfect for documentation updates, simple bug fixes, or minor enhancements.
Option 2: Clone Repository Only (Recommended)
This option lets you edit files locally with your preferred editor without setting up the full development environment:
-
Clone the repository
git clone https://github.com/digitalsamba/voice-chatbot.git cd voice-chatbot
-
Create a new branch
git checkout -b feature/your-feature-name
-
Edit files using your favorite code editor
-
Commit and push your changes
git add . git commit -m "Add feature: description of your changes" git push origin feature/your-feature-name
-
Create a pull request on GitHub
-
View your changes at https://voicebot-dev.digitalsamba.com/ once merged to main
This approach gives you the benefits of local editing without needing to set up the build environment.
Option 3: Full Local Development Environment (Complex Changes)
For complex changes that require testing or extensive development, you may want to set up a complete local environment.
Setting Up Your Development Environment (Optional)
Prerequisites:
- Git
- Node.js (version X.X.X or higher)
- npm (usually comes with Node.js)
- [Any other tools needed]
Follow these steps if you choose to set up a local development environment:
-
Clone the repository
git clone https://github.com/digitalsamba/voice-chatbot.git cd voice-chatbot
-
Install dependencies
npm install
-
Set up environment variables
- Copy
.env.example
to.env
- Fill in the required values (contact the project manager for access keys if needed)
- Copy
-
Start the development server
npm run dev
Project Structure
Here's an overview of the key directories and files in the project:
voice-chatbot/
├── src/ # Source code
│ ├── api/ # API integrations
│ ├── components/ # UI components
│ ├── services/ # Service layer
│ │ ├── speech/ # Speech recognition services
│ │ ├── nlp/ # Natural language processing
│ │ └── samba/ # Digital Samba integration
│ ├── utils/ # Utility functions
│ └── main.js # Application entry point
├── config/ # Configuration files
├── public/ # Static assets
├── tests/ # Test suite
└── docs/ # Documentation
Key Concepts
Voice Recognition
The voice recognition system uses [technology name] to convert spoken language into text. This happens in src/services/speech/recognition.js
.
Natural Language Processing
Once the speech is converted to text, the NLP system interprets the user's intent. This is handled in src/services/nlp/
.
Digital Samba Integration
The integration with Digital Samba's platform is managed through their SDK. The key integration points are:
- Room joining and session management
- Audio/video stream handling
- User presence and status
Development Workflow
Making Changes
Option 1: Via GitHub Web Interface
- Navigate to the repository on GitHub
- Browse to the file you want to edit
- Click the pencil icon to edit the file
- Make your changes in the editor
- Scroll down and add a descriptive commit message
- Select "Create a new branch for this commit and start a pull request"
- Name your branch appropriately (e.g.,
feature/add-voice-command
) - Click "Propose changes"
- Complete the pull request form and submit
Option 2: Via Local Editor (Without Full Environment)
- Make your changes in your preferred editor
- Commit your changes with a descriptive message:
git add . git commit -m "Add feature: description of your changes"
- Push your branch to the repository:
git push origin feature/your-feature-name
- Create a pull request on GitHub for review
Option 3: Via Full Local Development
-
Create a new branch for your feature or bugfix:
git checkout -b feature/your-feature-name
-
Make your changes, following the coding standards outlined below.
-
Test your changes locally:
npm test
-
Commit your changes with a descriptive message:
git commit -m "Add feature: description of your changes"
-
Push your branch to the repository:
git push origin feature/your-feature-name
-
Create a pull request on GitHub for review.
Deployment
The project has an automated CI/CD pipeline set up. Any code merged into the main
branch will automatically be deployed to the development environment at:
https://voicebot-dev.digitalsamba.com/
Important Notes about Deployment:
- Deployment happens automatically - no manual steps required
- Changes typically appear within 5-10 minutes after merging to main
- You can view the deployment status in the GitHub Actions tab
- Always check your changes on the dev site after deployment
- Deployment failures will be notified via GitHub
Before merging to main
, ensure:
- All tests pass (if running locally)
- Your code has been reviewed and approved
- Your changes meet the project's quality standards
Testing
Option 1: Testing Without Local Setup
If you're not using a local development environment, you can still validate your changes:
- Create a pull request - this will trigger automated tests in GitHub Actions
- Review the test results in the pull request status
- Request a code review from team members
- Test directly on the dev environment after merging to main
- Check your changes in action on https://voicebot-dev.digitalsamba.com/
Option 2: Testing With Git Clone Only
If you've cloned the repository but haven't set up the full environment:
- Review your code changes carefully in your editor
- Use your editor's linting tools if available
- Create a pull request to trigger automated tests
- After merging, test on the dev environment
Option 3: Testing Locally
If you've set up a local development environment, you can run tests locally:
npm test
For component testing, use:
npm run test:components
Common Tasks
Adding a New Voice Command
Via GitHub Web Interface:
- Navigate to
src/services/nlp/intents.js
on GitHub - Add your new intent definition
- Create a new handler file in the
src/services/nlp/handlers/
directory - Update documentation as needed
- Create a pull request with your changes
Via Local Editor (Without Full Environment):
- Open
src/services/nlp/intents.js
in your editor - Add your new intent definition
- Create a handler file in
src/services/nlp/handlers/
- Update documentation as needed
- Commit and push your changes
- Create a pull request
Via Full Local Development:
- Define the intent in
src/services/nlp/intents.js
- Create a handler for the intent in
src/services/nlp/handlers/
- Add test cases in
tests/nlp/
- Update the documentation in
docs/commands.md
- Test locally and submit a pull request
Modifying the UI
Via GitHub Web Interface:
- Navigate to the component you want to modify in
src/components/
- Make your changes following the project's design guidelines
- Create a pull request with your changes
- After merging, check the deployment to verify your changes
Via Local Editor (Without Full Environment):
- Open the component file in
src/components/
using your editor - Make your changes following the project's design guidelines
- Commit and push your changes
- Create a pull request
- After merging, check your changes on the deployment site
Via Full Local Development:
- Locate the relevant component in
src/components/
- Make your changes following the project's design guidelines
- Test the changes in different browsers and screen sizes
- Update any affected documentation
- Submit a pull request with your changes
Troubleshooting
Common Issues
-
Speech recognition not working
- Check browser permissions for microphone access
- Verify WebRTC compatibility with your browser
-
Integration with Digital Samba failing
- Ensure your API keys are correctly set in
.env
- Check the console for specific error messages
- Ensure your API keys are correctly set in
-
Build errors
- Run
npm clean-install
to refresh dependencies - Check for Node.js version compatibility
- Run
Getting Help
If you're stuck or have questions:
- Check existing documentation in the
docs/
directory - Look for similar issues in the project's issue tracker
- Contact [team contact info] for direct assistance
Coding Standards
- Use ES6+ features where appropriate
- Follow the existing code formatting style (enforced by ESLint)
- Write meaningful comments for complex logic
- Include JSDoc comments for functions
- Create unit tests for new functionality
Resources
This guide is a living document. If you find areas that need improvement or have suggestions, please update it or create an issue with your recommendations.