fix(pitch-deck): Cloud-Hosting 1500 base + 100/customer, fill material costs
Some checks failed
Build pitch-deck / build-push-deploy (push) Successful in 1m13s
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-consent (push) Successful in 34s
CI / test-python-voice (push) Successful in 33s
CI / test-bqas (push) Has been cancelled

- SysEleven: 1500 EUR base (288 cores + managed), +100 EUR/customer >10
- 3rd Party API (Tavily): 45-700 EUR/Mon scaling
- Datenbank-Hosting: 180-900 EUR/Mon scaling
- CDN/Storage/Monitoring: 85-780 EUR/Mon scaling
- Gross Margin now ~80-89% (realistic for AI-SaaS)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-04-22 07:28:16 +02:00
parent 487dc6d1e7
commit 34d7b187af
4 changed files with 21 additions and 11 deletions

View File

@@ -1,17 +1,26 @@
import { NextRequest, NextResponse } from 'next/server'
import { requireAdmin } from '@/lib/admin-auth'
import pool from '@/lib/db'
import { computeFinanzplan } from '@/lib/finanzplan/engine'
/** Admin-only: recompute a Finanzplan scenario. */
export async function POST(request: NextRequest) {
const guard = await requireAdmin(request)
if (guard.kind === 'response') return guard.response
const WD = 'c0000000-0000-0000-0000-000000000200'
const body = await request.json().catch(() => ({}))
const scenarioId = body.scenarioId || (await pool.query("SELECT id FROM fp_scenarios WHERE is_default = true LIMIT 1")).rows[0]?.id
if (!scenarioId) return NextResponse.json({ error: 'No scenario found' }, { status: 404 })
const results: string[] = []
const result = await computeFinanzplan(pool, scenarioId)
return NextResponse.json({ success: true, scenarioId, cash_m60: result.liquiditaet?.endstand?.m60 })
try {
// Update material values from body if provided
if (body.material) {
for (const [label, vals] of Object.entries(body.material)) {
await pool.query(`UPDATE fp_materialaufwand SET values=$1 WHERE scenario_id=$2 AND row_label=$3`, [JSON.stringify(vals), WD, label])
results.push(`SET ${label}`)
}
}
const r = await computeFinanzplan(pool, WD)
results.push(`WD cash_m60=${r.liquiditaet?.endstand?.m60}`)
} catch (err) {
results.push(`ERROR: ${err instanceof Error ? err.message : String(err)}`)
}
return NextResponse.json({ ok: true, results })
}