22. Screenshots & Sample Outputs
? Note
This page contains visual examples and sample outputs from the Currency Denomination Calculator application. Screenshots would be located in the image/ directory of the project.
Sample Calculation Outputs
Example 1: INR 1850 (Greedy Mode)
Input
{
"amount": 1850,
"currency": "INR",
"mode": "greedy"
}
Output
{
"amount": 1850,
"currency": "INR",
"mode": "greedy",
"breakdown": [
{
"denomination": 500,
"type": "note",
"count": 3,
"total_value": 1500
},
{
"denomination": 200,
"type": "note",
"count": 1,
"total_value": 200
},
{
"denomination": 100,
"type": "note",
"count": 1,
"total_value": 100
},
{
"denomination": 50,
"type": "note",
"count": 1,
"total_value": 50
}
],
"summary": {
"total_pieces": 6,
"total_notes": 6,
"total_coins": 0,
"total_denominations": 4
},
"timestamp": "2025-01-15T12:00:00Z"
}
Visual Representation
| Denomination | Type | Count | Total Value |
|---|---|---|---|
| ?500 | Note | 3 | ?1500 |
| ?200 | Note | 1 | ?200 |
| ?100 | Note | 1 | ?100 |
| ?50 | Note | 1 | ?50 |
| TOTAL | 6 pieces | ?1850 | |
Example 2: USD 2500 (Balanced Mode)
Input
{
"amount": 2500,
"currency": "USD",
"mode": "balanced"
}
Output
{
"amount": 2500,
"currency": "USD",
"mode": "balanced",
"breakdown": [
{
"denomination": 100,
"type": "note",
"count": 10,
"total_value": 1000
},
{
"denomination": 50,
"type": "note",
"count": 10,
"total_value": 500
},
{
"denomination": 20,
"type": "note",
"count": 20,
"total_value": 400
},
{
"denomination": 10,
"type": "note",
"count": 20,
"total_value": 200
},
{
"denomination": 5,
"type": "note",
"count": 20,
"total_value": 100
},
{
"denomination": 2,
"type": "note",
"count": 50,
"total_value": 100
},
{
"denomination": 1,
"type": "note",
"count": 100,
"total_value": 100
},
{
"denomination": 0.25,
"type": "coin",
"count": 80,
"total_value": 20
},
{
"denomination": 0.1,
"type": "coin",
"count": 100,
"total_value": 10
},
{
"denomination": 0.05,
"type": "coin",
"count": 100,
"total_value": 5
},
{
"denomination": 0.01,
"type": "coin",
"count": 100,
"total_value": 1
}
],
"summary": {
"total_pieces": 610,
"total_notes": 230,
"total_coins": 380,
"total_denominations": 11
}
}
Example 3: EUR 1234.56 (Minimize Large)
Output Summary
| Denomination | Type | Count | Total Value |
|---|---|---|---|
| €5 | Note | 246 | €1230.00 |
| €2 | Coin | 2 | €4.00 |
| €0.50 | Coin | 1 | €0.50 |
| €0.05 | Coin | 1 | €0.05 |
| €0.01 | Coin | 1 | €0.01 |
| TOTAL | 251 pieces | €1234.56 | |
Bulk Upload Sample Outputs
CSV Upload Example
Input File (sample.csv)
amount,currency,mode
1850,INR,greedy
2500,USD,balanced
1234.56,EUR,minimize_large
999,GBP,minimize_small
Processing Result
{
"total_rows": 4,
"successful_rows": 4,
"failed_rows": 0,
"results": [
{
"row": 1,
"success": true,
"result": {
"amount": 1850,
"currency": "INR",
"mode": "greedy",
"summary": {
"total_pieces": 6,
"total_notes": 6,
"total_coins": 0
}
}
},
{
"row": 2,
"success": true,
"result": {
"amount": 2500,
"currency": "USD",
"mode": "balanced",
"summary": {
"total_pieces": 610,
"total_notes": 230,
"total_coins": 380
}
}
},
{
"row": 3,
"success": true,
"result": {
"amount": 1234.56,
"currency": "EUR",
"mode": "minimize_large",
"summary": {
"total_pieces": 251,
"total_notes": 246,
"total_coins": 5
}
}
},
{
"row": 4,
"success": true,
"result": {
"amount": 999,
"currency": "GBP",
"mode": "minimize_small",
"summary": {
"total_pieces": 6,
"total_notes": 6,
"total_coins": 0
}
}
}
]
}
OCR Text Extraction Example
Input (Scanned Image Text)
Amount: 1850 INR
Mode: greedy
Amount: 2500 USD
Mode: balanced
Amount: 1234.56 EUR
Mode: minimize large
Extracted Data
{
"detected_format": "labeled",
"extracted_data": [
{
"row_number": 1,
"amount": 1850.0,
"currency": "INR",
"optimization_mode": "greedy"
},
{
"row_number": 2,
"amount": 2500.0,
"currency": "USD",
"optimization_mode": "balanced"
},
{
"row_number": 3,
"amount": 1234.56,
"currency": "EUR",
"optimization_mode": "minimize_large"
}
],
"total_detected": 3,
"ocr_confidence": 0.95
}
API Request/Response Examples
Calculate Endpoint
cURL Request
curl -X POST http://localhost:8000/api/v1/calculate \
-H "Content-Type: application/json" \
-d '{
"amount": 1850,
"currency": "INR",
"mode": "greedy"
}'
Response (200 OK)
{
"amount": 1850,
"currency": "INR",
"mode": "greedy",
"breakdown": [
{"denomination": 500, "type": "note", "count": 3, "total_value": 1500},
{"denomination": 200, "type": "note", "count": 1, "total_value": 200},
{"denomination": 100, "type": "note", "count": 1, "total_value": 100},
{"denomination": 50, "type": "note", "count": 1, "total_value": 50}
],
"summary": {
"total_pieces": 6,
"total_notes": 6,
"total_coins": 0,
"total_denominations": 4
},
"timestamp": "2025-01-15T12:00:00Z"
}
History Endpoint
cURL Request
curl http://localhost:8000/api/v1/history?page=1&per_page=2
Response (200 OK)
{
"items": [
{
"id": 1,
"amount": 1850,
"currency": "INR",
"mode": "greedy",
"breakdown": [...],
"summary": {"total_pieces": 6, "total_notes": 6, "total_coins": 0},
"timestamp": "2025-01-15T12:00:00Z"
},
{
"id": 2,
"amount": 2500,
"currency": "USD",
"mode": "balanced",
"breakdown": [...],
"summary": {"total_pieces": 610, "total_notes": 230, "total_coins": 380},
"timestamp": "2025-01-15T12:05:00Z"
}
],
"total": 100,
"page": 1,
"pages": 50,
"per_page": 2
}
Error Response Example
Request (Invalid Amount)
curl -X POST http://localhost:8000/api/v1/calculate \
-H "Content-Type: application/json" \
-d '{
"amount": -100,
"currency": "INR",
"mode": "greedy"
}'
Response (400 Bad Request)
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Amount must be greater than 0",
"field": "amount",
"timestamp": "2025-01-15T12:00:00Z"
}
}
Export Format Samples
CSV Export
Amount,Currency,Mode,Total Pieces,Total Notes,Total Coins,Timestamp
1850,INR,greedy,6,6,0,2025-01-15T12:00:00Z
2500,USD,balanced,610,230,380,2025-01-15T12:05:00Z
1234.56,EUR,minimize_large,251,246,5,2025-01-15T12:10:00Z
999,GBP,minimize_small,6,6,0,2025-01-15T12:15:00Z
JSON Export
[
{
"amount": 1850,
"currency": "INR",
"mode": "greedy",
"breakdown": [
{"denomination": 500, "type": "note", "count": 3, "total_value": 1500},
{"denomination": 200, "type": "note", "count": 1, "total_value": 200},
{"denomination": 100, "type": "note", "count": 1, "total_value": 100},
{"denomination": 50, "type": "note", "count": 1, "total_value": 50}
],
"summary": {
"total_pieces": 6,
"total_notes": 6,
"total_coins": 0,
"total_denominations": 4
},
"timestamp": "2025-01-15T12:00:00Z"
},
{
"amount": 2500,
"currency": "USD",
"mode": "balanced",
"breakdown": [...],
"summary": {...},
"timestamp": "2025-01-15T12:05:00Z"
}
]
Clipboard (Plain Text)
Currency Denomination Calculator - Export
Amount: 1850 INR
Mode: greedy
Total Pieces: 6 (6 notes, 0 coins)
Breakdown:
?500 × 3 = ?1500
?200 × 1 = ?200
?100 × 1 = ?100
?50 × 1 = ?50
Generated: 2025-01-15 12:00:00
UI State Examples
Loading State
<div class="loading-spinner">
<div class="spinner"></div>
<p>Processing bulk upload...</p>
<p class="text-sm">Analyzing 100 rows</p>
</div>
Success Message
<div class="alert alert-success">
<CheckCircle className="w-5 h-5" />
<p>Calculation completed successfully!</p>
<p class="text-sm">Result saved to history</p>
</div>
Error Message
<div class="alert alert-error">
<AlertCircle className="w-5 h-5" />
<p>File size exceeds 10MB limit</p>
<p class="text-sm">Please upload a smaller file</p>
</div>
Database Sample Records
Calculations Table
SELECT * FROM calculations LIMIT 3;
id | amount | currency | mode | breakdown | summary | timestamp
---|---------|----------|---------|----------------------------------------------|---------------------------------------------------|-------------------
1 | 1850.0 | INR | greedy | [{"denomination":500,"count":3,...},...] | {"total_pieces":6,"total_notes":6,...} | 2025-01-15 12:00:00
2 | 2500.0 | USD | balanced| [{"denomination":100,"count":10,...},...] | {"total_pieces":610,"total_notes":230,...} | 2025-01-15 12:05:00
3 | 1234.56 | EUR | minimize| [{"denomination":5,"count":246,...},...] | {"total_pieces":251,"total_notes":246,...} | 2025-01-15 12:10:00
Query Examples
Get Latest 10 Calculations
SELECT * FROM calculations
ORDER BY timestamp DESC
LIMIT 10;
Filter by Currency
SELECT * FROM calculations
WHERE currency = 'INR'
ORDER BY timestamp DESC;
Statistics
SELECT
currency,
COUNT(*) as total_calculations,
AVG(amount) as avg_amount,
SUM(amount) as total_amount
FROM calculations
GROUP BY currency;
Performance Log Samples
Backend Performance Log
2025-01-15 12:00:00 - INFO - POST /api/v1/calculate - 0.3ms
2025-01-15 12:00:01 - INFO - Calculation: 1850 INR (greedy) ? 6 pieces
2025-01-15 12:00:01 - INFO - Database insert: 2.8ms
2025-01-15 12:00:01 - INFO - Request completed: 3.5ms
2025-01-15 12:05:00 - INFO - POST /api/v1/bulk/upload - File: sample.csv (4 rows)
2025-01-15 12:05:00 - INFO - CSV parsing: 15ms
2025-01-15 12:05:00 - INFO - Calculation batch (4 items): 1.2ms
2025-01-15 12:05:00 - INFO - Database batch insert: 8.5ms
2025-01-15 12:05:00 - INFO - Bulk upload completed: 24.7ms
2025-01-15 12:10:00 - INFO - POST /api/v1/ocr/process - File: receipt.jpg (1.2MB)
2025-01-15 12:10:00 - INFO - Image preprocessing: 150ms
2025-01-15 12:10:00 - INFO - Tesseract OCR: 2.1s
2025-01-15 12:10:02 - INFO - Text parsing (labeled format): 12ms
2025-01-15 12:10:02 - INFO - Detected 3 amounts with 95% confidence
2025-01-15 12:10:02 - INFO - OCR processing completed: 2.262s
Health Check Output
=== Currency Calculator Health Check ===
[1/4] Checking Backend...
? Backend: HEALTHY
Database: connected
Version: 1.0.0
[2/4] Checking Database...
? Database: 2.45 MB
[3/4] Checking Tesseract OCR...
? Tesseract: tesseract 5.3.3
[4/4] Checking Poppler...
? Poppler: pdftoppm version 24.08.0
=== Health Check Complete ===
? Documentation Complete
This concludes the complete documentation for the Currency Denomination Calculator project. All 22 pages cover every aspect from executive summary to sample outputs, providing comprehensive reference for developers, testers, and users.
?? Screenshot Location
Actual screenshot images would be stored in: image/ directory in the project root. Screenshots would include: Calculator UI (light/dark mode), Bulk Upload interface, OCR processing, History page, Settings panel, Export options, Multi-language selector.