Development
Contribute to the NorthBuilt RAG System - testing, code standards, and PR workflow.
Overview
This section covers development workflows, testing strategies, and contribution guidelines. Note: This system is designed for AWS-native deployment - there is no traditional “local” environment.
Documents
1. Testing Guide
Test components in AWS with unit tests and integration tests.
- Unit testing with mocked AWS services
- AWS integration testing
- End-to-end API testing
- Load testing
- Terraform testing
Audience: Engineers Time: 25 minutes
2. Contributing
Branch strategy, PR process, and code standards.
- Development workflow
- Coding standards (Python, Terraform, JavaScript)
- Testing requirements
- Pull request process
- Commit message conventions
- Release process
Audience: All contributors Time: 20 minutes
Development Philosophy
AWS-Native Testing
This system is designed for AWS deployment only. We don’t have a “local development” environment because the system depends on AWS managed services:
- Bedrock: AI inference (cannot run locally)
- Bedrock Knowledge Base: RAG retrieval with S3 Vectors
- Secrets Manager: API key storage
- DynamoDB: Classification results
Instead, we use:
- Unit tests with mocked AWS services (
motolibrary) - Integration tests deployed Lambda functions in AWS
- Test AWS account for safe experimentation
Code Quality Standards
- Python: PEP 8, type hints, docstrings
- Terraform:
terraform fmt, modules, least-privilege IAM - JavaScript: ES6+, JSDoc comments
- Testing: 80%+ coverage for critical paths
- Documentation: Update docs with code changes
Quick Start
Prerequisites
# Install development tools
pip3 install pytest pytest-cov black flake8 moto
brew install terraform
Running Tests
# Unit tests
cd lambda/chat
pytest --cov=handler
# Terraform validation
cd terraform
terraform validate
terraform fmt -check -recursive
Making Changes
# 1. Create feature branch
git checkout -b feature/your-feature
# 2. Make changes and test
pytest
# 3. Commit using conventional commits
git commit -m "feat(lambda): add new integration"
# 4. Push and create PR
git push origin feature/your-feature
gh pr create
Recommended Reading Order
For New Contributors: Contributing → Testing Guide For Code Review: Contributing (review checklist)
Next: Infrastructure Guide for Terraform deep dives.