Architecture
Below are diagrams illustrating how OpenCaptcha processes incoming requests and how it can be deployed via a CI/CD pipeline to Azure Container Instances.
Request Flow Diagram
┌────────────────────┐
│ Client Request │
│ (via HTTPS) │
└─────────┬──────────┘
│
v
┌─────────────────────────┐
│ Captcha.WebApi │
│ (Controllers, routing) │
└─────────┬───────────────┘
│
v
┌─────────────────────────┐
│ Captcha.Core │
│ (Image generation) │
└─────────┬───────────────┘
│
v
┌──────────────────────────┐
│ Generated Image (JPEG) │
└──────────────────────────┘
- Client sends an HTTPS request to the OpenCaptcha endpoint (
api.opencaptcha.io
). - Captcha.WebApi receives and processes the request (
POST /captcha
). - Captcha.Core generates the CAPTCHA image based on the requested parameters (text, dimensions, difficulty).
- A JPEG image is returned to the client.
Deployment Diagram
+---------------------+
| GitHub Repository |
+----------+----------+
|
| (Push code to main branch)
v
+--------------------------------------+
| CI/CD Pipeline (GitHub Actions) |
| - .NET build & tests |
| - Docker build |
+-------------+------------------------+
| (Push image)
v
+----------------------------------+
| Azure Container Registry (ACR) |
+----------------------------------+
| (Pull image)
v
+-----------------------------------------+
| Azure Container Instances (Windows) |
+-----------------------------------------+
|
v
+---------------------------------------+
| Publicly Accessible |
| via api.opencaptcha.io |
+---------------------------------------+
- Developers push code changes or open pull requests on GitHub.
- GitHub Actions (CI/CD service) automatically runs tests and builds a Docker image.
- The image is pushed to Azure Container Registry (ACR).
- Azure Container Instances (Windows-based) pulls the Docker image from ACR.
- The container is deployed and made publicly available at
api.opencaptcha.io
.