# Dekalytics

> Turns product-test survey data into client Excel reports

- **Client**: Deka Insight
- **Date**: 2026
- **Metrics**:
  - Product tests: 50+ (Real client tests through the app since June 2026)
  - Sheets in a report: 30+ (Typical workbook. The coffee example in the gallery is 41.)

## Details

I built Dekalytics for [Deka Insight](https://dekainsight.com) to automate product-test reports.

In a typical test, hundreds of people try two products (like two coffee recipes) and answer a survey. Afterward, an analyst has to clean the data, run statistical tests, and build an Excel file with 30 to 50+ sheets for the client.

At Deka, that used to take 2 to 3 days using SPSS, complex formulas, and manual copy-pasting. With Dekalytics, the same work takes just a few minutes. Researchers open the report in their browser, share a view with the client, and ask for changes in chat without starting over.


## Why a normal form does not work

Writing Python to calculate means and percentages is easy, but every survey brings different rules. One project uses a 5-point rating scale while another uses 7 points. A client might want two income groups merged on the summary page, or ask for a completely new demographic cut after seeing the first draft.
A traditional web form with checkboxes and dropdowns for every rule would be impossible to build and annoying to fill out. Instead of forms, researchers just drop in their usual files, the Word questionnaire, raw data, and their Excel template, and talk to the agent in plain English or Bahasa Indonesia.

## How it works

Each project brings everything into one screen.

- **Chat:** The agent reads the questionnaire and data, writes Python behind the scenes to run the numbers, and creates `report.xlsx`. If the client changes their request, the analyst can stop the run or ask for adjustments directly in chat.
- **Laporan (Report viewer):** Researchers can view the full Excel file inside the browser, from the table of contents to each detailed data sheet, before downloading it.
- **Client share link:** Researchers can turn on a private link for the client. The client sees only the clean Excel report, without seeing the chat history or raw survey files.
## What I had to get right

### 1. Fast sandboxes on one server

At first, I tried hosted cloud sandboxes (E2B). But waiting 10 to 15 seconds for a cloud container to start is too slow when you are waiting in a chat room.

Dekalytics runs Next.js, Docker, Postgres, and Python together on a single VPS. The code runs instantly without waiting for a container to boot, and confidential survey data never leaves the server.

### 2. Matching agency standards and real statistics

I tested the agent by comparing its output against old reports made by human analysts.

At first, some statistical test results did not match. I found that the agent used paired t-tests because the same people tested both products. The older human files had sometimes treated the two groups as independent. In this case, the agent's math was actually more accurate for the study design.

Correct math was only the first step. The output also had to look exactly like Deka's reports: Top Box scores, Just About Right (JAR) tables, penalty analysis, and a clean table of contents across 40+ sheets. Dekalytics had to generate files that looked like they were made by a senior analyst.
