I’ve added two tables in Supabase called dp_templates and dp_objectives. Schema (simplified): - dp_templates: - template_key (text, PK) - category (text) - stage (text, nullable) - whatsapp_body (text) - active (boolean) - dp_objectives: - template_key (text, PK, FK to dp_templates.template_key) - objective (text) - guidance (text) I want a FastAPI endpoint that returns a template + its objective/guidance as JSON. Please do the following in app/main.py: 1) Reuse the existing Supabase client if one already exists. - If you can see that we already import and use a Supabase client for other API routes (e.g. monthly summary, retention, etc.), use the same pattern. - If there is no Supabase client yet, create one using: - SUPABASE_URL from environment variables - SUPABASE_ANON_KEY from environment variables and the same library we’re already using for other DB access (don’t introduce a second client style). 2) Add a new route: @app.get("/api/templates/{template_key}") async def get_template(template_key: str): It should: - Query dp_templates for the row with that template_key AND active = true. - Left-join or second-query dp_objectives on the same template_key. - If no active template is found, return a 404 with a JSON body like: { "error": "Template not found" } - If found, return JSON in this shape: { "template_key": "...", "category": "...", "stage": "...", "whatsapp_body": "...", "objective": "...", "guidance": "..." } 3) Make sure any errors are logged but do not expose internal details to the client. 4) Once implemented, run the app and test the endpoint for at least these keys (assuming they exist in dp_templates): - renewal_reminder - renewal_missed - renewal_followup - renewal_noreply For each, confirm: - HTTP 200 for existing keys - HTTP 404 for a made-up key (e.g. 'xyz_invalid') 5) Please summarise what files were changed and show an example JSON response from a successful request.