0.1.6 • Published 4 years ago

@ziao/dew-rest v0.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Dew

A highly opinionated REST framework written in Typescript. Dew uses the following major libraries:

  • Mikro-orm (Database mapping)
  • Express (HTTP handling)
  • Pino (logging)
  • Jest (testing)
  • Prompts (CLI tool)
  • Passport (authentication)
  • JOI (validation)

Installing

Usage

Useful documentation

Contributing

Todo (Replaced by Trello)

PINO is at v6

Core:

  • Hook system (Inspired by FeathersJS)
  • Services
  • Custom services
  • Plugin system
  • Easy error handling
  • Errors, like @feathersjs/errors
  • Config system (.env files (like Vue), autoscanned config folder(?))
  • Logging system. Figure out how to expand this later. Maybe a replacable logger?

Plugins:

  • Authentication (passport)
  • Command line interface (oclif)
  • Cluster support (redis)
  • Documentation generator
  • GraphQL interface (type-graphql)
  • REST interface (express)
  • (Web)socket interface (socket.io)
  • HTTP (express, helmet) (handle json, urlencoded, etc) (setup public folders) (integrate with auth to protect folders?)
  • Performance monitor
  • Scheduler
  • Upload handler
  • Reactive (rxjs)

Consider:

  • Migrations (Mikro has a tool for this, look into it)
  • Model validation (or should this be a plugin / hook?)
  • Fixtures
  • Client library
  • Patreon
  • standardize M:M relationships through REST
  • Query params to cherry-pick some relations
  • I18N
  • Transaction support (where to put this?)

Other:

  • Linting (TSLint, ESlint, Prettier)
  • Husky hooks
  • Testing (Jest) + Coverage
  • CLI tool for scaffolding Dew projects
  • Automatically generate Dew documentation (Vuepress)
  • Website

Bundled hooks:

  • Soft delete records
  • Check feathers

Research

  • Does Mikro ORM use custom repositories for relations (for middleware)? -> Nope.
  • Better errors for Mikro (notfound / validation error use the same class with no way to determine which one)

License

MIT

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago