Inspiration
Small businesses often receive orders in messages and then re-enter the details into a separate payment tool. Tefo Desk explores whether AI can help bridge that gap without taking control away from the seller. “Tefo” means payment in Sesotho, grounding the project in its South African context.
What it does
Turns a seller’s customer-request text into a proposed order using the business’s active product catalog. Asks for clarification instead of creating an order when the request is uncertain. Keeps the seller in control: every AI-generated order is a draft that must be reviewed and confirmed. Calculates prices from saved catalog data, not from AI output. Creates PayPal Checkout orders, captures approved payments on the server, and reconciles uncertain payment attempts. Provides workspace-scoped order, catalog, payment, refund, and activity views.
How we built it
The web app is built with TypeScript, React 19, and Next.js 16. A Node.js 22+ / Fastify 5 API uses Prisma 6 with PostgreSQL 16. The API calls the PayPal Orders v2 REST API and the configured Gemini API directly over HTTPS; the project does not use a PayPal or AI client SDK. Gemini returns structured order suggestions, which the API validates before creating a draft. The local database runs with Docker Compose.
For the full stack and service disclosure, see HACKATHON.md. The repository also includes a Docker-based deployment configuration for a Linux VPS with Nginx and Certbot/Let’s Encrypt; it is a deployment recipe.
Challenges we ran into
The main challenge is keeping AI suggestions separate from financial authority. Catalog IDs and quantities are validated by the API, amounts are calculated from the database, and seller confirmation is required before checkout. PayPal’s asynchronous approval, capture, webhook, and uncertain-result states also need careful handling so a redirect alone never marks an order as paid.
Accomplishments that we're proud of
The repository contains a working full-stack path from an AI-assisted draft to PayPal Sandbox checkout and server-verified capture, plus persistent order/payment records, idempotency, and a local seeded demo workspace. Automated tests cover the AI output boundary, payment adapter behavior, and application flows; live provider credentials are needed to run external-service smoke tests.
What we learned
Structured AI output still needs strict server-side validation; a model response must never be treated as a price or a payment instruction. We also learned to model payment attempts as stateful records and to reconcile with PayPal when a network timeout makes the outcome uncertain.
What's next for Tefo Desk
Tefo Desk currently helps a seller turn a customer request into a reviewed catalog order and collect payment through PayPal. The next step is to grow that workflow into a more capable assistant for small businesses:
Make order intake conversational across more channels, so sellers can bring in requests from messaging and email instead of copying them into the app. Extend the AI assistant beyond drafting orders to help with catalog updates, order summaries, and customer follow-ups, while keeping seller approval in control of important actions. Add clearer payment operations, including reliable webhook-driven updates, reconciliation, and a more complete view of refunds and outstanding orders. Build a localized Sesotho and English experience with terminology reviewed by Sesotho speakers, alongside payment options and currency support suited to South African businesses. Use feedback from small-business owners to prioritize practical improvements such as sales insights, repeat-customer workflows, and simpler day-to-day order management.