Skip to content

mmagyar/declarapi

Repository files navigation

License: MIT Latest version published Build Code coverage

declarapi

Declarative API generation.

Create your CRUD API without writing a single line of code.

Features

  • Generate full CRUD REST API based on a single schema definitions
  • Automatically validate all requests
  • Automatically generate code to communicate with the database
    • Elasticsearch (basic usage, full text search is done, more advanced search in-progress)
    • Cloudflare Workers KV
    • Redis
  • Generate fetch functions and type definitions for the client
  • Permission based authentication / authorization support.

Example project

declarapi-example

Goals / TODO

  • Use user's credentials and authorize based on data field (such as userId, so a user can edit records created by them.)
  • Generate a describe method to let the client know the schema dynamically
  • Generate the source in a way that allows to create a summary file, so in case of multiple api methods / endpoints, the user only needs to import a single file.
  • Generate automatic functional tests for the APIs
  • Generate automatic load / performance tests for the APIs
  • Add pagination to get requests
  • Other TODO.