Skip to content

generates new fastify applications in everyone's favourite language typescript with various options to choose from based on your project needs

License

Notifications You must be signed in to change notification settings

opendevs-org/fastify-typescript-generator

Repository files navigation

welcome to fastify-typescript-generator 👋

Version npm npm bundle size npm Documentation Maintenance License: MIT Snyk Vulnerabilities for npm package

generates new fastify applications in everyone's favourite language typescript with various options to choose from based on your project needs

📰 npm

📸 demo

fastify-typescript-generator-demo

install

$ npm i -g fastify-typescript-generator

usage

Run anyone of following commands:

$ fastify-gen
# or
$ fastify-typescript-generator
# or
$ fastify-ts-gen

Or, to avoid installation and usage simply use the following command:

$ npx fastify-typescript-generator

❓ what is it

creates a new fastify application as a starter boilerplate similar to the fastify-cli module. except this new application is configured to use typeScript instead of plain javascript and provides various options such as, kind of project structure to use with focus on plugin structure for fastify developers and express structure for developers with experience in developing with express, it also provides options for typeorm or mongoose.

🤔 why fastify-typescript-generator

nodejs is great for the rapid development of web-projects, but is often neglected because of the lack of type safety. typescript solves this issue and (along with its linter file) can even make your code more robust than some other static languages like java.

there are some other tools out there to generate fastify apps with javascript such as fastify-cli, but these either haven't been updated in a while or don't support typescript or don't support various development patterns.

in this application you have two options to setup a project in fastify plugin architecture or express architecture, we have setup mongoose/typeorm integration, routes, swagger (in plugin structure only) for you.

📜 different options available explained

description of various options available
name description
plugin-structure-mongoose this type of structure includes fastify plugin structure which relies on modules described as reusable plugins that contain their own entities, routes & schemas, additionally paired with swagger and mongoose for connection with mongodb
plugin-structure-typeorm this type of structure includes fastify plugin structure which relies on modules described as reusable plugins that contain their own entities, routes & schemas, additionally paired with swagger and typeorm for connection with various sql (like postgresql, mysql) and no-sql databases (like mongodb)
express-structure-mongoose this type of structure includes express generator structure which relies on models, routes, dao, services, additionally paired with swagger and mongoose for connection with mongodb
express-structure-typeorm this type of structure includes express generator structure which relies on models, routes, services, additionally paired with swagger and typeorm for connection with various sql (like postgresql, mysql) and no-sql databases (like mongodb)

happy app-deving 😊

👤 author

open devs ([email protected])

🚀 future scope

  • adding docker & container configurations
  • adding template support
  • more template structures

🤝 contributing

contributions, issues and feature requests are welcome!
feel free to check issues page. you can also take a look at the contributing guide.

🙌 show your support

give a ⭐️ if this project helped you!

Buy Me A Coffee

📝 license

copyright © 2020 open devs ([email protected]).
This project is MIT licensed.


this README was generated with ❤️ by readme-md-generator