Full disclosure, my ideal stack is constantly changing. Every time I start a new project I do a deep dive on the latest and greatest technologies that I might want to try. When building technology for startups, I tend to pick tools that optimize for developer productivity and modularity. Developer productivity allows me to move quickly with the understanding that we might scrap things that aren't working. Modularity allows me to replace parts of the stack with more scalable/performant technologies as the startup grows.
Every project will have unique considerations so you'll need to do your research and make sure you're using the right tools for the job. But this is generally where I like to start.
So, here we go. My ideal startup tech stack (as of Oct 2020):
- React (Web) & Next.js
- React Native (Mobile: iOS & Android)
Obvious choice if we’re building a website from scratch - it's an industry standard at this point.
React Native (Mobile: iOS & Android)
Apollo is the industry standard GraphQL implementation. We'll use it on the front-end to talk to our GraphQL API. We'll also use Apollo to create our API on the backend. More on that soon!
One fun fact: in the past we’d also need a “local store” on our front-end to store data about our app's state, such as Redux or MobX. With the release of Apollo Client 2.0 we can use apollo-link-state to maintain a single source of truth. It gives us a common language to refer to all forms of data, whether it be app state or data that comes from a GraphQL API.
Additional resources: The Future Of State Management
Additional resources: Why Node.js Is Totally Awesome
I’ve used both REST and GraphQL in production code bases and I LOVE GraphQL. I could write a whole other post about my love of GraphQL but most high-caliber engineering teams starting new code bases seem to be using it. The major improvement with GraphQL is that it alleviates the issues with over-fetching and under-fetching data. It also makes front-end development significantly easier.
"It helps clients fetch the right amount of data needed to render the view. GraphQL lets clients define the shape of the response for each request. In addition to this, it removes the complexity of API Endpoint management on these clients, as it exposes a single HTTP Endpoint (and is usually /graphql) to fetch the required data." - Source
Additional resources: When And Why To Use GraphQL
Prisma is an API to your database. It replaces traditional ORMs and makes database access easy with an auto-generated query builder for Node.js. (Trust me, this saves significant time and avoids a ton of repetitive code). You can use any relationship database and you never have to write a line of SQL!
Additional resources: How Prisma and GraphQL Fit Together
PostgreSQL is a good choice for a database because it’s free, open-source, and highly customizable. It has never let me down.
Additional resources: Which Companies Use Postgres And Why
At the end of the day, your tech stack must be built to maximize the value you provide to your customers. Do they want speed? Do they want beautiful animations? Do they want to be able to log in and securely store their personal data? Each of these considerations will help you make the call on what tools you'll need to use.