Expert guidance for developing and maintaining the WebmentionService Azure Functions application written in F#. Handles webmention processing, RSS generation, and Azure deployment.
Expert AI assistant for the WebmentionService repository - an Azure Functions-based F# microservice that processes Webmentions (decentralized web notifications) and generates RSS feeds.
**WebmentionService** is a serverless Azure Functions application written in **F# (.NET 10.0)** that:
**Key characteristics:**
**CRITICAL**: This project requires **.NET 10.0 runtime**. Before any operations:
```bash
dotnet --list-sdks | grep "10.0"
wget https://dot.net/v1/dotnet-install.sh -O /tmp/dotnet-install.sh
chmod +x /tmp/dotnet-install.sh
/tmp/dotnet-install.sh --channel 10.0
```
Verify installation before proceeding to any build operations.
**Always follow this exact sequence:**
```bash
dotnet restore
dotnet build
dotnet clean
```
**Critical**: `dotnet restore` must complete successfully before `dotnet build` or the build will fail.
**Two main Azure Functions:**
1. **ReceiveWebmention** (`ReceiveWebmention.fs`)
- HTTP POST endpoint: `/inbox`
- Validates webmention format
- Stores in Azure Table Storage
- PartitionKey = target URL (encoded)
- RowKey = source URL (encoded)
2. **WebmentionToRss** (`WebmentionToRss.fs`)
- Timer-triggered: `0 0 3 * * *` (3 AM UTC daily)
- Reads from Table Storage
- Generates RSS feed XML
- Outputs to Azure Blob Storage
**Dependency chain (F# compilation order):**
```
Domain.fs → RssService.fs → Startup.fs → ReceiveWebmention.fs → WebmentionToRss.fs
```
**Before modifying code:**
1. **Never reorder files** in `WebmentionService.fsproj` - F# requires dependency order
2. **Understand F# patterns** used:
- Pattern matching (not if-else)
- Pipelines (`|>`) for transformations
- Immutable functions
3. **Preserve Azure bindings**:
- `[<FunctionName("Name")>]`
- `[<HttpTrigger(...)>]`
- `[<TimerTrigger(...)>]`
- `[<Table(...)>]`, `[<Blob(...)>]`
**After changes:**
```bash
dotnet build # Verify compilation
```
Create `local.settings.json` (git-ignored):
```json
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",
"PERSONAL_WEBSITE_HOSTNAMES": "localhost:3000,127.0.0.1:3000"
}
}
```
**No automated tests exist** - validate manually:
```bash
dotnet clean
dotnet restore
dotnet build
dotnet publish --configuration Release
```
```bash
func azure functionapp publish lqdevwebmentions-flex
```
**Note**: VS Code auto-runs `publish (functions)` task on deploy (configured in `.vscode/tasks.json`).
**Issue: ".NET 10.0 not found"**
```
error : Framework: 'Microsoft.NETCore.App', version '10.0.0' (x64) not found
```
**Solution**: Run the .NET 10.0 installer command from Step 1.
**Issue: "local.settings.json missing"**
**Solution**: Create it manually using the template in Step 5.
**Issue: Build fails after file reorder**
**Solution**: Restore original file order in `.fsproj` - F# requires dependency order.
**Required Environment Variables (Azure/local.settings.json):**
| Variable | Value | Purpose |
|----------|-------|---------|
| `AzureWebJobsStorage` | Connection string | Table/Blob storage |
| `FUNCTIONS_WORKER_RUNTIME` | `dotnet-isolated` | Worker model |
| `PERSONAL_WEBSITE_HOSTNAMES` | Comma-separated | Allowed target domains |
Configured in `Startup.fs` via dependency injection.
**Pre-configured tasks** (`.vscode/tasks.json`):
**Dev container**: `.devcontainer.json` configured for Azure Functions development.
```bash
dotnet restore && dotnet build
dotnet clean && dotnet restore && dotnet build
dotnet publish --configuration Release
func azure functionapp publish lqdevwebmentions-flex
```
1. **No test suite** - all validation is manual
2. **No CI/CD** - no GitHub Actions configured
3. **F# file order matters** - never reorder in .fsproj
4. **Always restore before build** - dependency resolution required
5. **.NET 10.0 required** - project will not build on other versions
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/webmentionservice-f-azure-functions-guide/raw