Technical Stack Selection
Position in workflow: v0.5 Risk Discovery Interview → v0.5 Technical Stack Selection → v0.6 Architecture Design
Technical stack selection is about making build/buy/integrate/research decisions for every technical capability your product needs.
Decision Categories
| Category |
Definition |
When to Choose |
| Build |
Create custom solution |
Core differentiator, no good alternatives, full control needed |
| Buy |
Use paid service/tool |
Commodity capability, proven solutions exist, not a differentiator |
| Integrate |
Connect to existing platform |
Ecosystem play, user expects it, data lives elsewhere |
| Research |
Need POC before deciding |
High uncertainty, multiple viable options, significant commitment |
Rule: Default to Buy for everything that isn't a core differentiator. Build only when you must.
Technology Layers to Address
For each layer, decide Build/Buy/Integrate/Research:
| Layer |
Questions to Answer |
Common Options |
| Frontend |
Framework? Hosting? Mobile/Web? |
React, Vue, Next.js, Vercel |
| Backend |
Language? Framework? Serverless? |
Node, Python, Go, AWS Lambda |
| Database |
SQL/NoSQL? Managed? |
PostgreSQL, MongoDB, Supabase |
| Auth |
Build or buy? SSO? |
Auth0, Clerk, Firebase Auth |
| Payments |
If monetized, processor? |
Stripe, Paddle, LemonSqueezy |
| Infrastructure |
Cloud? Edge? CDN? |
AWS, GCP, Vercel, Cloudflare |
| Integrations |
External services? APIs? |
Depends on product |
| AI/ML |
Models? Services? |
OpenAI, Anthropic, local models |
| Analytics |
Product analytics? Error tracking? |
Mixpanel, PostHog, Sentry |
| DevOps |
CI/CD? Monitoring? |
GitHub Actions, Datadog |
Decision Process
Inventory needs from FEA- (features) and SCR- (screens)
- What technical capabilities are required?
Check RISK- constraints
- Do any risks constrain technology choices?
- Performance? Security? Compliance?
Categorize each need: Build | Buy | Integrate | Research
- Use decision framework below
Research specific options for Buy/Integrate
- Evaluate against criteria
Define research scope for Research items
- What must be learned? By when?
Create TECH- entries with full rationale
Build vs. Buy Decision Framework
| Factor |
Favors Build |
Favors Buy |
| Differentiation |
Core to your value prop |
Commodity capability |
| Control |
Must customize extensively |
Standard behavior acceptable |
| Expertise |
Team has deep knowledge |
Team would need to learn |
| Timeline |
Can invest time now |
Need it working immediately |
| Cost |
Long-term cost lower |
Reasonable SaaS pricing |
| Maintenance |
Willing to own forever |
Want vendor to maintain |
Strong Build signals:
- "This is why users choose us over competitors"
- "No existing solution fits our specific need"
- "We need to change this weekly based on learning"
Strong Buy signals:
- "Every SaaS product needs this"
- "Multiple proven solutions exist"
- "We'd just be recreating what vendors already built"
TECH- Output Template
TECH-XXX: [Technology/Capability Name]
Category: [Build | Buy | Integrate | Research]
Layer: [Frontend | Backend | Database | Auth | Payments | Infrastructure | Integrations | AI/ML | Analytics | DevOps]
Purpose: [What problem this solves]
Features Served: [FEA-XXX, FEA-YYY]
Screens Affected: [SCR-XXX, SCR-YYY]
Risk Constraints: [RISK-XXX that influenced this]
Decision: [Specific choice made]
Rationale: [Why this choice over alternatives]
Alternatives Considered:
- [Option A]: [Why rejected]
- [Option B]: [Why rejected]
Trade-offs:
- Pro: [Advantage]
- Con: [Disadvantage]
Cost: [Pricing model, estimated monthly cost]
Integration Complexity: [Low | Medium | High]
Lock-in Risk: [Low | Medium | High]
Research Needed: [If Category = Research]
Evaluation Criteria: [How to decide]
Decision Deadline: [When we must decide]
Example TECH- entry (Buy):
TECH-001: Authentication Service
Category: Buy
Layer: Auth
Purpose: User authentication, session management, social login
Features Served: FEA-010 (login), FEA-011 (signup), FEA-012 (social auth)
Screens Affected: SCR-000 (login), SCR-001 (signup), SCR-010 (settings)
Risk Constraints: RISK-008 (security compliance requirement)
Decision: Clerk
Rationale: Best DX for Next.js, includes social login, compliant
Alternatives Considered:
- Auth0: Higher price at scale, more complex setup
- Firebase Auth: Google ecosystem lock-in, less polished
- Build custom: Would take 2+ weeks, security risk
Trade-offs:
- Pro: <1 day integration, battle-tested security
- Con: Vendor dependency, per-MAU pricing at scale
Cost: Free tier sufficient for MVP, ~$25/mo at 1K MAU
Integration Complexity: Low
Lock-in Risk: Medium (user data exportable, but migration work)
Example TECH- entry (Research):
TECH-005: Vector Database for Semantic Search
Category: Research
Layer: Database
Purpose: Store and query embeddings for AI-powered search
Features Served: FEA-025 (semantic search)
Screens Affected: SCR-008 (search results)
Risk Constraints: RISK-012 (query latency <200ms requirement)
Decision: TBD after POC
Rationale: Multiple viable options with different trade-offs
Alternatives to Evaluate:
- Pinecone: Managed, easy setup, higher cost
- Weaviate: Self-hosted option, more control
- pgvector: Uses existing Postgres, simpler stack
Research Needed:
- Latency benchmark with 1M vectors
- Cost projection at 10M vectors
- Query accuracy comparison
Evaluation Criteria:
- P99 latency < 200ms
- Cost < $500/mo at scale
- Supports metadata filtering
Decision Deadline: End of EPIC-02
Evaluation Criteria for Buy/Integrate
| Criterion |
Questions to Ask |
| Fit |
Does it solve our specific need? Any feature gaps? |
| Cost |
What's the pricing model? Cost at 10x scale? |
| Complexity |
How hard to integrate? Ongoing maintenance? |
| Lock-in |
How hard to switch later? Data export? |
| Maturity |
Production-ready? Good documentation? Active development? |
| Support |
What help is available? Response time? |
Anti-Patterns to Avoid
| Anti-Pattern |
Signal |
Fix |
| Resume-driven development |
"Let's use [hot new tech]" |
Choose boring technology for non-differentiators |
| Build everything |
No Buy/Integrate decisions |
Challenge: is this really a differentiator? |
| Buy everything |
No Build decisions |
Some things must be custom for your moat |
| Analysis paralysis |
Research everything |
Time-box research; decide with 70% confidence |
| Ignoring constraints |
Tech choice conflicts with RISK- |
Review RISK- before finalizing |
| Cost blindness |
No cost estimates |
Every TECH- needs cost projection |
| Premature optimization |
"We need Kubernetes for scale" |
Design for 10x current needs, not 1000x |
Quality Gates
Before proceeding to Architecture Design:
Downstream Connections
TECH- entries feed into:
| Consumer |
What It Uses |
Example |
| v0.6 Architecture Design |
TECH- selections define the system |
TECH-001 (Next.js) → frontend architecture |
| v0.6 Technical Specification |
TECH- informs API design |
TECH-003 (Supabase) → data model constraints |
| v0.7 Build Execution |
TECH- Research items become spikes |
TECH-005 (Research) → EPIC-02 spike task |
| Hiring/Resourcing |
TECH- Build items define skills |
TECH-010 (custom ML) → need ML engineer |
Detailed References
- Tech stack examples by product type: See
references/examples.md
- TECH- entry template: See
assets/tech.md
- Evaluation scorecard: See
assets/evaluation-scorecard.md
1---2name: prd-v05-technical-stack-selection3description: Determine technologies needed to build the product, making build/buy/integrate decisions during PRD v0.5 Red Team Review. Triggers on requests to select tech stack, evaluate technologies, make build vs. buy decisions, or when user asks "what technologies?", "select tech stack", "build or buy?", "technical decisions", "what tools do we need?", "evaluate solutions". Consumes FEA- (features), SCR- (screens), RISK- (constraints). Outputs TECH- entries with decisions, rationale, and trade-offs. Feeds v0.6 Architecture Design.4---5
6# Technical Stack Selection
7
8Position in workflow: v0.5 Risk Discovery Interview → **v0.5 Technical Stack Selection** → v0.6 Architecture Design
9
10Technical stack selection is about making **build/buy/integrate/research** decisions for every technical capability your product needs.
11
12## Decision Categories
13
14| Category | Definition | When to Choose |
15|----------|------------|----------------|
16| **Build** | Create custom solution | Core differentiator, no good alternatives, full control needed |
17| **Buy** | Use paid service/tool | Commodity capability, proven solutions exist, not a differentiator |
18| **Integrate** | Connect to existing platform | Ecosystem play, user expects it, data lives elsewhere |
19| **Research** | Need POC before deciding | High uncertainty, multiple viable options, significant commitment |
20
21**Rule**: Default to Buy for everything that isn't a core differentiator. Build only when you must.
22
23## Technology Layers to Address
24
25For each layer, decide Build/Buy/Integrate/Research:
26
27| Layer | Questions to Answer | Common Options |
28|-------|---------------------|----------------|
29| **Frontend** | Framework? Hosting? Mobile/Web? | React, Vue, Next.js, Vercel |
30| **Backend** | Language? Framework? Serverless? | Node, Python, Go, AWS Lambda |
31| **Database** | SQL/NoSQL? Managed? | PostgreSQL, MongoDB, Supabase |
32| **Auth** | Build or buy? SSO? | Auth0, Clerk, Firebase Auth |
33| **Payments** | If monetized, processor? | Stripe, Paddle, LemonSqueezy |
34| **Infrastructure** | Cloud? Edge? CDN? | AWS, GCP, Vercel, Cloudflare |
35| **Integrations** | External services? APIs? | Depends on product |
36| **AI/ML** | Models? Services? | OpenAI, Anthropic, local models |
37| **Analytics** | Product analytics? Error tracking? | Mixpanel, PostHog, Sentry |
38| **DevOps** | CI/CD? Monitoring? | GitHub Actions, Datadog |
39
40## Decision Process
41
421. **Inventory needs** from FEA- (features) and SCR- (screens)
43 - What technical capabilities are required?
44
452. **Check RISK- constraints**
46 - Do any risks constrain technology choices?
47 - Performance? Security? Compliance?
48
493. **Categorize each need**: Build | Buy | Integrate | Research
50 - Use decision framework below
51
524. **Research specific options** for Buy/Integrate
53 - Evaluate against criteria
54
555. **Define research scope** for Research items
56 - What must be learned? By when?
57
586. **Create TECH- entries** with full rationale
59
60## Build vs. Buy Decision Framework
61
62| Factor | Favors Build | Favors Buy |
63|--------|--------------|------------|
64| **Differentiation** | Core to your value prop | Commodity capability |
65| **Control** | Must customize extensively | Standard behavior acceptable |
66| **Expertise** | Team has deep knowledge | Team would need to learn |
67| **Timeline** | Can invest time now | Need it working immediately |
68| **Cost** | Long-term cost lower | Reasonable SaaS pricing |
69| **Maintenance** | Willing to own forever | Want vendor to maintain |
70
71**Strong Build signals:**
72- "This is why users choose us over competitors"
73- "No existing solution fits our specific need"
74- "We need to change this weekly based on learning"
75
76**Strong Buy signals:**
77- "Every SaaS product needs this"
78- "Multiple proven solutions exist"
79- "We'd just be recreating what vendors already built"
80
81## TECH- Output Template
82
83```
84TECH-XXX: [Technology/Capability Name]
85Category: [Build | Buy | Integrate | Research]
86Layer: [Frontend | Backend | Database | Auth | Payments | Infrastructure | Integrations | AI/ML | Analytics | DevOps]
87Purpose: [What problem this solves]
88
89Features Served: [FEA-XXX, FEA-YYY]
90Screens Affected: [SCR-XXX, SCR-YYY]
91Risk Constraints: [RISK-XXX that influenced this]
92
93Decision: [Specific choice made]
94Rationale: [Why this choice over alternatives]
95Alternatives Considered:
96 - [Option A]: [Why rejected]
97 - [Option B]: [Why rejected]
98
99Trade-offs:
100 - Pro: [Advantage]
101 - Con: [Disadvantage]
102
103Cost: [Pricing model, estimated monthly cost]
104Integration Complexity: [Low | Medium | High]
105Lock-in Risk: [Low | Medium | High]
106
107Research Needed: [If Category = Research]
108Evaluation Criteria: [How to decide]
109Decision Deadline: [When we must decide]
110```
111
112**Example TECH- entry (Buy):**
113```
114TECH-001: Authentication Service
115Category: Buy
116Layer: Auth
117Purpose: User authentication, session management, social login
118
119Features Served: FEA-010 (login), FEA-011 (signup), FEA-012 (social auth)
120Screens Affected: SCR-000 (login), SCR-001 (signup), SCR-010 (settings)
121Risk Constraints: RISK-008 (security compliance requirement)
122
123Decision: Clerk
124Rationale: Best DX for Next.js, includes social login, compliant
125Alternatives Considered:
126 - Auth0: Higher price at scale, more complex setup
127 - Firebase Auth: Google ecosystem lock-in, less polished
128 - Build custom: Would take 2+ weeks, security risk
129
130Trade-offs:
131 - Pro: <1 day integration, battle-tested security
132 - Con: Vendor dependency, per-MAU pricing at scale
133
134Cost: Free tier sufficient for MVP, ~$25/mo at 1K MAU
135Integration Complexity: Low
136Lock-in Risk: Medium (user data exportable, but migration work)
137```
138
139**Example TECH- entry (Research):**
140```
141TECH-005: Vector Database for Semantic Search
142Category: Research
143Layer: Database
144Purpose: Store and query embeddings for AI-powered search
145
146Features Served: FEA-025 (semantic search)
147Screens Affected: SCR-008 (search results)
148Risk Constraints: RISK-012 (query latency <200ms requirement)
149
150Decision: TBD after POC
151Rationale: Multiple viable options with different trade-offs
152Alternatives to Evaluate:
153 - Pinecone: Managed, easy setup, higher cost
154 - Weaviate: Self-hosted option, more control
155 - pgvector: Uses existing Postgres, simpler stack
156
157Research Needed:
158 - Latency benchmark with 1M vectors
159 - Cost projection at 10M vectors
160 - Query accuracy comparison
161
162Evaluation Criteria:
163 - P99 latency < 200ms
164 - Cost < $500/mo at scale
165 - Supports metadata filtering
166
167Decision Deadline: End of EPIC-02
168```
169
170## Evaluation Criteria for Buy/Integrate
171
172| Criterion | Questions to Ask |
173|-----------|------------------|
174| **Fit** | Does it solve our specific need? Any feature gaps? |
175| **Cost** | What's the pricing model? Cost at 10x scale? |
176| **Complexity** | How hard to integrate? Ongoing maintenance? |
177| **Lock-in** | How hard to switch later? Data export? |
178| **Maturity** | Production-ready? Good documentation? Active development? |
179| **Support** | What help is available? Response time? |
180
181## Anti-Patterns to Avoid
182
183| Anti-Pattern | Signal | Fix |
184|--------------|--------|-----|
185| **Resume-driven development** | "Let's use [hot new tech]" | Choose boring technology for non-differentiators |
186| **Build everything** | No Buy/Integrate decisions | Challenge: is this really a differentiator? |
187| **Buy everything** | No Build decisions | Some things must be custom for your moat |
188| **Analysis paralysis** | Research everything | Time-box research; decide with 70% confidence |
189| **Ignoring constraints** | Tech choice conflicts with RISK- | Review RISK- before finalizing |
190| **Cost blindness** | No cost estimates | Every TECH- needs cost projection |
191| **Premature optimization** | "We need Kubernetes for scale" | Design for 10x current needs, not 1000x |
192
193## Quality Gates
194
195Before proceeding to Architecture Design:
196
197- [ ] All technology layers addressed
198- [ ] Build decisions justified as differentiators
199- [ ] Buy decisions have cost estimates
200- [ ] Research items have clear criteria and deadlines
201- [ ] RISK- constraints reflected in choices
202- [ ] No obvious vendor lock-in without acknowledgment
203
204## Downstream Connections
205
206TECH- entries feed into:
207
208| Consumer | What It Uses | Example |
209|----------|--------------|---------|
210| **v0.6 Architecture Design** | TECH- selections define the system | TECH-001 (Next.js) → frontend architecture |
211| **v0.6 Technical Specification** | TECH- informs API design | TECH-003 (Supabase) → data model constraints |
212| **v0.7 Build Execution** | TECH- Research items become spikes | TECH-005 (Research) → EPIC-02 spike task |
213| **Hiring/Resourcing** | TECH- Build items define skills | TECH-010 (custom ML) → need ML engineer |
214
215## Detailed References
216
217- **Tech stack examples by product type**: See `references/examples.md`
218- **TECH- entry template**: See `assets/tech.md`
219- **Evaluation scorecard**: See `assets/evaluation-scorecard.md`