Live data from Hacker News

Ask HN: Go-to web stack today?

news.ycombinator.com

11–20 of 453 posts

Re: Ask HN: Go-to web stack today?

#11
- On the frontend, use React with TypeScript.

Create React App now makes it dead easy. Just do:

    npx create-react-app myapp --typescript
- Do not use redux until you know React well. You might not need it. If you do need it, use `redux-starter-kit` offered by the core Redux team.

- For backend, just use Django (or Rails). Elixir's Phoenix is also very well thought out.

- If you use node: express, sequelize. Async/await has made things much easier on the node side though. Express doesn't still have async support by default, but there are middlewares and native support is coming with express v5.

- Use relational databases (postgres) by default.

- For authentication on the web, just use cookies (Do not use jwt). Put nginx in front of django and your static files (react etc) from the same domain so that you do not have to use CORS, JWT etc etc. So, an easy choice is myapp.com/static serves your React bundle while the cookies are on myapp.com

Some tooling tips:

- Use VS Code if using JS

- Use prettier (for js, css, html, and relevant VS Code extension) and black (Python) for automated code formatting

- Use jest and VS Code's jest extension (Orta's) for automated tests within the editor

- For deployment, I roll my own, but zeit's offerings are exciting.

- codesandbox.io, repl.it etc are amazing for testing out various stuff without downloading stuff. You can get a React/Angular/whatever environment within seconds that will give you a public url for your app.

- json-server in npm will get you a mock REST API with GET/POST/etc support within seconds from a json file.

Re: Ask HN: Go-to web stack today?

#15
Front end: Typescript, Vue, Bootstrap

Backend: Node, Typescript, Express, TypeORM, Postgres, SocketIO, PugJS, BabylonJS

Webpack for bundling

Digital Ocean or Azure for Ubuntu vm hosting

I feel having the same language for front/back end really reduces mental overhead.

Re: Ask HN: Go-to web stack today?

#16

- On the frontend, use React with TypeScript. Create React App now makes it dead easy. Just do: npx create-react-app myapp --typescript - Do not use redux until you know React well. You might not need it. If you do need it, use `redux-starter-kit` offered by the core Redux team. - For backend, just use Django (or Rails). Elixir's Phoenix is also very well thought out. - If you use node: express, sequelize. Async/awai…

Yes very good answer.

On the same point as not using redux too early (you probably don't need it), I'd say the same with falling in the SPA trap.

Most modern apps are now de-facto built as SPAs, mostly for wrong reasons. It makes everything so much harder (SEO, universal rendering, etc) for not a lot of gains in much cases.

Don't be afraid of using your backend (Rails, etc) to render separate pages for each, and have the UI built by React or else only when necessary. Vue also does a great job at making it easy to have "mini" apps for each page.

Re: Ask HN: Go-to web stack today?

#17
post #13

React hosted in an S3 bucket, API Gateway with one Lambda function per model, single DynamoDB table with overloaded indexes. This will cost you pennies to spin up and get traction with.

how do you handle SEO in this case?

AFAIK most crawlers (including facebook etc) don't load javascript, so I'm always wondering how to allow dynamic pages (say a product's page) to be crawled and have a og meta tags.

If this had a great solution, boy things today would be much easier!

Re: Ask HN: Go-to web stack today?

#18
post #17
post #13

React hosted in an S3 bucket, API Gateway with one Lambda function per model, single DynamoDB table with overloaded indexes. This will cost you pennies to spin up and get traction with.

how do you handle SEO in this case? AFAIK most crawlers (including facebook etc) don't load javascript, so I'm always wondering how to allow dynamic pages (say a product's page) to be crawled and have a og meta tags. If this had a great solution, boy things today would be much easier!

If you are relying on SEO to gain initial traction, your project is going to fail. Start worrying about SEO when you have a core base of users who are actually using your product and by then you'll be more interested in refining features for your userbase that you won't fall into the feng shui trap that is SEO.

edited to add: The reason I discount SEO like this is because SEO is essentially chasing a search result against competitors who likely have more budget, more resources, and more time to play that game. Spend your time on making your product better, aggressively market directly to people instead of relying on the passive results of SEO, and by the time your project takes off, you will hopefully be in a spot where you won't care very much about why using react-helmet doesn't help with Facebook shares.

Re: Ask HN: Go-to web stack today?

#19
post #12

Netlify for free hosting. Static site generators for HTML and vanilla CSS/JS. Sometimes Vue and Material.io if it's a larger SPA.

What static site gens do you like? Keep thinking about Hugo, but apparently its hard to customize well?

Re: Ask HN: Go-to web stack today?

#20
For static websites, https://getstatik.com/

For “dynamic” websites, Mithril (https://mithril.js.org/) and Redux written in Haxe (https://haxe.org/) on the front end with Rocket (https://rocket.rs/) and SQLite on the backend, proxied behind nginx with Let’s Encrypt on the backend.

Personal projects hosted on a VM at Linode, company projects hosted on VMs at Google Cloud.

It’s a somewhat unique stack but I love it and can be exceedingly productive with it.

Post reply on HN