-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Danny SMc edited this page Nov 1, 2021
·
22 revisions
The Turbo engine is a command-based framework for building API (and web) based applications using either built-in plugins or community/custom ones.
With Yarn:
yarn add @symbux/turbo
With NPM:
npm install --save @symbux/turbo
Turbo comes with tons of great features and core plugins out of the box including Http and WebSocket plugins for running servers for both.
A list of available features:
Feature | Description |
---|---|
Controllers | Controllers are used to handle requests from a service, with the ability to use the same controller to serve many services. |
Middleware | Middleware can be applied to controllers for authentication and authorization validation, like managing CORS, or IP blacklisting, alongside checking a token/login status for a user. |
Autowire | The engine offers built-in autowiring for framework modules, like plugins, controllers, fibres, providers, tasks, and more. |
Plugins | Plugins are used to extend the engine with new functionality, like adding new services (i.e. Discord bots), or more generic functionality. |
Tasks | Tasks are used to run tasks based on a cron-style syntax, these can be used to run tasks on a schedule, or to run tasks as needed. |
Fibres | Fibres are classes, that proxy exposed methods into a thread, allowing them to run in parallel but also freeing up your main thread for running intensive operations. |
Authentication | Built in authentication decorators can be applied to a controller method to do checks against middleware set authentication data. |
Registry | The engine provides a registry for storing data, this can be used to store data in memory, alongside the registry stores all modules that have been loaded into the engine. |
Services | Services are classes that provide a service which can call controllers, and methods to run business logic, for example the HttpPlugin comes with a HttpService that sets up and manages an Express application, usually we suggest setting services up as plugins, see the source code src/plugin/http as an example. |
Services | We use a custom dependency injection library called @symbux/injector to handle dependency injection for modules. |
Plugin | Description |
---|---|
HttpPlugin | The built-in HTTP plugin is based off of Express. |
WsPlugin | The built-in WS plugin is based off of Express-WS, will initialise an express server if the HttpPlugin is not initialised. |
- ORM - An ORM for data management in MongoDB and MySQL.
- DiscordPlugin - A discord plugin, that offers SSO (single sign on) to discord with built-in bot support using the new slash commands.
- Turbo CLI - A command line interface for Turbo, to install plugins, boilerplate plugin projects and automate building and deploying Turbo applications.
- UiPlugin - A pre-built Vue based SSR framework for writing user interfaces for the framework (allowing other plugins to extend it).
- AuctionPlugin - A plugin to support auction systems, using commission, timed, and live bidding (Extends UI Plugin).
- Controllers
- Middleware
- Autowire
- Plugins
- Tasks
- Fibres
- Authentication
- Registry
- Services
- Dependecy Injection
- Translations (i18n)
- Safe Quit
- Exception Handling
- Event Listener
- Custom Logger
- HTTP Plugin - Built-In
- WS Plugin - Built-In
- Discord Plugin - External
- Vite Plugin - External
- Inspect Plugin - External
- CLI Plugin - External
- Got an issue? Join our Discord
- Need your own plugin? Contact Me
- Have an idea? Let's Discuss
- Want to support me? Buy me a coffee