An opinionated collection of tips for technical founders. There are lots of guides around "how to find product market fit," how to hire, and other aspects of being a technical founder. And on the technical front, there are many tutorials for beginners creating "hello world" apps, and lots of advice on how to deal with massive scale and huge existing systems. But there are fewer guides on how to get a greenfield codebase up and running so that its a solid foundation you can build a team and product around.
Hopefully, this will be useful for non-technical founders too - you'll get a flavor for the work that goes into building software at a professional level that is more than "prioritizing tickets and coding features."
It's mostly geared towards services, but this applies to rich client applications (desktop, mobile, and embedded) as well, especially if they have to talk to a backend service.
I'll also recommend some vendors, libraries, and services here, most of which I've personally used.
How to get up and running without accruing a bunch of foundational debt.
Do you have expertise in building, running, and debugging your technology choices? This may be the most important near term question - your initial momentum has ripple effects for the rest of the organization's existence. Don't start with a technology stack that your founding team is unfamiliar with.
Is this a bad choice for the solution you're building? There's usually not a single right answer, but there are a lot of wrong ones. E.g., "we'll write our web app in C++" is most likely a wrong answer.
Can you hire for this stack? Will you need to? How is the industry trending?
Resist the urge to take the more technically impressive approach when it is of dubious benefit.
Whatever you do, don't use a microservices architecture. You ain't gonna need it.
If you're making a web app, most likely you don't need to build a Single Page App. Creating dynamic web applications with just pure server-side rendered HTML is approximately 5 times less effort than a comparable SPA, and mostly nobody will notice. The best part? You can still mount React.js components and such wherever you need highly interactive and complex UI with lots of state. Just don't make the mistake of defaulting to this for your entire app and paying the tax forever. Managing an API with a single internal consumer is just volunteering for needless pain.
Decide on your version control system. Unless you have a very specific compelling reason to do otherwise, use git: most developers these days are trained on git (unless they work somewhere with a proprietary internal system like Google, Microsoft, IBM, etc - but in any case the concepts employed will have parallels in git). Linux and Windows (e.g., millions of files in a single repo) are versioned with git. I promise it supports what you need.
Create a policy for how new libraries, databases etc are added to this environment.
Make sure your environment is documented, versioned, and reproducible. You will likely want to use some container technology (like Docker) to get these reproducible build environments; this may also help with the deployment story. Your ideal state is "run this one-liner to install Docker, then use this one-liner to bootstrap everything in Docker." Test this on a new machine, repeatedly if necessary: ideally anyone should be able to copy paste a script on a machine out of the box and have a working dev environment. I recommend creating a VM, and snapshotting it so you can restore it to a clean "just before my setup script" state.
Create a seed file to prepopulate any data needed to boot the app. Check this into source control and reference it from your setup steps.
Consider what IDEs will be supported. You might want to check in configuration files for those IDEs to enforce certain norms (e.g., tabs vs spaces, semicolon policy, etc). Set up linters configuration, document what licenses are needed, and check this into the readme.
Consider starting on a cloud IDE like Github Codespaces, AWS Cloud9, or Google Code Cloud. A cloud IDE will save you hours of toil and debugging broken setups, "works on my machine" problems, and general reproducibility issues. Unfortunately there are still many use cases where the limitations of cloud IDEs prevent widespread adoption (applications that depend heavily on subdomains comes to mind).
In general, minimize dependencies on an external service to boot up. Service outages or lack of internet access will break your ability to start up your dev environment (taking a dependency on a cloud IDE is a calculated risk in this regard). Also note that network dependencies to start your dev environment may imply you need it for your production service to boot as well.
Use a dotenv file (unversioned) to store secrets. Version your configuration files and don't store configs with your secrets. Configs are like "in development, the web server starts 5 threads." If you store all your configs and secrets in unversioned dotenv files, synchronizing configs between developers becomes a nightmare.
You probably aren't using a "network perimeter model" so hopefully you don't have a need to set up a corporate network, VPN access, etc.
Use Cloudflare to host your DNS. You can use the AWS or Azure or Google-specific services too, but Cloudflare is the best and you likely want them in the mix even if you use one of the others. Cloudflare comes integrated with a CDN, reverse proxy, SSL, and many security features, with pricing from "free" to "surprisingly reasonable." This significantly cuts down on the number of other vendors you need to work with and integrate.
Enable DNSSEC and periodically export your configuration files to backups just in case. You should also be enabling HSTS, making a habit of always assuming HTTPS, and not supporting HTTP at all. This is much easier to do from the get-go than trying to enable HTTPS later and dealing with mixed-content issues forever after.
Most people benefit from starting and staying on a monolith architecture on a single repo per deployment target - e.g. one for web, one for iOS, etc.. Dependency management and sharing of common libraries otherwise becomes very hard way too early, sucking up valuable time on menial trash like how to sync schemas between your microservices. Public services like Github do not necessarily do "single monorepo with multiple deployment targets" well, since you usually want to only build and deploy on every commit, but only for the specific targets that were changed (e.g., if your backend and frontend are separate deployment targets, you might not want to trigger a deployment of your backend when someone checks in a frontend change, but this requires extra work to configure in a monorepo).
Low operational overhead is the name of the game. Use a managed database if you can, and favor one of the managed platform providers like Heroku or Render if you can.
Make sure you have encryption at rest and protect sensitive information in transit.
Make sure you have high availability and failover instances of every tier - frontend, web, database, and so on.
Make sure backups are enabled, and you have a documented policy to test these annually.
Make sure your environment is documented, versioned, and reproducible.
A build should be a single command in both dev and the test environment. A single script should be able to produce a production build at any time. If you're creating a service, this should extend to deployment as well - deploying to production should be a single command. You'll want to do this often and maintaining a green build all the time is one of those areas where automation always pays for itself and changes the way you develop for the better.
In general this should be run on every checkin with results visible in your VCS. I highly recommend investigating if your hosted VCS provides this out of the box: Github Actions, GitLab CI/CD, etc. Minimizing the number of vendors and logins you deal with is always critical, but helps a lot early on since you probably don't have a corporate identity service yet.
Your test system may depend on external vendors - Chromatic, Browserstack, etc.
If you're running a service, you need a way to deploy to production in a single step. You'll also need to configure other environments: staging, test, pre-production, or whatever name(s) make sense for your workflow. You will need to secure these and potentially register separate domain names (etc) for each environment, as you want each environment to be 100% segregated and independent of any other environment, with no resource sharing whatsoever.
Design the system to allow one-click rollbacks of code. You'll need it eventually. I like Heroku because of this. Your goal is to facilitate high deployment confidence and lower the cost of mistakes so builds and deployments can be fast and iterative.
Make sure everyone knows where to look up the history of deployments and what the current status of the service is. "Hey prod is down, did someone just deploy? How can I reach them?" is not a situation you want to find yourself in.
Each time you run into problems in your pipeline, update your documentation on edge cases (e.g., most people learn quickly they can't roll back certain changes naively, if they include a database migration or API change).
Once you're up and live, make sure you invest in your devops system to maximize visibility and confidence.
For services, initially your release process is going to be fairly coupled with your build/deployment process. This is fine for most domains. You may eventually need to decouple them, which is when integrating a service like LaunchDarkly will help with this.
For rich clients, there's often a number of manual steps (especially at first) to get a release out, and this may involve waiting on approval from a third party ecosystem gatekeeper. Write these steps down as you do them to minimize the mental overhead and risk of errors (or extended review cycles). Your goal as you do this the first few times is to automate the mundane parts as much as possible and make this readme as short as possible - it should still be a single command to build a production release, even if there are a bunch of other inputs to submit for app review.
Sooner or later you will need to add some kind of queuing to your system so that it can handle surges in activity and long-running tasks. There are some great language-specific libraries for this (Sidekiq for Ruby, Celery for Python, etc), but resist the temptation to use them for generic "async message queues" - for those, you'll want something much more suited to message passing like AWS SQS, RabbitMQ, etc.
The robustness of you error reporting is critical, so make sure you configure all the integrations and libraries correctly or you might not even know when you've shipped a showstopping bug. Take the time to connect your VCS and set up any de-duplication rules as needed when the first bugs come in. A good exception tracker has the robustness and flexibility to support accurate de-duping of common crashes and exceptions. Also make sure you can distinguish what version of the code is running so you can group be build and trace regressions back to the code that introduced them.
Make sure you are streaming all your application logs to somewhere they can be searched. They can help you chase down anomalies and find patterns in production that don't show up as crashes or exceptions.
Separately from logs and exceptions, you'll also need operational monitoring - how many requests are you serving, and how quickly? What resources are near capacity? When was the last deploy? This last one is important to instrument so you can quickly tell if a recent change broke something.
AWS Cloudwatch (for example) lets you cobble a lot of this together, but NewRelic or DataDog might be more suited and offer many drop-in libraries for collecting and reporting operational statistics you can alert on.
You'll want to set up a vendor like PagerDuty or Opsgenie to schedule any on-call rotations, if your service has uptime requirements.
Set up key transactions to monitor (and configure baseline metrics to fire alerts if they go out of range). Response times, queue delays, etc. Initially, tighter tolerances are helpful as things can go from "degraded" to "completely down" very quickly.
You may want a public facing statuspage so you can share updates with customers in the case of incidents.
Salt and hash your passwords.
Encrypt sensitive data at rest at the application level. Enable encryption at your data tier.
Encrypt in transit with TLS. Enable DNSSEC and HSTS.
Store your secrets separately from your code. Defend against XSS and content injection.
Once deploying to production is seamless and automatic, you'll need to get add supporting infrastructure to deal with real live users and your initial customers.
Use Stripe for handling billing and money. Nothing else really comes close.
Depending on how complicated your billing ends up being, you sometimes have no choice but to custom-build on top of Stripe. This gets complicated fast, and is rarely worth it when (for example) selling to SMBs. Stick to month-to-month or annual prepaid billing or a pay-as-you-go balance for usage-based.
You'll have all kinds of exceptions you need to support - internal staff, partners, investors, etc, are all potential groups that you want to sometimes treat "specially."
You'll need to weight the benefits of pre vs post paid billing, and other details like whether you'll issue invoices based on signup date or month-aligned. Complexity in billing builds up fast.
One subtle problem you'll need to solve is: you must agree as a team on where your source of truth for billing information lives. As an engineer, it can be tempting to say "I know! I'll store it in Stripe!" Except - if you deal with mid market or enterprise, your customer data is probably in Salesforce or Zendesk, or written up in some sales contracts, potentially sitting in someone's email inbox. Things are fine if you truly have a self-serve product and everyone is paying the same price for a Pro or Business plan. But as soon as someone can configure a "custom" plan or wants to pay by check, and you're tracking customers and payment terms somewhere else, things quickly go off the rails.
You'll quickly realize you can't just run SQL against your production database to provide support. Building a staff interface will be critical to safely supporting your users.
You generally shouldn't have to build from scratch. Framework-specific libraries (like Avo or
rails_admin for Ruby on Rails) can bootstrap a lot of the heavy lifting and CRUD actions you need.
If you're in a regulatory domain that allows it, it is extremely useful to build a feature that lets you "assume" the identity of one of your users. Days of email back-and-forth can be eliminated by simply seeing the world as if you were logged in as that user. You can easily find and fix bugs this way, and it can have some unexpected benefits occasionally as well (like spotting or dealing with abuse).
You'll need to differentiate between who can and can't access your staff interface, so you'll need to add authorization and access control. If you're running a multi-tenant cloud application, you'll also want to enforce those access rules now. Users and internal support staff will ask for customizable role-based access control; how urgent this is depends on customer size and product domain.
You'll want to audit and prominently display sensitive actions like signups, account closures, etc, and basically any actions taken in your staff interface. This can help you understand and debug accounts, and is required for many compliance scenarios as well.
It is essentially a law of physics that whatever action can be done in your app, eventually someone will desperately want to undo it. You should consider auditing everything, including things that don't seem to be of interest now. Your staff interface will need more and more "undo" controls over time, and the audit log can be a valuable source of information to reconstruct state that was accidentally changed.
Soft deletion is sometimes controversial. Any approach to soft-deletion comes with substantial trade-offs, but one that has the fewest unintended side effects is along the lines of "create a table called `deleted_records` and stick deleted entities in there. That way, you can undo accidental deletions and such without having to constantly deal with omitting soft-deleted records polluting your other tables.
You'll need to send transactional emails for things like password resets, so consider integrating with a service that can act as your SMTP relay and get all your tricky deliverability issues on autopilot. The gold standard is probably a paid service like Postmark, since they have a product that only delivers transactional mail. Otherwise you can try your luck with more budget providers like Amazon SES, Sendgrid, Mailgun, or Sparkpost.
For rich client apps, integration with OneSignal or Pusher can help you manage notification messages; otherwise Twilio is the go-to for voice and SMS.
Create a system to run things on a regular schedule, as you'll need to do this periodically (rotating out old data, sending reports, rolling up statistics, etc).
Consider setting up a system to alert you when these fail, as they can otherwise fail silently for long periods until someone notices. Dead Man's Snitch is an example service that can integrate with your monitoring setup.
At a certain point you'll need to keep track of your major dependencies and vendors. Early on, a spreadsheet with some key data is fine: name of vendor, purpose, cost, who has access.
As you start to get users, customers, and the people to support them, you need to build features and systems to deal with increased scale.
Dealing with multi-factor authentication, password resets, and "I-didn't-get-the-email" problems are a distraction from real issues to solve. Adding domain-specific single sign on is usually a no-brainer and can help cut down on those types of support headaches.
If you're building & selling to enterprise, SAML SSO and such becomes a necessary checkbox very quickly. There are some services that try to handle this for you, because its very deceptively complicated, and every implementation has unique quirks.
In many domains, your power users and best customers will want to manage multiple accounts from one login. Note that "manage" means different things to different people - the high order bits might be about sharing resources or user permissions between accounts, or it might be about billing. You may need to do substantial refactoring of your system to support multi account management, but this can have a substantial payoff if your power users are your best customers.
In a very strict multi-tenant setup, you might be enforcing multi-tenancy via some form of "every customer gets their own schema," "every customer gets their own partition key," or something to that effect. This is often the foundation for a scale-out strategy as well - many use cases lend themselves well to sharding by customer key. Multi account management throws a wrench in this because it implies the need for a global schema somewhere. Avoid partitioning or sharding your users and permissions tables until you have a solid understanding of your multi-account requirements.
Initially, every instance of abuse will be new and novel. In most domains, its OK to plug them when a bad actor abuses something.
After you achieve some scale, you'll need to be more proactive.
If you are building an app or service with user-generated content that's displayed to other people, you'll need to work with leadership to figure out policy enforcement around spam, botting, doxxing, pornography, terrorism, malware distribution, sanctions evasion, and so on.
Deploy recaptcha or hcaptcha on any actions that can be botted. This includes sign up, sign in, password changes/resets, email forms, etc. Correctly implemented, these will also act as a sort of natural rate limit. You'll need to enforce rate limits in other parts of your code, such as when interacting with APIs or API clients.
Make use of quarantining / shadowban mechanics whenever possible. While frustrating for real users, you need to withhold as much information about how your anti-abuse mechanisms work to foil real adversaries.
Ideally, your business intelligence tool can plug into the data exhaust of your operational monitoring tools. Most
though, this will separately require a lot of conscious effort. The gold standard seems to be to get everything into
Snowflake (or Redshift, if you like to trade pain for money). But if you are clever, you can create structured logs,
send everything to (for instance) StatsD for operational monitoring, and then instrument your code for business
as well (e.g., fire events like
This does not solve the problem of complex analytics queries against your production database. You don't want to run complex analytics queries against your production database. There isn't a single correct solution here because its domain-specific, but most answers collapse to one of:
Much ink has been spilled about the Right Way to do change data capture. The important thing to keep in mind is that you need to treat your production system as a single producer (out of many) of data and that many downstream systems will eventually care about every change that happens in that system.
Depending on the volume and value of your data, you may also want to send everything to a data lake for easy re-processing later.
Your product org is always going to want as much information about what users are doing as possible. Vendors like Amplitude will probably be your gold standard here. Heap Analytics is also plausible. At really low volumes, screen recording software like Hotjar, FullStory, or Mouseflow are viable.
You will need both one-time and ongoing investment with these products (don't believe the sales pitches). In fact, as your organization grows in sophistication, you'll need to introduce governance so that everyone is operating off the same definitions and is looking at the same types of reports. It will save tremendous headache in the future to plan out your usage patterns and naming conventions.
Remember that thing about building a robust data pipeline because everything is architected to be stream-oriented? If you did that, you can plug in Amplitude/ integrations to it here. If you didn't, then you need to directly integrate with them from your application.
Sales and marketing leaders (etc) will eventually request changes or data. Decide how you'll want to handle these, keeping in mind: you probably have better things to do than updating promotion text on the login or pricing page.
Google Tag Manager and other toolkits like it can be your friend here.
Remember that thing about building a robust data pipeline because everything is architected to be stream-oriented? If you did that, you can plug in Hubspot and Salesforce integrations to it here. If you didn't, then you need to directly integrate with them from your application.