The NRG (Energy) Tech Stack And Why I Chose It
Chosing a tech stack is one of the critical decisions you have to make when founding a startup.
After weighing all the options, I went with the NRG stack: NestJS / React / GraphQL.
Here’s why.
The Criteria
Modern yet Mature: I wanted something that feels fresh and strikes the perfect balance of new and exciting yet tried and true.
Well-Documented: There’s nothing worse than trying to figure out how to do something, only to discover that the docs and community around the tech you use are a desolated wasteland. With this stack you get the exact oposite, a rich and vibrant community with a plethora of docs.
Easy to Learn: I needed a stack that is easy to learn so new team members can ramp up asap. Something that has a plethora of docs, tutorials, and a vibrant community around it.
Fast to developDevelopment Speed: In a startup, every minute counts. The tech stack should allow you to reuse code across backend and frontend while also have a robust set of tools and generators to make development super fast.
Scalabile: The stack needs to grow as the company grows.
Availability of Talent: A popular stack makes hiring easier. And fullstack Typescript is hard to beat.
Enjoyabilite: Coding should be fun, especially in a startup environment when you can find yourself grinding at it for long hours. The tools shouldn’t fight you, they should bring you joy!
The Stack
NestJS: The Backbone of My Backend
I chose NestJS because it combines the best elements of Object-Oriented and Functional Programming, all while being built on TypeScript. TypeScript offers strong typing, which greatly reduces runtime errors and helps in scaling. NestJS also boasts excellent documentation and a modular structure, making it easier to onboard new developers as the team grows.
React: The Face of My Frontend
React’s component-based architecture was a major draw. This allows for code reusability, which speeds up the development process. The library has robust community support, a plethora of third-party libraries, and excellent performance optimizations right out of the box. It’s incredibly versatile, capable of handling anything from small SPAs (Single Page Applications) to complex, large-scale applications.
GraphQL: Streamlining Data Fetching
GraphQL revolutionizes how you think about fetching and manipulating data. Unlike REST, it allows the client to request exactly what it needs, reducing over-fetching or under-fetching of data. This is a boon for performance, especially crucial for startups who may not yet have the luxury of large-scale infrastructure. The devtools are also really good, making the development experience really enjoyable.
Additional Tools
TypeORM: Simplifying Database Interactions
TypeORM is an ORM (Object-Relational Mapping) tool that makes it incredibly easy to interact with my Postgres database. It allows you to manipulate tables as if they were JavaScript objects. It’s also TypeScript-friendly, which brings the strong typing benefits into the data layer.
PostgreSQL: For a Robust Data Store
I opted for PostgreSQL because of its reliability, feature set, and strong community support. It scales well both vertically and horizontally and offers a variety of extensions that can be instrumental as your data needs grow.
Nx Monorepo: Efficient Codebase Management
Nx provides tools for managing a monorepo setup, which allows multiple related projects to live in a single repository. This is extremely useful for code sharing, making it easier to propagate changes across different parts of the application. It also has built-in dev tools that significantly speed up development.
Material UI (MUI): Fast-Tracking Frontend Design
MUI offers a comprehensive set of ready-to-use components that adhere to Material Design guidelines. This helps in speeding up the UI development, allowing me to focus more on business logic without compromising on the aesthetics or user experience.
Conclusion
Selecting a tech stack is one of the decisions that can significantly affect the course of a startup.
In choosing the NRG stack and its supporting tools, I’ve laid a foundation that balances both current agility and future scalability.
If you find yourself at this decision-making crossroads, the NRG stack comes highly recommended. It’s a choice that has served me well and one that I believe will continue to pay off.
This post was originally published on September 26, 2023Get a newsletter you'll look forward to
Resources to help you grow as an engineer and leader
100% free. No spam. Unsubscribe any time.