Project Types Reference
Quick lookup for type-specific questions, patterns, and recommended stacks.
Type Index
| Type |
Complexity |
Default PRD |
Recommended Stack |
| CLI Tool |
Low |
Minimal |
Rust (clap) |
| REST API |
Low-Medium |
Minimal/Standard |
Rust (axum) |
| Web App |
Medium |
Standard |
Rust + HTMX |
| Telegram Bot |
Medium |
Standard |
Rust (teloxide) |
| Discord Bot |
Medium |
Standard |
Rust (serenity) |
| GraphQL API |
Medium |
Standard |
Rust (async-graphql) |
| Mobile App |
High |
Full |
Flutter/React Native |
| Data Pipeline |
High |
Full |
Python/Rust |
| Browser Extension |
Medium |
Standard |
TypeScript |
CLI Tool
Discovery Questions
- Execution model: One-shot or interactive?
- Arguments: Positional args, flags, or subcommands?
- Output: Text, JSON, or files?
- Config: Config file needed?
Patterns
- Use
clap for argument parsing
- Support
--json for machine output
- Use
anyhow for error handling
- Exit codes: 0 success, 1 error
Stack
[dependencies]
clap = { version = "4", features = ["derive"] }
anyhow = "1"
serde_json = "1" # if JSON output
Example Structure
src/
main.rs # Entry point, arg parsing
lib.rs # Core logic
commands/ # Subcommand handlers (if needed)
REST API
Discovery Questions
- Audience: Internal, public, or partner?
- Auth: None, API Key, JWT, OAuth2?
- Rate limiting: Needed?
- Versioning: /v1/, header, or none?
Patterns
- OpenAPI spec first (consider)
- JSON responses with consistent error format
- Health endpoint required:
GET /health
- Structured logging (tracing)
Stack
[dependencies]
axum = "0.8"
tokio = { version = "1", features = ["full"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tracing = "0.1"
tracing-subscriber = "0.3"
Example Structure
src/
main.rs # Server setup
lib.rs # Router, handlers
routes/ # Route modules
models/ # Data structures
middleware/ # Auth, logging
Web App (SaaS)
Discovery Questions
- Auth: Email/password, OAuth, magic link, or none?
- Realtime: WebSocket, SSE, or none?
- Multi-tenant: Yes/no?
- Admin panel: Needed?
Patterns
- HTMX for interactivity (minimal JS)
- Server-rendered templates (Askama)
- Progressive enhancement
- CSRF protection on forms
Stack
[dependencies]
axum = "0.8"
tokio = { version = "1", features = ["full"] }
askama = "0.12"
askama_axum = "0.4"
tower-http = { version = "0.6", features = ["fs"] }
Example Structure
src/
main.rs
lib.rs
routes/
templates/
base.html
pages/
components/
static/
css/
js/ (minimal)
Telegram Bot
Discovery Questions
- Interaction: Commands, dialog, inline, or buttons?
- State: Stateless, SQLite, or PostgreSQL?
- Integrations: LLM, payments, external APIs?
- Delivery: Webhooks or polling?
Patterns
- Start with polling (simpler), switch to webhooks for prod
- FSM (finite state machine) for dialogs
- Inline keyboards for navigation
- Rate limit user requests
Stack
[dependencies]
teloxide = { version = "0.13", features = ["macros"] }
tokio = { version = "1", features = ["full"] }
sqlx = { version = "0.8", features = ["runtime-tokio", "sqlite"] } # if DB
serde = { version = "1", features = ["derive"] }
Example Structure
src/
main.rs # Bot setup
lib.rs # Command handlers
handlers/
commands.rs # /start, /help, etc
callbacks.rs # Button callbacks
state.rs # FSM states (if dialog)
db.rs # Database (if needed)
Key Considerations
- Store bot token in env var:
TELOXIDE_TOKEN
- Handle
/start and /help commands
- Graceful shutdown for webhook mode
Discord Bot
Discovery Questions
- Type: Slash commands, prefix commands, or both?
- Scope: Single server or multi-server?
- Features: Moderation, games, integrations?
- State: In-memory, SQLite, or PostgreSQL?
Patterns
- Use slash commands (modern)
- Respect rate limits
- Handle guild joins/leaves
- Shard for 2500+ servers
Stack
[dependencies]
serenity = { version = "0.12", features = ["framework", "standard_framework"] }
tokio = { version = "1", features = ["full"] }
sqlx = { version = "0.8", features = ["runtime-tokio", "sqlite"] } # if DB
Mobile App
Discovery Questions
- Platforms: iOS, Android, or both?
- Offline: Offline-first or online-only?
- Push: Push notifications needed?
- Native: Camera, GPS, sensors?
Patterns
- Consider Flutter for cross-platform
- Local storage with Hive/SQLite
- Deep linking support
- App store submission requirements
Stack Options
- Flutter: Dart, single codebase
- React Native: JS/TS, web dev friendly
- Native: Swift/Kotlin for full control
Key Considerations
- Design for both platforms (different UX conventions)
- Handle offline gracefully
- Consider app size
- Test on real devices
Data Pipeline
Discovery Questions
- Trigger: Schedule, event, or manual?
- Volume: How much data? How often?
- Sources: APIs, databases, files?
- Output: Database, files, API?
Patterns
- Idempotent operations
- Checkpointing for resumability
- Structured logging
- Alerting on failures
Stack
[dependencies]
tokio = { version = "1", features = ["full"] }
reqwest = { version = "0.12", features = ["json"] }
sqlx = { version = "0.8", features = ["runtime-tokio", "postgres"] }
serde = { version = "1", features = ["derive"] }
chrono = "0.4"
Browser Extension
Discovery Questions
- Browser: Chrome, Firefox, or both?
- Permissions: What site access?
- UI: Popup, sidebar, or page action?
- Storage: Local or sync?
Patterns
- Manifest V3 for Chrome
- Content scripts for page interaction
- Background service workers
- Careful with permissions (minimal)
Stack
- TypeScript for type safety
- Vite for bundling
- Chrome Extension APIs
Example Structure
src/
background.ts # Service worker
content.ts # Content script
popup/ # Popup UI
options/ # Options page
manifest.json
Quick Selection Guide
Need CLI tool?
→ Rust + clap
Need API?
→ REST: Rust + axum
→ GraphQL: Rust + async-graphql
Need Web UI?
→ Simple: Rust + HTMX
→ Complex SPA: Consider separate frontend
Need Bot?
→ Telegram: Rust + teloxide
→ Discord: Rust + serenity
Need Mobile?
→ Cross-platform: Flutter
→ Web skills: React Native
Need Data Processing?
→ Batch: Rust or Python
→ Stream: Rust + Tokio
1---2name: project-types3description: Project type definitions with type-specific questions, patterns, and stacks. Use when: determining project architecture, asking type-specific questions. Referenced by: idea-validation, brainstorming, /ship command.4---5
6# Project Types Reference
7
8Quick lookup for type-specific questions, patterns, and recommended stacks.
9
10## Type Index
11
12| Type | Complexity | Default PRD | Recommended Stack |
13|------|------------|-------------|-------------------|
14| CLI Tool | Low | Minimal | Rust (clap) |
15| REST API | Low-Medium | Minimal/Standard | Rust (axum) |
16| Web App | Medium | Standard | Rust + HTMX |
17| Telegram Bot | Medium | Standard | Rust (teloxide) |
18| Discord Bot | Medium | Standard | Rust (serenity) |
19| GraphQL API | Medium | Standard | Rust (async-graphql) |
20| Mobile App | High | Full | Flutter/React Native |
21| Data Pipeline | High | Full | Python/Rust |
22| Browser Extension | Medium | Standard | TypeScript |
23
24---
25
26## CLI Tool
27
28### Discovery Questions
291. **Execution model**: One-shot or interactive?
302. **Arguments**: Positional args, flags, or subcommands?
313. **Output**: Text, JSON, or files?
324. **Config**: Config file needed?
33
34### Patterns
35- Use `clap` for argument parsing
36- Support `--json` for machine output
37- Use `anyhow` for error handling
38- Exit codes: 0 success, 1 error
39
40### Stack
41```toml
42[dependencies]
43clap = { version = "4", features = ["derive"] }
44anyhow = "1"
45serde_json = "1" # if JSON output
46```
47
48### Example Structure
49```
50src/
51 main.rs # Entry point, arg parsing
52 lib.rs # Core logic
53 commands/ # Subcommand handlers (if needed)
54```
55
56---
57
58## REST API
59
60### Discovery Questions
611. **Audience**: Internal, public, or partner?
622. **Auth**: None, API Key, JWT, OAuth2?
633. **Rate limiting**: Needed?
644. **Versioning**: /v1/, header, or none?
65
66### Patterns
67- OpenAPI spec first (consider)
68- JSON responses with consistent error format
69- Health endpoint required: `GET /health`
70- Structured logging (tracing)
71
72### Stack
73```toml
74[dependencies]
75axum = "0.8"
76tokio = { version = "1", features = ["full"] }
77serde = { version = "1", features = ["derive"] }
78serde_json = "1"
79tracing = "0.1"
80tracing-subscriber = "0.3"
81```
82
83### Example Structure
84```
85src/
86 main.rs # Server setup
87 lib.rs # Router, handlers
88 routes/ # Route modules
89 models/ # Data structures
90 middleware/ # Auth, logging
91```
92
93---
94
95## Web App (SaaS)
96
97### Discovery Questions
981. **Auth**: Email/password, OAuth, magic link, or none?
992. **Realtime**: WebSocket, SSE, or none?
1003. **Multi-tenant**: Yes/no?
1014. **Admin panel**: Needed?
102
103### Patterns
104- HTMX for interactivity (minimal JS)
105- Server-rendered templates (Askama)
106- Progressive enhancement
107- CSRF protection on forms
108
109### Stack
110```toml
111[dependencies]
112axum = "0.8"
113tokio = { version = "1", features = ["full"] }
114askama = "0.12"
115askama_axum = "0.4"
116tower-http = { version = "0.6", features = ["fs"] }
117```
118
119### Example Structure
120```
121src/
122 main.rs
123 lib.rs
124 routes/
125 templates/
126 base.html
127 pages/
128 components/
129static/
130 css/
131 js/ (minimal)
132```
133
134---
135
136## Telegram Bot
137
138### Discovery Questions
1391. **Interaction**: Commands, dialog, inline, or buttons?
1402. **State**: Stateless, SQLite, or PostgreSQL?
1413. **Integrations**: LLM, payments, external APIs?
1424. **Delivery**: Webhooks or polling?
143
144### Patterns
145- Start with polling (simpler), switch to webhooks for prod
146- FSM (finite state machine) for dialogs
147- Inline keyboards for navigation
148- Rate limit user requests
149
150### Stack
151```toml
152[dependencies]
153teloxide = { version = "0.13", features = ["macros"] }
154tokio = { version = "1", features = ["full"] }
155sqlx = { version = "0.8", features = ["runtime-tokio", "sqlite"] } # if DB
156serde = { version = "1", features = ["derive"] }
157```
158
159### Example Structure
160```
161src/
162 main.rs # Bot setup
163 lib.rs # Command handlers
164 handlers/
165 commands.rs # /start, /help, etc
166 callbacks.rs # Button callbacks
167 state.rs # FSM states (if dialog)
168 db.rs # Database (if needed)
169```
170
171### Key Considerations
172- Store bot token in env var: `TELOXIDE_TOKEN`
173- Handle `/start` and `/help` commands
174- Graceful shutdown for webhook mode
175
176---
177
178## Discord Bot
179
180### Discovery Questions
1811. **Type**: Slash commands, prefix commands, or both?
1822. **Scope**: Single server or multi-server?
1833. **Features**: Moderation, games, integrations?
1844. **State**: In-memory, SQLite, or PostgreSQL?
185
186### Patterns
187- Use slash commands (modern)
188- Respect rate limits
189- Handle guild joins/leaves
190- Shard for 2500+ servers
191
192### Stack
193```toml
194[dependencies]
195serenity = { version = "0.12", features = ["framework", "standard_framework"] }
196tokio = { version = "1", features = ["full"] }
197sqlx = { version = "0.8", features = ["runtime-tokio", "sqlite"] } # if DB
198```
199
200---
201
202## Mobile App
203
204### Discovery Questions
2051. **Platforms**: iOS, Android, or both?
2062. **Offline**: Offline-first or online-only?
2073. **Push**: Push notifications needed?
2084. **Native**: Camera, GPS, sensors?
209
210### Patterns
211- Consider Flutter for cross-platform
212- Local storage with Hive/SQLite
213- Deep linking support
214- App store submission requirements
215
216### Stack Options
217- **Flutter**: Dart, single codebase
218- **React Native**: JS/TS, web dev friendly
219- **Native**: Swift/Kotlin for full control
220
221### Key Considerations
222- Design for both platforms (different UX conventions)
223- Handle offline gracefully
224- Consider app size
225- Test on real devices
226
227---
228
229## Data Pipeline
230
231### Discovery Questions
2321. **Trigger**: Schedule, event, or manual?
2332. **Volume**: How much data? How often?
2343. **Sources**: APIs, databases, files?
2354. **Output**: Database, files, API?
236
237### Patterns
238- Idempotent operations
239- Checkpointing for resumability
240- Structured logging
241- Alerting on failures
242
243### Stack
244```toml
245[dependencies]
246tokio = { version = "1", features = ["full"] }
247reqwest = { version = "0.12", features = ["json"] }
248sqlx = { version = "0.8", features = ["runtime-tokio", "postgres"] }
249serde = { version = "1", features = ["derive"] }
250chrono = "0.4"
251```
252
253---
254
255## Browser Extension
256
257### Discovery Questions
2581. **Browser**: Chrome, Firefox, or both?
2592. **Permissions**: What site access?
2603. **UI**: Popup, sidebar, or page action?
2614. **Storage**: Local or sync?
262
263### Patterns
264- Manifest V3 for Chrome
265- Content scripts for page interaction
266- Background service workers
267- Careful with permissions (minimal)
268
269### Stack
270- TypeScript for type safety
271- Vite for bundling
272- Chrome Extension APIs
273
274### Example Structure
275```
276src/
277 background.ts # Service worker
278 content.ts # Content script
279 popup/ # Popup UI
280 options/ # Options page
281manifest.json
282```
283
284---
285
286## Quick Selection Guide
287
288```
289Need CLI tool?
290 → Rust + clap
291
292Need API?
293 → REST: Rust + axum
294 → GraphQL: Rust + async-graphql
295
296Need Web UI?
297 → Simple: Rust + HTMX
298 → Complex SPA: Consider separate frontend
299
300Need Bot?
301 → Telegram: Rust + teloxide
302 → Discord: Rust + serenity
303
304Need Mobile?
305 → Cross-platform: Flutter
306 → Web skills: React Native
307
308Need Data Processing?
309 → Batch: Rust or Python
310 → Stream: Rust + Tokio
311```