Inspiration

Month-end accounting often means digging through contracts, timesheets, invoices, and email threads to check whether recorded expenses are correct. A rate change buried in an amendment can easily slip through. We built AfterHours to catch these discrepancies and give accountants clear evidence behind each proposed correction.

What it does

AfterHours checks existing accruals against supporting documents and emails. It extracts facts, matches approved work to contracts and invoices, investigates missing information, and prepares corrections for human review. In our synthetic demo, 70 approved hours were accrued at $100 per hour. AfterHours finds an approved amendment raising the rate to $110, calculates the correct $7,700 accrual, and proposes a $700 adjustment. If evidence is incomplete or conflicting, it waits for more information.

How we built it

We built a React review workspace, a Python FastAPI backend, and a Python worker pipeline backed by SpacetimeDB. Bitdeer powers document extraction, while Factory agents match records and investigate supporting emails. SpacetimeDB stores document versions, evidence, jobs, and proposals. A deterministic calculator handles the accounting arithmetic. The backend processes uploads through calculation. The frontend currently uses simulated data, with live API integration, persisted approvals, and CSV export still to come.

Challenges we ran into

Contracts, amendments, timesheets, and invoices can disagree. We needed each proposed correction to reference supporting evidence and each unresolved conflict to remain visible. Coordinating multiple workers was another challenge. We used job leases, bounded retries, and revision checks to recover interrupted work and prevent outdated results from changing a case.

Accomplishments that we're proud of

Our ten-scenario synthetic test suite passed using live Bitdeer and Factory calls. Eight scenarios produced the expected calculations, while unsigned and conflicting amendments correctly waited for more information without generating a proposal. We also built a pipeline that connects document uploads, evidence gathering, investigation, and calculation while preserving human review.

What we learned

AI works well for finding and interpreting evidence, while explicit rules keep calculations predictable and verifiable. Giving agents narrow responsibilities and validating their outputs helped us build a more reliable workflow. We also learned that recognizing insufficient evidence is as valuable as finding a correction.

What's next for AfterHours

Our next steps are connecting the review workspace to the live API, persisting approval decisions, and adding approved journal CSV exports. From there, we want to expand beyond hourly contractor accruals to support more accounting workflows.

Built With

Share this project:

Updates

Submission history