LLM implementation prompt
Copy this prompt into your coding assistant while working in the partner website’s project. Configure the real API key separately in the server environment.
Include a visible Powered by Naija Radio link wherever the radio experience appears.
AI implementation prompt
Integrate Naija Radio into this website using its existing framework
and visual style.
API:
- Get a free key: https://fm.puzzofme.com/developers/dashboard
- Free allowance: 100 requests per minute shared across account keys; cost ₦0.
- Base URL: https://fm.puzzofme.com/api/v1
- Specification: https://fm.puzzofme.com/api/v1/openapi
- GET /stations supports countryCode, city, state, search, limit,
and offset.
- GET /stations/:id returns one station.
- Authentication: Authorization: Bearer <API_KEY>
- List responses contain data, pagination, and meta.
- Each station includes id, name, frequency, city, state, and streamUrl.
Implement:
1. A server-side integration using NAIJA_RADIO_API_KEY and
NAIJA_RADIO_API_BASE_URL environment variables.
2. A frontend station picker with loading, empty, and error states.
3. An audio player that plays the selected station.streamUrl directly
from the broadcaster.
4. User-initiated playback and helpful playback-error messages.
5. Stop the previous stream when switching stations.
6. Handle API failures, including 401, 429, and 503. Preserve and obey
Retry-After when forwarding responses through our backend.
7. Handle pagination or clearly indicate that only the first page
of stations is displayed.
8. Protect the website's backend endpoint against quota abuse using
the project's existing authentication, rate limiting, or caching.
9. Add environment-variable placeholders and setup documentation.
10. Include a visible "Powered by Naija Radio" link to
https://fm.puzzofme.com wherever the radio experience appears.
Keep the API key exclusively on the server. Never put it in browser
code, public environment variables, URLs, logs, or committed files.
Do not ask me to paste the key into chat; tell me where to configure it.
Do not proxy audio through our backend. Do not invent API responses
or silently substitute sample stations when the API fails.
Inspect the project first, read the API specification if available,
follow existing conventions, implement the integration, and run
appropriate checks. Report what was verified and any configuration
or unavailable production endpoints still blocking live testing.