- .NET 8 SDK
- Git
- Docker (optional, for local BTCPayServer)
git clone https://github.com/Island-Bitcoin/BTCPayServer.Plugins.Flash.git
cd BTCPayServer.Plugins.Flash
dotnet builddotnet test- Clone BTCPayServer:
git clone https://github.com/btcpayserver/btcpayserver.git
cd btcpayserver- Run with Docker:
docker-compose up-
Place plugin in
BTCPayServer.Plugins/directory -
Run with plugin:
dotnet run --launch-profile Docker./build-package.shCreates a .btcpay package file for distribution.
./direct-install.shInstalls plugin directly to running BTCPay container.
./run-tests.shExecutes full test suite.
When updating the plugin version, update ALL THREE locations:
- FlashPlugin.cs:
public override Version Version => new Version(x, y, z);- manifest.json:
"version": "x.y.z"- BTCPayServer.Plugins.Flash.csproj:
<Version>x.y.z</Version>- GraphQLService: Core GraphQL communication
- InvoiceService: Invoice management
- PaymentService: Payment processing
- ExchangeRateService: Currency conversion
- BoltcardService: NFC card handling
- WebSocketService: Real-time updates
- MonitoringService: Health checks
- WalletService: Wallet operations
- Entity Framework Core with PostgreSQL
- Migrations in
Data/Migrations/ - Repository pattern for data access
- Polly retry policies for resilience
- Custom exceptions in
Exceptions/ - Comprehensive logging throughout
Test individual services and components:
dotnet test --filter Category=UnitTest with real Flash API (requires credentials):
dotnet test --filter Category=IntegrationGenerate coverage report:
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover- Use async/await for all I/O operations
- Follow Microsoft C# naming conventions
- Add XML documentation to public methods
- Use dependency injection
- Never hardcode secrets or API keys
- Use
ILoggerfor all logging - Handle all exceptions appropriately
- Write unit tests for new features
- Update version in all three locations
- Fork the repository
- Create feature branch:
git checkout -b feature/my-feature - Make changes and test thoroughly
- Commit with clear message:
git commit -m "feat: Add new feature" - Push branch:
git push origin feature/my-feature - Create Pull Request with description
feat:New featurefix:Bug fixdocs:Documentation changesrefactor:Code refactoringtest:Test additions/changeschore:Maintenance tasks
- Update version in all three locations
- Update CHANGELOG.md
- Run full test suite
- Build package:
./build-package.sh - Create GitHub release
- Upload
.btcpayfile to release - Submit to BTCPayServer plugin directory
- Set
BTCPayServer.Plugins.Flashas startup project - Configure launch settings for Docker profile
- Set breakpoints in code
- Press F5 to debug
- Enable debug logging in production
- Access logs via Docker or file system
- Use Application Insights for telemetry (if configured)