A Deno-based REST API for the BeWater ecosystem, providing endpoints for challenge management and Cantonese corpus data.
Base URL: https://bewater-api.deno.dev
- Deno installed
- Supabase project with proper environment variables set
Create a .env file or set the following environment variables:
SUPABASE_URL=your_supabase_project_url
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
ADMIN_PWD=your_admin_passworddeno run --allow-net --allow-env --allow-read main.tsxThe server will start on port 8000.
GET /
Returns a simple health check message.
Response:
{
"result": "Hello, Devs for BeWater!"
}Example:
curl -X GET https://bewater-api.deno.devPOST /challenge
Retrieves challenge information by title from the BeWater database.
Request Body:
{
"title": "BeWater Monthly Hackathon 0x02"
}Response:
[
{
"id": 165,
"externalId": "UKxp-BeWater-Monthly-Hackathon-0x02",
"title": "BeWater Monthly Hackathon 0x02",
"description": "* Hackathon 评选不透明...",
"hostName": "BeWaterDAO",
"startTime": "2025-07-31T16:00:00",
"endTime": "2025-08-30T16:00:00",
"status": "ACTIVE",
"location": "ONLINE",
"challengeTags": ["cantonese", "bewater", "DAO"],
"milestones": [...],
"createdAt": "2025-07-29T12:27:05.736",
"updatedAt": "2025-07-29T13:20:28.604"
}
]Example:
curl -X POST https://bewater-api.deno.dev/challenge \
-H "Content-Type: application/json" \
-d '{"title": "BeWater Monthly Hackathon 0x02"}'- Fork the repository
- Create a feature branch
- Make your changes
- Test locally
- Submit a pull request
This project is licensed under the terms specified in the LICENSE file.
Note: This API is part of the BeWater ecosystem and is designed to work with the BeWater challenge platform and AI DimSum Cantonese corpus project.