Adding Technical Context

Provide API endpoints, database schemas, or integration details to make outputs production-ready. Includes REST, GraphQL, Postgres, and Supabase examples.

Meku can generate more accurate code when we provide technical context. By including API specifications, database schemas, or integration details in your prompts, the output will align with the existing stack instead of generic placeholders.

Why Add Context?

This section explains why context improves results.

  • Without context: Meku may create mock data or generic endpoints.
  • With context: Meku uses your real API routes, database tables, and fields.
  • Result: Faster integration and fewer manual changes.

Adding context ensures that your code is closer to production-ready from the start.

API Integration

Provide API details directly in prompts so Meku can generate fetch calls, hooks, or services.

Example: REST API

Connect to the GitHub REST API and display a list of repositories for a given user  

Expected output:

  • React component with fetch or axios calls to https://api.github.com/users/{username}/repos.
  • Rendered table or list view of repositories.

Example: GraphQL API

Query the SpaceX GraphQL API to fetch the latest 5 launches and display them in a table  

Expected output: Component using Apollo Client or fetch with a GraphQL query.

Adding API context ensures code is wired to actual endpoints, not placeholders.

Database Schema

Database schemas define how data is stored, and Meku uses them to create forms, tables, and CRUD logic.

Example: Postgres schema

Use this Postgres schema:  
users(id, name, email, created_at)  
Build a CRUD interface with forms for creating and editing users, and a table to list them  

Expected output:

  • Form with fields: name, email.
  • Table displaying all users.
  • Functions to create, update, and delete records.

Example: Supabase schema

Use Supabase table: products(id, name, price, stock)  
Generate an admin dashboard with a table view and a form to update stock  

Expected output:

  • Table component showing all products.
  • Form for updating stock.
  • Supabase client code integrated.

Adding schema context makes your app align with real data models.

Combining API and DB Context

Meku can combine API endpoints and database schemas in a single prompt.

Example:

Use this schema:  
orders(id, user_id, total, created_at)  
Connect to REST endpoint /api/orders and display all orders in a paginated table  

Expected output:

  • API call to /api/orders.
  • Table with user_id, total, and created_at.
  • Pagination controls included.

Combining contexts reduces setup time and produces fully integrated features.

Best Practices

Best practices keep your prompts accurate and efficient.

  • Always include field names and data types when possible.
  • Break complex integrations into steps: first connect API, then add CRUD, then refine UI.
  • Use real endpoints in prompts to avoid placeholder code.
  • Add constraints if needed: “fetch only last 10 records” or “display in a grid layout.

Following these rules gives outputs that fit the real-world requirements.

Common Mistakes

Mistakes usually come from vague prompts or missing context.

Too vague

Connect to a database and show data

Produces generic placeholders with no useful integration.

Better

Connect to Supabase table users(id, name, email) and build a table with pagination

By being explicit, you get production-ready integration instead of placeholder code.

Quick Reference Examples

Use these as shortcuts when integrating APIs or schemas.

  • REST API prompt:
Connect to /api/todos and build a list with add and delete functions
  • GraphQL API prompt:
Query GraphQL endpoint /graphql to fetch posts(title, author) and display in a card grid
  • Database prompt:
- Use schema: tasks(id, title, status) 
- Create a Kanban board with columns for status values

These examples can be adapted to their own APIs and schemas for faster integration.

Adding Technical Context - Documentation | Meku.dev