Skip to content

Commit bc0f307

Browse files
committed
docs: clarify saas registry positioning
1 parent 62b08e2 commit bc0f307

9 files changed

Lines changed: 199 additions & 21 deletions

File tree

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ coverage/
2020
# Logs
2121
*.log
2222

23-
# Local planning / assistant artifacts
24-
.cursor/
23+
# Local planning / scratch artifacts
24+
.local/
2525
.agents/
2626
agent-transcripts/
2727
plans/

AGENTS.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Agent Context
22

3-
StackFoundry is a public source registry for production SaaS and AI modules.
3+
StackFoundry is a public source registry for production SaaS modules.
44

55
## Product Rules
66

77
1. The registry is the product. Presets are only bundles of modules.
8-
2. Every module must include source files, docs, env notes, tests/checklist, and agent operating instructions.
8+
2. Every module must include source files, docs, env notes, tests/checklist, and maintenance instructions.
99
3. Base scaffolds must stay small. Optional providers are adapters, not hard dependencies.
1010
4. Do not introduce public-facing references to how the project was authored.
1111
5. Never commit secrets, `.env.local`, provider credentials, private customer data, local caches, or generated machine metadata.
@@ -30,6 +30,6 @@ Before moving to a new phase:
3030

3131
Use this product positioning:
3232

33-
> Install production SaaS and AI features as editable source code.
33+
> Install production SaaS modules as editable source code.
3434
35-
Avoid overclaiming unsupported providers. Keep launch scope narrow and credible.
35+
Avoid overclaiming unsupported providers. Keep launch scope narrow and credible. AI-related modules are optional module categories, not the core project identity.

README.md

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
# StackFoundry
22

3-
Install production SaaS and AI features as editable source code.
3+
Install production SaaS modules as editable source code.
44

5-
StackFoundry is a source registry for full-stack app modules: auth, billing, API keys, webhooks, AI chat, agents, analytics, docs, Drizzle schemas, tests, and deployment workflows.
5+
StackFoundry is a source registry for full-stack app modules: auth, billing, API keys, webhooks, analytics, docs, Drizzle schemas, tests, and deployment workflows.
66

7-
Every module ships with the code and the agent operating instructions needed to maintain it.
7+
Every module ships with the code and the operating instructions needed to maintain it.
88

99
No black boxes. No locked framework. Copy the code. Own the code.
1010

1111
## Status
1212

13-
This repository is the public seed for StackFoundry. The product direction is the registry and module installer.
13+
This repository is the public seed for StackFoundry. The product is the registry and module installer. Presets are only bundles of modules.
14+
15+
StackFoundry sits between three familiar ideas:
16+
17+
- source registries: copy code into your app so you own it
18+
- stack builders: choose only the systems you need
19+
- production SaaS kits: ship real auth, billing, database, analytics, docs, and operations surfaces
20+
21+
The difference is that StackFoundry modules include the implementation, the setup notes, the test checklist, and the maintenance guidance together.
1422

1523
## First Demo
1624

@@ -20,6 +28,7 @@ Target workflow:
2028
pnpm create stackfoundry my-app
2129
cd my-app
2230

31+
pnpm dlx stackfoundry add drizzle-postgres
2332
pnpm dlx stackfoundry add api-keys
2433
pnpm dlx stackfoundry add stripe-billing
2534
```
@@ -32,8 +41,8 @@ The demo should show each module adding:
3241
- environment variables
3342
- docs
3443
- tests or verification checklist
35-
- `.agents/skills/<module>/SKILL.md`
36-
- `AGENTS.md` guidance
44+
- maintenance guidance
45+
- install metadata for future diff/update safety
3746

3847
## V1 Golden Path
3948

@@ -52,6 +61,20 @@ The demo should show each module adding:
5261
- `sentry-monitoring`
5362
- `resend-email`
5463

64+
## Module Categories
65+
66+
StackFoundry is designed around production SaaS systems:
67+
68+
- foundation: Next.js App Router, shadcn-compatible source files, Sidebar shell, Geist theme, T3 env
69+
- data: Drizzle, Postgres, migrations, audit log, soft delete, seed data
70+
- auth and tenancy: Clerk, organizations, RBAC, invitations, workspace settings
71+
- billing: Stripe, billing core, webhooks, entitlements, usage metering
72+
- developer platform: API keys, scopes, public API, webhook delivery, developer portal
73+
- growth: PostHog, PLG metrics, AARRR dashboards, onboarding, lifecycle email
74+
- operations: admin console, support console, system health, Sentry, incident tools
75+
- providers: Vercel, Neon, Supabase, Upstash, Cloudflare, Resend, PostHog, Sentry
76+
- optional AI modules: AI chat, artifacts, model routing, prompt library
77+
5578
## Principles
5679

5780
- Registry is the product.
@@ -61,7 +84,7 @@ The demo should show each module adding:
6184
- Provider modules are adapters around shared domain interfaces.
6285
- Never overwrite modified user files silently.
6386
- Track installed file hashes for diff/update safety.
64-
- Each module teaches maintainers and coding agents how to safely change it.
87+
- Each module teaches maintainers how to safely change it.
6588

6689
## Repository Layout
6790

@@ -83,7 +106,7 @@ docs/
83106

84107
## Development
85108

86-
The next milestone is to build `stackfoundry add` for the first production modules.
109+
The current milestone is to make the first modules installable and safe to diff.
87110

88111
Current local prototype:
89112

ROADMAP.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,30 @@
99
- [x] `stackfoundry add <module>` prototype
1010
- [x] file hash manifest
1111
- [x] `stackfoundry diff <module>` prototype
12+
- [ ] overwrite conflict UI
13+
- [ ] generated install report
14+
- [ ] public demo app
1215

1316
## Wave 2
1417

1518
- [ ] `clerk-auth`
1619
- [ ] `orgs-rbac`
1720
- [ ] `unkey-api-keys`
1821
- [ ] `unkey-rate-limits`
19-
- [ ] `ai-chat`
20-
- [ ] `ai-artifacts`
2122
- [ ] `usage-metering`
2223
- [ ] `public-api-orpc`
2324
- [ ] `vercel-blob`
2425
- [ ] `vercel-edge-config`
2526
- [ ] `upstash-redis`
2627
- [ ] `feature-flags`
28+
- [ ] `posthog-analytics`
29+
- [ ] `sentry-monitoring`
30+
- [ ] `resend-email`
31+
- [ ] `webhook-inbox`
32+
- [ ] `audit-log`
33+
- [ ] `plg-metrics`
34+
- [ ] `aarrr-dashboard`
35+
- [ ] `activation-onboarding`
2736

2837
## Wave 3
2938

@@ -34,6 +43,21 @@
3443
- [ ] `convex-backend`
3544
- [ ] `paddle-billing`
3645
- [ ] Cloudflare provider modules
46+
- [ ] optional AI modules
47+
- [ ] docs/help center modules
48+
- [ ] search provider modules
49+
50+
## Module System
51+
52+
- [ ] module manifest schema package
53+
- [ ] registry loader package
54+
- [ ] generator package
55+
- [ ] file hash diff/update engine
56+
- [ ] module dependency resolver
57+
- [ ] `.env.example` patcher
58+
- [ ] AGENTS/maintenance-guidance patcher
59+
- [ ] registry build command
60+
- [ ] hosted registry docs site
3761

3862
## Launch Readiness
3963

docs/agents.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Agent Operating Instructions
1+
# Maintenance Instructions
22

3-
Every module can include agent operating instructions in:
3+
Every module can include maintenance instructions in:
44

55
```text
66
registry/modules/<module>/skill/SKILL.md
77
```
88

9-
These files teach maintainers and coding agents:
9+
These files teach maintainers:
1010

1111
- which files own the module
1212
- which environment variables matter

docs/modules.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,93 @@ The first production modules are:
99
- `stripe-billing`
1010

1111
Each module should be installable into an existing app as editable source code. Presets are only bundles of modules.
12+
13+
## What a Module Includes
14+
15+
- `module.json`
16+
- source files
17+
- dependency metadata
18+
- environment variable metadata
19+
- docs
20+
- verification checklist
21+
- maintenance guidance
22+
- install metadata for diff/update safety
23+
24+
## Planned Module Families
25+
26+
### Foundation
27+
28+
- `next-saas`
29+
- `t3-env`
30+
- `shadcn-sidebar-shell`
31+
- `geist-theme`
32+
- `quality-tooling`
33+
- `playwright-e2e`
34+
35+
### Data
36+
37+
- `drizzle-postgres`
38+
- `drizzle-multitenancy`
39+
- `drizzle-relations`
40+
- `drizzle-audit-log`
41+
- `drizzle-soft-delete`
42+
- `neon-postgres`
43+
- `supabase-postgres`
44+
45+
### Auth and Tenancy
46+
47+
- `clerk-auth`
48+
- `orgs-rbac`
49+
- `invites`
50+
- `workspace-settings`
51+
- `account-settings`
52+
- `session-management`
53+
54+
### Billing
55+
56+
- `billing-core`
57+
- `stripe-billing`
58+
- `paddle-billing`
59+
- `autumn-entitlements`
60+
- `usage-metering`
61+
- `trial-management`
62+
- `plan-gating`
63+
64+
### Developer Platform
65+
66+
- `api-keys`
67+
- `unkey-api-keys`
68+
- `unkey-rate-limits`
69+
- `public-api-orpc`
70+
- `webhook-inbox`
71+
- `webhook-delivery`
72+
- `developer-portal`
73+
74+
### Growth and Analytics
75+
76+
- `posthog-analytics`
77+
- `plg-metrics`
78+
- `aarrr-dashboard`
79+
- `activation-onboarding`
80+
- `lifecycle-email`
81+
- `cohort-retention`
82+
- `experiments`
83+
84+
### Operations
85+
86+
- `sentry-monitoring`
87+
- `audit-log`
88+
- `admin-console`
89+
- `support-console`
90+
- `system-health`
91+
- `incident-management`
92+
- `data-import-export`
93+
94+
### Optional AI
95+
96+
- `ai-chat`
97+
- `ai-artifacts`
98+
- `ai-tools`
99+
- `model-router`
100+
- `prompt-library`
101+
- `evals`

docs/providers.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,36 @@ Provider modules adapt external services into StackFoundry systems.
1616
## Adapter Rule
1717

1818
Providers map into shared domain systems. They should not become one-off code islands.
19+
20+
## Provider Families
21+
22+
### Deploy and Hosting
23+
24+
- Vercel first for Next.js applications
25+
- Cloudflare as an optional edge/workers platform
26+
- Railway, Fly, and Render as future adapters
27+
28+
### Database and Storage
29+
30+
- Postgres + Drizzle as the default data model
31+
- Neon and Supabase as managed Postgres providers
32+
- Vercel Blob and S3/R2 for object storage
33+
- Upstash Redis for cache, queues, and rate-limit support
34+
35+
### Billing and Entitlements
36+
37+
- Stripe as the default payment provider
38+
- Paddle for Merchant of Record workflows
39+
- Autumn for pricing, entitlements, credits, and usage control
40+
41+
### Product and Operations
42+
43+
- PostHog for product analytics and feature flags
44+
- Sentry for error monitoring
45+
- Resend for transactional email
46+
- Unkey for managed API keys and rate limits
47+
48+
### Optional AI
49+
50+
- Vercel AI SDK and AI Gateway for AI modules
51+
- Provider-specific model routing belongs behind module adapters

docs/registry.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,17 @@ Each module has:
2121
- `env`: required environment variables
2222
- `files`: files installed into the target app
2323
- `drizzle`: schema/migration metadata
24-
- `agents`: agent operating instructions metadata
24+
- `agents`: maintenance instruction metadata
2525
- `status`: planned, experimental, stable
2626

27+
## Registry Principles
28+
29+
- Modules install source code, not opaque package wrappers.
30+
- Presets only compose modules.
31+
- Provider modules adapt services into shared domain systems.
32+
- Installers must produce enough metadata for safe diff/update workflows.
33+
- Public modules should avoid private assumptions about a single company or app.
34+
2735
## Safety
2836

2937
Installers must not overwrite modified user files silently. The installer should track file hashes and support diff/update flows.

registry.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"name": "api-keys",
2020
"type": "registry:item",
2121
"title": "API Keys",
22-
"description": "API key lifecycle, scopes, hashed storage, usage metadata, and agent operating instructions.",
22+
"description": "API key lifecycle, scopes, hashed storage, usage metadata, and maintenance instructions.",
2323
"files": [
2424
{
2525
"path": "registry/modules/api-keys/module.json",

0 commit comments

Comments
 (0)