KabundiNjuki ff743a1397 Initial commit
2026-10-05 16:40:36 +03:00
2026-10-05 16:40:36 +03:00
2026-10-05 16:40:36 +03:00
2026-10-05 16:40:36 +03:00
2026-10-05 16:40:36 +03:00
2026-10-05 16:40:36 +03:00
2026-10-05 16:40:36 +03:00
2026-10-05 16:40:36 +03:00
2026-10-05 16:40:36 +03:00
2026-10-05 16:40:36 +03:00
2026-10-05 16:40:36 +03:00
2026-10-05 16:40:36 +03:00
2026-10-05 16:40:36 +03:00
2026-10-05 16:40:36 +03:00
2026-10-05 16:40:36 +03:00
2026-10-05 16:40:36 +03:00

lukenya-university-marathon

This is a Next.js project bootstrapped with v0.

Built with v0

This repository is linked to a v0 project. You can continue developing by visiting the link below -- start new chats to make changes, and v0 will push commits directly to this repo. Every merge to main will automatically deploy.

Continue working on v0 →

Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

Learn More

To learn more, take a look at the following resources:

Backend connection

Race, price, edition and prize data come from the Frappe backend (lukenya_marathon app). Nothing about races is hard-coded in the pages any more.

  • lib/lukenya-api.ts: server-only calls to Frappe. Pages refresh their data every 60 seconds, or immediately when the backend calls POST /api/revalidate.
  • lib/event-types.ts: the data shapes the backend returns. Treat these as the contract.
  • The browser never calls Frappe directly. It posts to this site's routes, which forward to Frappe:
    • POST /api/register → api.create_registration
    • POST /api/payment/start → payments.start_payment (returns the Paystack checkout link)
    • GET /api/payment/status?reference=… → payments.check_payment_status
  • Paystack sends the runner back to /payment/return, which waits for the server to verify the payment.

If api.get_public_event isn't available yet, the site falls back to the older api.get_event_categories endpoint. Set FRAPPE_EDITION so that fallback only shows one edition.

Environment variables are listed in .env.example.

S
Description
No description provided
Readme 178 KiB
Languages
TypeScript 98.2%
CSS 1.7%