The Complete Technology Stack Decision Guide
A knowledge base for choosing frontend, backend, hosting, database, and mobile stacks from requirements, cost, risk, and product stage.
Table of contents
A technology stack is the complete set of technologies used to build, run, store data for, secure, and operate an application. A good choice is not the stack with the most logos. It is the simplest combination that satisfies every mandatory requirement and can still be maintained by the team.
Core principle: choose from product requirements, not trends or vendors. If the project comes from AI Blueprint, treat the Technical Foundation, Database Schema, and UI/UX Design as the primary decision sources.
1. The Outcome You Should Produce
After using this guide, you should be able to explain:
- what is being built and who will use it;
- which platforms must be supported: web, mobile, desktop, or a combination;
- the frontend and rendering strategy;
- where business logic will run;
- the primary database and any genuinely necessary specialist services;
- the hosting model that matches the runtime;
- the security, backup, monitoring, and deployment baseline;
- why the stack was chosen, the second-best alternative, its risks, and review triggers.
The final stack is not merely a list of products. It is a testable architecture decision.
2. Map the Technology Stack Layers
| Layer | Responsibility | Examples |
|---|---|---|
| Frontend | Interface, interactions, accessibility, responsive states | HTML, CSS, React, Vue |
| Rendering | When and where HTML is produced | CSR, SSG, SSR, hybrid |
| Backend | Business rules, APIs, permissions, integrations | Next.js server, NestJS, FastAPI |
| Runtime | Executes source code | Node.js, Bun, Python, JVM |
| Database | Stores and queries primary data | PostgreSQL, MySQL, MongoDB |
| Specialist data | Cache, search, queue, vector, analytics | Redis, OpenSearch, pgvector, ClickHouse |
| Storage | Stores images, video, and files | S3-compatible object storage |
| Identity | Sign-in, sessions, MFA, and account lifecycle | Auth.js, Supabase Auth, managed identity |
| Hosting | Runs static assets, functions, or containers | CDN, serverless, PaaS, VPS |
| Operations | Build, test, deploy, log, alert, and recover | CI/CD, Sentry, uptime monitoring, backups |
One framework may cover several layers. Next.js, for example, can handle both UI and server code, but the browser and server remain separate security boundaries. A secret must never reach the frontend simply because the code lives in one repository.
Engines, providers, and frameworks are different
- PostgreSQL is a database engine; Supabase, Neon, RDS, Cloud SQL, and self-hosted PostgreSQL are ways to provide it.
- React is a UI library; Next.js is a framework with routing and server capabilities.
- Docker is a container platform, not a language, database, or hosting provider.
- Node.js is a runtime; npm, pnpm, and Yarn are package managers.
Using the correct terms makes diagnosis and migration much easier.
3. Start with a Decision Brief
Do not select a provider until the following questions have answers.
Product and team
| Question | Useful example answers |
|---|---|
| Product type | Landing page, SaaS, marketplace, internal tool, game, AI app |
| Stage | Prototype, MVP, early production, growth, enterprise |
| Target platforms | Responsive web, PWA, Android/iOS, native |
| Team | Solo, small team, platform team; beginner or advanced |
| Time to release | Days, weeks, or quarters |
| Budget | Very low, low, medium, high |
Traffic and user experience
- How important are SEO and first-page speed?
- Are most pages public or behind authentication?
- Is the experience application-like, real-time, offline, or media-heavy?
- From which regions will users access it?
- Is traffic steady, seasonal, viral, or still unknown?
Data and operations
- Does the data have complex relationships or cross-table transactions?
- Does the product need payments, audit logs, uploads, search, or geospatial queries?
- Is strong consistency mandatory, or is eventual consistency acceptable?
- What are the maximum acceptable data loss (RPO) and recovery time (RTO)?
- Are there data residency, compliance, private networking, or encryption requirements?
- Who owns deployment, monitoring, backups, and incident recovery?
If an answer is not yet known, record unknown and prefer a reversible solution. Do not turn uncertainty into unnecessary architecture.
4. Apply Hard Gates before Scoring
Hard gates
Eliminate a candidate that fails a mandatory requirement, even if it is popular or inexpensive. Examples include:
- the required runtime or protocol is unavailable;
- the required region is unavailable;
- mandatory transactions, backups, restore, or WebSockets are unsupported;
- production readiness, licensing, compliance, or data residency is unsuitable;
- minimum cost already exceeds the budget;
- the database would need privileged browser access without a safe authorization model.
Score only candidates that pass
Give each candidate a 0-5 score. Adjust these starting weights as needed:
| Dimension | Starting weight |
|---|---|
| Functional fit | 20% |
| Data and query fit | 15% |
| Runtime compatibility | 12% |
| Performance and scalability | 12% |
| Reliability and recovery | 10% |
| Security and compliance | 8% |
| Developer experience | 8% |
| Operational burden | 6% |
| Cost predictability | 5% |
| Portability and lock-in | 4% |
For a solo founder, increase time-to-market and operational-burden weights. For enterprise systems, increase reliability, security, compliance, and portability. Apply penalties for beta technology, distant database regions, core workarounds, or a mismatch with team skills.
5. Match Complexity to the Product Stage
| Stage | Goal | Reasonable stack shape | Do not rush to add |
|---|---|---|---|
| Validation | Prove the problem and user interest | Static site or mock-data prototype | Database, microservices, Kubernetes |
| MVP | Run the core workflow safely | One full-stack app + managed SQL/BaaS | Multiple databases and an event bus |
| Early production | Become reliable for real users | Auth, backups, monitoring, migrations, staging | Optimisation without evidence |
| Growth | Resolve measured bottlenecks | Workers, queues, cache, object storage, search | Splitting every service |
| Scale | Support reliability, compliance, and organisation | Measured service boundaries, HA, mature observability | Complexity without an owner |
Move up a stage because of evidence: queues are blocking requests, queries are slow, storage is growing, recovery requirements changed, or organisational ownership requires a boundary. Do not move up because a larger architecture looks more professional.
6. Choose the Frontend and Rendering Strategy
Choose rendering first
| Strategy | Choose it when | Main trade-off |
|---|---|---|
| SSG / prerendering | Public content changes infrequently and SEO matters | Very fast; updates need a build or revalidation |
| CSR / SPA | Authenticated dashboards have high interaction and low SEO needs | Straightforward app-like UI; first load depends more on JavaScript |
| SSR | Content must be fresh or personalised per request | Flexible; requires a server runtime and disciplined caching |
| Hybrid | One product contains marketing pages, an app, and dynamic data | Fits many web apps; adds a richer mental model |
| PWA | The web experience needs installability, caching, or limited offline use | Lower cost before native; device capability remains limited |
| Edge rendering | Global low-latency personalisation is required | Verify runtime, package, database, and observability constraints |
Choose a framework from product characteristics
| Choice | Strength | Good fit |
|---|---|---|
| HTML/CSS/JS | Small footprint and little abstraction | Simple microsites and landing pages |
| React + Vite | Flexible SPA with mature tooling | Client-heavy dashboards and prototypes |
| Next.js | Hybrid rendering, routing, and server capabilities | SaaS, ecommerce, content + app |
| Vue + Nuxt | Vue developer experience with complete rendering | Vue teams and hybrid web apps |
| SvelteKit | Concise components and full-stack web | Small teams that know its ecosystem |
| Astro | Content-first with selective JavaScript | Blogs, documentation, marketing sites |
| Angular | Strong structure and conventions | Enterprise teams and large applications |
TypeScript generally improves data contracts and refactoring. Component libraries such as shadcn/ui, Material UI, or an internal library speed up accessibility and consistency, but you still need design tokens, responsive behavior, empty/error/loading states, and visual QA.
Frontend records for the knowledge base
Do not store only a framework name. A minimum record needs:
| Field | Why it matters |
|---|---|
| Runtime and version | Determines compatibility, security support, and build commands |
| Rendering modes | Confirms SSG, CSR, SSR, streaming, or edge support |
| Deployment adapters | Connects the framework to its hosting target |
| Browser baseline | Defines web capabilities, polyfills, and the test matrix |
| UI component strategy | Separates a component library, design system, and custom components |
| Data fetching and cache | Prevents conflicting cache policies |
| Auth boundary | Explains what runs in the browser and on the server |
| Lifecycle | Stable, preview, deprecated, or end-of-life |
| Verification date and source | Makes stale information detectable |
For every major upgrade, run the build, route smoke tests, server/client boundary checks, and screenshot regression on important screens.
7. Choose a Web and Mobile Strategy
| Need | Starting path | Move up when |
|---|---|---|
| Responsive web | Web framework + responsive layout | Stay on web when device features are minimal |
| Installable/light offline | PWA | Store distribution or device APIs become important |
| Wrapped web app | Capacitor | UX and background capabilities become limiting |
| Android + iOS from one codebase | React Native + Expo or Flutter | Native modules or performance require specialisation |
| Android-only | Kotlin + Jetpack Compose | Android or hardware integration is the real target |
| iOS-only | Swift + SwiftUI | Apple ecosystem integration differentiates the product |
React Native + Expo is a strong fit for teams experienced with TypeScript and React. Flutter provides cross-platform UI control with Dart. Native development offers the deepest device access and performance, but requires more skills, testing, and release work across two platforms.
Real-time games, graphics-heavy experiences, AR/VR, intensive audio, and physics simulation need a specialised path such as Unity, Unreal, Godot, or a native graphics stack. Do not force a business web framework to behave like a game engine.
8. Select the Backend and Hosting Model Together
Backend shapes
| Shape | Good fit | Watch for |
|---|---|---|
| No backend | Marketing site or local-only prototype | Never store sensitive data in the browser |
| BaaS | MVP with auth, database, storage, and real-time features | Understand RLS, limits, and the exit plan |
| Full-stack framework | Small-to-medium product owned by one team | Preserve module and server/client boundaries |
| Separate API service | Multiple clients or complex domain logic | Adds deployment, contracts, and observability |
| Worker/background jobs | Email, import/export, media, AI, reports | Needs queues, retries, idempotency, and dead-letter handling |
Hosting models
| Hosting | Good fit | Constraints to verify |
|---|---|---|
| Static hosting + CDN | SSG, SPA, public assets | No persistent server process |
| Serverless functions | Short APIs and uneven traffic | Timeout, cold start, connection pooling |
| Edge functions/workers | Lightweight requests close to users | Runtime APIs, CPU, packages, database connections |
| Container PaaS | Full-stack servers, workers, WebSockets | Resources, health checks, scaling, persistent volumes |
| VPS + Docker | Control and predictable base cost | You own patching, firewall, backup, deployment, monitoring |
| Managed Kubernetes | Many services and a mature platform team | High operational burden; not an MVP default |
The framework and hosting model must be compatible. A static export cannot run server actions. Edge workers are not compatible with every Node.js package. Serverless workloads that open many PostgreSQL connections need pooling. A container storing uploads locally needs persistent volumes or object storage.
Hosting provider evaluation matrix
| Dimension | Verification question |
|---|---|
| Runtime | Are Node/Python/JVM, containers, native binaries, and background workers supported? |
| Request model | What are the timeout, concurrency, cold start, memory, CPU, and payload limits? |
| Network | Are WebSockets, private networking, static IP, custom ports, and egress policies available? |
| Storage | Is the filesystem ephemeral, and are persistent volumes, object storage, and backups available? |
| Region | Can the app and database stay close to users and meet residency requirements? |
| Deployment | Are preview, health checks, zero-downtime rollout, migration hooks, and rollback supported? |
| Observability | Are logs, metrics, traces, alerts, and retention sufficient for incident response? |
| Security | How are secrets, TLS, WAF, DDoS, access control, and audits handled? |
| Cost | Which compute, bandwidth, build, log, volume, IPv4, and support units are billed? |
| Exit path | Can images, data, DNS, and secrets move without severe downtime? |
With Coolify or a VPS, the team owns OS patches, disk capacity, backups, firewalls, certificates, log rotation, monitoring, and recovery. A convenient deployment UI does not remove server responsibilities.
9. Choose a Database from the Data Shape
Primary database categories
| Type | Choose it when | Examples |
|---|---|---|
| Relational SQL | Relationships, transactions, reporting, and integrity matter | PostgreSQL, MySQL |
| Document | Document shapes vary and aggregates are read as a unit | MongoDB |
| Key-value / in-memory | Cache, rate limiting, sessions, queues | Redis |
| Graph | Relationship traversal is the core query | Neo4j |
| Time-series | Time-based events and specialised retention dominate | Timescale, InfluxDB |
| Columnar analytics | Large aggregations, not application transactions | ClickHouse, warehouses |
| Search engine | Complex full-text ranking and typo tolerance | OpenSearch, Meilisearch, Typesense |
| Vector | Semantic search or AI retrieval | pgvector, Qdrant |
PostgreSQL is a strong default for many business applications because it supports transactions, relationships, constraints, queries, JSON, full-text search, and extensions. A default is still not a universal answer.
Add specialist databases only for specialist jobs
A healthy architecture may use:
- PostgreSQL as the transactional source of truth;
- Redis for cache, rate limits, sessions, or queues;
- object storage for large files;
- a search engine for complex search;
- pgvector or a vector database for semantic retrieval;
- a warehouse or columnar database for heavy analytics.
Do not use a cache as the source of truth or an analytics database as the primary OLTP store. Define ownership, synchronisation, retries, and recovery for every copy of data.
Managed or self-hosted
Compare backups, point-in-time recovery, pooling, branching, replicas, regions, encryption, observability, support, and data-egress costs. Managed services reduce operational work; self-hosting gives control while moving patching and recovery responsibility to your team.
Database provider evaluation matrix
| Dimension | Data to record |
|---|---|
| Engine/version | Engine, extensions, collation, timezone, and upgrade schedule |
| Connection | Direct, pooler, private link, TLS, connection limit, and driver |
| Durability | Backup frequency, retention, PITR, replicas, RPO, and RTO |
| Scale | Vertical limits, read replicas, sharding path, storage growth, and resize downtime |
| Security | Encryption, network controls, roles, audit, secret rotation, and compliance |
| Operations | Metrics, slow queries, maintenance windows, support, and incident status |
| Portability | Standard dump/restore, extension dependency, egress, and lock-in |
| Cost | Compute, storage, IOPS, backup, replicas, transfer, and minimum monthly charge |
Before production, prove connectivity from the target runtime, run migrations in staging, restore into a separate instance, and measure critical queries with realistic data volume.
Knowledge-base record schema
technology_id: postgresql-managed-example
category: primary_database
lifecycle: active
capabilities:
transactions: true
point_in_time_recovery: true
connection_pooling: verify_plan
constraints:
- region availability depends on provider
- extensions depend on plan and engine version
cost_model:
units: [compute, storage, backup, transfer]
verified_at: 2026-09-07
official_sources:
- provider documentation URL
review_triggers:
- engine major version changes
- pricing or plan limits change
- RPO or data residency requirement changesThe JSON snapshot shown after this article is an educational catalog. The Blueprint catalog under config/knowledge/technology remains the generation authority because it carries versions, hashes, approved/proposed status, and compatibility rules.
10. Stack Patterns by Use Case
| Use case | Reasonable baseline | Add only when evidence requires it |
|---|---|---|
| Landing/blog/docs | Astro or Next.js SSG + CDN | CMS, search, form service |
| Browser utility | Vite/React or a light framework; local processing | Worker/API only for operations unsafe in the browser |
| SaaS MVP | Next.js + TypeScript + managed PostgreSQL/Auth/Storage | Worker, Redis, search, billing service |
| Marketplace/ecommerce | Hybrid web + PostgreSQL + payment webhooks + object storage | Queue, fraud review, search, ledger, reconciliation |
| Social/community | Web/mobile client + API/BaaS + PostgreSQL | Real-time, moderation, feed worker, media pipeline |
| Internal app | SPA/full-stack + SSO + relational database | Audit log, approvals, reporting, private network |
| AI/RAG app | Full-stack/API + PostgreSQL + object storage | Queue, pgvector/vector DB, tracing, model fallback |
| Analytics dashboard | Web app + transactional source | ETL and a warehouse when analytics harms OLTP |
| Mobile-first | Expo/React Native or Flutter + managed backend | Offline sync, push notifications, native modules |
| Game | Game engine + game backend matched to the session model | Matchmaking, authoritative server, telemetry, anti-cheat |
A baseline is a starting point, not a template to copy without analysis. Financial payments, healthcare, government systems, and children's data require specialist security and compliance review.
11. Calculate Total Cost of Ownership
Do not compare only the entry plan price. Include:
- compute and function invocations;
- database compute, storage, backups, replicas, and connection pooling;
- object storage and bandwidth/egress;
- logs, tracing, error monitoring, and retention;
- email, SMS, payment fees, search, AI tokens, and third-party APIs;
- engineering time for patching, deployment, incidents, and recovery;
- migration cost and vendor lock-in.
Provider prices change. Store the billing model, units, cost band (very_low through enterprise), spike risk, verification date, and official pricing URL. Do not hardcode rapidly expiring prices into architecture decisions.
12. Security and Reliability Minimums
Security
- Keep secrets only in server-side environments or a secret manager.
- Check authorization on the server for every resource; hiding a button is not security.
- Apply least privilege, admin MFA, rate limits, input validation, and audit logs for sensitive actions.
- Enable HTTPS, security headers, dependency scanning, and upload validation.
- If a client uses a managed data API, enable and test row-level access policies.
Reliability
- Pair backups with restore drills; an untested backup is not proven.
- Version and review migrations, with a forward-fix or rollback plan.
- Use health checks, structured logs, error monitoring, uptime alerts, and correlation IDs.
- Make jobs idempotent, limit retries, and prevent duplicate charges or messages.
- Separate local, preview, staging, and production databases and secrets.
13. A Practical Decision Tree
Start
├─ Only public content and a simple form?
│ └─ Yes → static/SSG + CDN; a database may not be needed
├─ Web app with authentication and business transactions?
│ └─ Yes → full-stack app + relational database + server-side authorization
├─ Is mobile the primary experience?
│ ├─ Need speed, one JS/TS team → React Native + Expo
│ ├─ Highly custom cross-platform UI → evaluate Flutter
│ └─ Extreme device integration/performance → native
├─ Is a process long-running or retryable?
│ └─ Yes → queue + worker + idempotency
├─ Has search/analytics/vector become a specialist workload?
│ └─ Yes → add a specialist store; preserve the source of truth
└─ Are there many services and a platform team?
└─ Only then evaluate more complex orchestration14. Record the Decision as a Contract
Use this format for every project:
product_stage: mvp
target_platforms: [responsive_web]
recommended_stack:
frontend: Next.js + TypeScript
rendering: hybrid
backend: Next.js server modules
primary_database: PostgreSQL
hosting_runtime: container_paas
rationale:
- supports public pages and an authenticated area
- one codebase matches a small team's capacity
- transactions and relationships require SQL
hard_gates_passed:
- target region is available
- backup and restore satisfy requirements
- runtime supports a background worker
alternatives:
- option: Nuxt + PostgreSQL
trade_off: strong for a Vue team, but current team skills do not match
risks:
- database connections require pooling
- email and AI processing need queues before traffic grows
review_triggers:
- p95 latency exceeds the target for 14 days
- background jobs begin blocking web requests
- data-residency requirements changeThis contract helps a coding agent understand reasons and constraints instead of simply copying technology names.
15. Anti-patterns to Avoid
- Choosing a stack because it is viral or familiar to the coding agent.
- Adding microservices, Kubernetes, Redis, or a vector database on day one without a requirement.
- Using production data in local or preview environments.
- Creating a second lockfile or changing the package manager without an explicit decision.
- Accessing the database from the browser with privileged credentials.
- Storing user uploads on an ephemeral container filesystem.
- Running long work synchronously without timeout and retry design.
- Treating a free tier as guaranteed production capacity.
- Choosing a provider without region, backup, exit plan, and TCO analysis.
- Replacing Blueprint foundations without updating requirements, schema, and acceptance criteria.
16. Approval Checklist
- Product type, stage, platforms, users, and core workflow are documented.
- Mandatory requirements are separated from preferences.
- Every candidate passes runtime, region, security, and budget hard gates.
- Rendering is chosen from SEO, freshness, and personalisation needs.
- The database engine is selected before the database provider.
- Hosting matches runtime, connection model, workers, and storage.
- Auth, authorization, audit, secrets, backups, and restore are designed.
- Cost estimates include egress, observability, backups, and team operations.
- The second-best option, risks, exit plan, and review triggers are documented.
- The team can run, test, deploy, and recover the stack.
- AI Blueprint Technical Foundation and Database Schema remain consistent.
Technology stack reference database
Educational snapshot verified Sep 7, 2026. The approved Technical Foundation remains the project decision source.
Frontend5
- Next.jsfull-stack web framework
- React with Viteclient application stack
- NuxtVue full-stack web framework
- SvelteKitfull-stack web framework
- Astrocontent-first web framework
Hosting models5
- Static hosting with CDNstatic generation / SPA assets
- Serverless functionsshort request-driven APIs / uneven traffic
- Container PaaSfull-stack server / worker
- VPS with Dockerpredictable base cost / custom networking
- Managed Kubernetesmany services / mature platform team
Database5
- PostgreSQLrelational SQL
- MySQLrelational SQL
- MongoDBdocument database
- Redisin-memory key-value data store
- Specialist data storessearch, vector, graph, time-series, or columnar
Official sources and references
Use these sources to confirm current commands, capabilities, prices, and limits.
Was this guide helpful?
Tell us whether the steps worked or if something needs an update.