Hacker News new | ask | show | jobs
by anaolykarpov 2232 days ago
I couldn't find a satisfying NodeJS full-stack for web app development that would be have: TypeScript, PostgreSQL, GraphQL, ReactJS, Material-UI, docker containers where the same backend image used for development would get deployed on production, while the UI production machine would be an nginx image with the assets generated at build time.

So I created such a stack - the Knests stack (https://github.com/tudorconstantin/knests).

I actually started to work on this in December, but I published it a few days ago.

Please beware that in order to use it for your projects right now you'd have to be quite comfortable with the nodejs ecosystem because the whole stack is not quite tidied up.

2 comments

I am also working on this! I used Node a lot 5 years ago and not much since, so I'm coming up to speed on TypeScript and various other things. I'll check your stuff out. I may throw mine away.

I love a lot of things about the Node ecosystem, but the fact that being out of it for 6 to 12 months means you fall behind is not great.

The main components I used, are: NestJS with Express as an app server, KnexJS as a query builder (because people seem to not like TypeORM that much, it lacks migrations and you have to go pretty fast to custom SQL queries), NextJS for the UI.

Yeah, I totally feel you with falling behind regarding the full-stack web dev with node/react, the pace is incredible.

> people seem to not like TypeORM that much

I started down the road with TypeORM for my starter, and I ran into several pain points. I was reading the Knex docs last night actually, heavily considering switching. I also wrote a quick `pg.ts` file to just use node-postgres directly, but the lack of migrations is just too painful. I looked at db-migrate briefly but didn't come to any conclusion.

So that's a long way of saying, I think Knex was a good choice. Provides migrations, handles connection pooling and transactions, but doesn't deviate too far from SQL.

if you're using react then definitely checkout https://www.bytehub.dev/ for some cool react components
This is awesome man! Bookmarked and will be using for my next project.

My stack currently is mostly ReactJS, ReactNative, Flow, GraphQL, Sequelize, Postgres, Apollo and NodeJS

I'd love to swap out Material-UI for SemanticUI though... hope it'll be a seamless swap
With the last commit in master in late 2018, SemanticUI seems a bit deserted.

Anyway, in order to change it, you should discard everything non-nextjs and non-docker related from the client/ folder, like client/common/, client/components/, client/helpers (except client/helpers/configureGraphQL.ts), client/icons, client/layouts, client/theme, client/pages/{login.tsx|signup.tsx|dashboard/}, remove the material-ui related stuff from package.json and then proceed installing the SemanticUI.

-

Great, thanks!