0.1.6 • Published 5 years ago
@ziao/dew-rest v0.1.6
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