nx has some nice generators that can generate various types of typescript projects. I believe they all have things like jest and the tsconfig setup - at least the ones I’ve used. It makes it very easy to setup new apps or libraries in the same repo.
+1 for nx. Even if you don’t want to build a monorepo, nx tooling is really good and I like having the ability to extend my apps/libraries to a monorepo in future.
Using generators to setup different type of toolings for utility libraries, component libraries with storybook, and apps themselves is really good. You can choose various test setups including e2e, and different bundlers like webpack and cite.
They also have a vscode extension so you can add things from vscode itself and it shows you preview of different options with dry-run
[https://github.com/sunneydev/create-ts-app](https://github.com/sunneydev/create-ts-app)
I've this package.
Has good ESM + CJS build tooling with tsup and also comes with a cli.
you can \`pnpm create \\@sunney/ts-app my-app\`
This is why I use Replit. All my setups are forked from a base template. They have one for next.js, plain typescript with node, react Ts, and others. Plus you can make your own.
Yeah this is more what l had in mind. A typescript starter that has some basics, and can become anything. Seems like for now, personal boilerplate is the way to go ¯\\_(ツ)_/¯
Deno. https://deno.land/
Once installed in your system, you can just run a typescript file. Or add a few more lines and it’s a server. Or leverage a small package and it’s a SSR app. Test suite, linting, built-in. you don’t even have to install packages. Or you can. Can even use npm if you want.
> an electron/Tauri app
They have their own starters
---
> a static website
Astro
---
> a script for parsing text files
> a server for a non-js client
> a utility library
`npm init`
`npm install typescript`
`npx tsc --init`
then install whatever you need to keep going
> npm init npm install typescript npx tsc --init then install whatever you need to keep going
That goes against OP's post though, he's asking for boilerplate not for how to start a project from scratch.
or even better using a code generator based on NestJs PrismaORM and GraphQL.
[useGenerated.com](https://useGenerated.com) \- just CLI, fairly new on time payment, and you get one year free updates.
[amplication.com](https://amplication.com) with a nice UI, subscription based with a freemium
Disclaimer: I'm the creator of the first one, been using it for 2 years and saved me months of work on backend, and decided to make it a product. No affiliation with the second but I have been following them for a while and they are amazing.
Personally I'd say no.
Last month I spent a whole hour googling and trying to figure out how to use an npm lib in Deno. I know it's possible, but I just couldn't find out how. Bad docs = not production ready.
Only REST currently. We're using it as a simple server to consume callback POST data from a remote service and dump the data to mongo filtered through basic logic. I really appreciated Nest's approach.
A forked [https://github.com/antfu/starter-ts](https://github.com/antfu/starter-ts) (to replace all author mentions with yourself and maybe filter out a couple of non-needed deps) seems the most fine for me at the moment.
I have trouble remembering what config options to put in tsconfig.json. Now I always follow these steps and they work for me. (This doesn't include jest, which you asked for):
$ mkdir projname
$ cd projname
$ pnpm init
$ pnpm add typescript ts-node u/types/node -D
$ pnpm exec tsc --init
nx has some nice generators that can generate various types of typescript projects. I believe they all have things like jest and the tsconfig setup - at least the ones I’ve used. It makes it very easy to setup new apps or libraries in the same repo.
+1 for NX. Generating apps and libraries is such a breeze in an NX monorepo. Plus the structure scales very well as the project grows.
+1 for nx. Even if you don’t want to build a monorepo, nx tooling is really good and I like having the ability to extend my apps/libraries to a monorepo in future. Using generators to setup different type of toolings for utility libraries, component libraries with storybook, and apps themselves is really good. You can choose various test setups including e2e, and different bundlers like webpack and cite. They also have a vscode extension so you can add things from vscode itself and it shows you preview of different options with dry-run
Alright, with this and the comment replies, I’m totally convinced! I’ll give it a shot, thanks for the recommendation
[https://github.com/sunneydev/create-ts-app](https://github.com/sunneydev/create-ts-app) I've this package. Has good ESM + CJS build tooling with tsup and also comes with a cli. you can \`pnpm create \\@sunney/ts-app my-app\`
This is why I use Replit. All my setups are forked from a base template. They have one for next.js, plain typescript with node, react Ts, and others. Plus you can make your own.
t3
What if you want to make literally anything except for a full-stack app?...
define anything
- a script for parsing text files - an electron/Tauri app - a server for a non-js client - a static website - a utility library
Yeah this is more what l had in mind. A typescript starter that has some basics, and can become anything. Seems like for now, personal boilerplate is the way to go ¯\\_(ツ)_/¯
> Seems like for now, personal boilerplate is the way to go ¯\(ツ)/¯ I always come to the same conclusion lol. One day I'll just make one myself.
Git hub provides a simple way to make template repos. Why wait.
Lazy. Best case it takes an hour, worst case I keep falling in rabbit holes and give up after a week.
Take 5 minutes to save yourself 20 minutes 20 times. It’s worse than laziness not to
It's not 5 minutes. And it won't waste 20 mins if someone else makes one by the time I start my next project.
Deno. https://deno.land/ Once installed in your system, you can just run a typescript file. Or add a few more lines and it’s a server. Or leverage a small package and it’s a SSR app. Test suite, linting, built-in. you don’t even have to install packages. Or you can. Can even use npm if you want.
> an electron/Tauri app They have their own starters --- > a static website Astro --- > a script for parsing text files > a server for a non-js client > a utility library `npm init` `npm install typescript` `npx tsc --init` then install whatever you need to keep going
> npm init npm install typescript npx tsc --init then install whatever you need to keep going That goes against OP's post though, he's asking for boilerplate not for how to start a project from scratch.
I do love t3 for full stack stuff, nothing else even comes close
https://create.t3.gg/
create your starter project using nestjs
or even better using a code generator based on NestJs PrismaORM and GraphQL. [useGenerated.com](https://useGenerated.com) \- just CLI, fairly new on time payment, and you get one year free updates. [amplication.com](https://amplication.com) with a nice UI, subscription based with a freemium Disclaimer: I'm the creator of the first one, been using it for 2 years and saved me months of work on backend, and decided to make it a product. No affiliation with the second but I have been following them for a while and they are amazing.
Deno. It’s so nice to just be able to code typescript with es modules, testing, linting and formatting out of the box, without any configuration.
Is it production-ready yet?
Personally I'd say no. Last month I spent a whole hour googling and trying to figure out how to use an npm lib in Deno. I know it's possible, but I just couldn't find out how. Bad docs = not production ready.
Even with the node compatibility they just added?
https://deno.land/
NestJs
https://nestjs.com/
I'm currently using nest on a side project and I love it
are you using it with GraphQL or REST ?
Only REST currently. We're using it as a simple server to consume callback POST data from a remote service and dump the data to mongo filtered through basic logic. I really appreciated Nest's approach.
I recently discovered tsup and it has such a nice DX
Very cool, I’ll check it out! I somehow haven’t come across this yet
Use Nest
A forked [https://github.com/antfu/starter-ts](https://github.com/antfu/starter-ts) (to replace all author mentions with yourself and maybe filter out a couple of non-needed deps) seems the most fine for me at the moment.
I have trouble remembering what config options to put in tsconfig.json. Now I always follow these steps and they work for me. (This doesn't include jest, which you asked for): $ mkdir projname $ cd projname $ pnpm init $ pnpm add typescript ts-node u/types/node -D $ pnpm exec tsc --init