Skip to content

Latest commit

 

History

History
381 lines (350 loc) · 25 KB

File metadata and controls

381 lines (350 loc) · 25 KB

Stackfast Codebase Revival Audit Executive Summary Yes, Stackfast is worth reviving, but not by continuing the current repo as-is.

The strongest path is to treat Branches/StackfastPro as the cleanest product foundation, then selectively port the best backend/API ideas from the root app and StackFast-101. The current root app has more feature breadth, but it is inconsistent, partly broken, and contains too many stale endpoints, docs, nested repos, duplicate APIs, and risky public mutation routes.

Best codebase candidate: Branches/StackfastPro

Best salvage strategy: rebuild around a clean 2026 architecture using:

Source Role In Revival Branches/StackfastPro Primary product foundation: clean stack builder, catalog, compatibility rules, recipes, export system, tests Root client/, server/, shared/ Reference implementation for full-stack pages, Drizzle schema, blueprint generation, compatibility APIs Branches/StackFast-101/Stackfast/StackFast/packages/* Salvage schema discipline, monorepo shape, Gemini blueprint route, compatibility scoring ideas WebAILyzerAPI Keep only as optional internal technology-detection worker after SSRF hardening StackWiseAI Product inspiration only: discovery, roadmap, cost planning, repo analysis concepts developer-tools-api Delete as deployable service; possibly extract data only The product still has real potential if repositioned as a modern “idea-to-architecture and starter-stack copilot” instead of a static tool directory. In 2026, the useful version is not just “pick React plus Supabase.” It should generate an explainable architecture, compare stack options, show compatibility and cost risks, produce starter files, and keep its tool registry fresh with evidence.

No files were edited during this audit.

Repository State The root repository is currently dirty before any work from me:

Finding Evidence Root has modified and deleted files git status --short shows modified package.json, server/routes.ts, server/index.ts, client/src/components/stack-export.tsx, deleted old docs, and many untracked folders Root remote https://github.com/Nether404/StackFast.git Root latest commit bb49cc7 2025-09-13 Add stack export and improve tool database filtering StackfastPro remote https://github.com/Nether403/StackfastPro.git StackfastPro latest commit 92046af 2025-11-18 Update .gitignore Environment files exist in multiple places .env, .env.fixed, Branches/StackfastPro/.env, Branches/StackFast-101/.env, Branches/StackWiseAI/.../.env, etc. Important implication: before any cleanup, make a backup or commit/snapshot anything you want to preserve. There are user or historical changes already present.

Most Complete Codebase Winner: Branches/StackfastPro Branches/StackfastPro is the most complete and coherent branch for the original Stackfast idea.

Evidence:

Area Evidence Purpose-built package Branches/StackfastPro/package.json:2 uses stackfast-full-stack-builder Clean scripts Branches/StackfastPro/package.json:6-14 has dev, build, lint, test, type-check Clear product model Branches/StackfastPro/README.md:1-22 describes a full-stack JavaScript tech stack builder Client-only architecture Branches/StackfastPro/README.md:77-84 explains static catalog, Web Workers, local storage Catalog exists Branches/StackfastPro/public/catalog/v1/tools.json has 33 tools Rules exist Branches/StackfastPro/public/catalog/v1/rules.json has 53 rules Categories exist Branches/StackfastPro/public/catalog/v1/categories.json has 10 categories Export generator exists Branches/StackfastPro/src/lib/export-generator.ts:28-143 generates package files, env example, README, config files, export log Tests exist Branches/StackfastPro/tests/ includes unit, integration, snapshot, and app tests Test docs claim strong coverage Branches/StackfastPro/docs/build/task-14-week4-quality-launch.md:12-15 claims 132 of 137 tests passing Caveat: StackfastPro has internally inconsistent docs. For example, Branches/StackfastPro/.kiro/specs/stackfast-full-stack-builder/tasks.md:7-13 says the implementation is only 30% complete, but later docs claim production readiness. The actual source tree shows many of the “missing” systems were later implemented, so the older gap docs should not be trusted as current truth.

Branch Comparison Variant Assessment Recommendation Branches/StackfastPro Cleanest and newest focused Stackfast implementation. Best catalog/rules/export foundation. Use as the primary base. Root app Most feature breadth, but messy. React/Express/Drizzle app with blueprint, compatibility, analytics, migration UI, but many broken or mismatched endpoints. Salvage selectively. Do not treat as production-ready. Branches/StackFast-101 Older large full-stack version. Contains useful API code, tests, middleware, and a nested monorepo. Also has backup/broken route files and duplication. Reference only. Port selected code. Branches/StackFast1 Older predecessor with generic rest-express package and nested monorepo copy. Delete/archive after verifying no unique assets. Branches/StackFastold Archive dump with old repos, zip file, duplicated StackFast-101. Delete/archive. Branches/StackWiseAI Separate product with toolchain intelligence, cost planning, projects, docs, discovery. Product inspiration only. Do not merge wholesale. developer-tools-api Flask API with tool data, open CORS, hardcoded secret, unauthenticated CRUD/user routes. Delete as service. Extract data only if useful. WebAILyzerAPI Standalone Go URL technology detector. Useful only as internal enrichment worker. Keep only if hardened and isolated. Referencedocs Audit The Referencedocs folder is mostly historical progress reporting, not reliable current documentation.

File Current Value Recommendation Referencedocs/CODEBASE_REVIEW.md Useful historically, but contradictory. Claims some issues are fixed while current code still has broken/missing paths. Delete from active docs or archive outside repo. Referencedocs/INTEGRATION_PLAN.md Still useful as strategy/backlog. Mentions compatibility-aware search, migration paths, worker enrichment. Keep as backlog only after renaming or annotating as historical. Referencedocs/PHASE2_COMPLETE.md Historical implementation milestone for blueprint and compatibility APIs. Delete/archive. Referencedocs/PHASE3_PROGRESS.md Historical frontend milestone. Partly true, partly stale. Delete/archive. Referencedocs/PHASE4_COMPLETE.md Most misleading. Claims full platform completion and /api/v1/migration/:fromTool/:toTool, which root server does not implement. Delete/archive. Referencedocs/README_CI_DOCKER.md Operationally useful but stale. CI and Docker exist, but port and setup instructions need updates. Keep and update. Referencedocs/STACKFAST_MERGER_SUCCESS.md Historical celebration doc, not current truth. Delete/archive. Important mismatches found:

Claim Actual State Root README claims /api/tools/:id/vote No matching route found in root server/routes.ts Root README claims saved stacks/export Stack export UI calls /api/stack/export, but no matching route exists Add/Edit tool UI appears implemented Calls apiRequest with reversed arguments in client/src/components/add-tool-dialog.tsx:44 and edit-tool-dialog.tsx:58; expected order is defined in client/src/lib/queryClient.ts:10-13 Migration UI calls /api/v1/migration/:from/:to Server implements /api/migration-path?from=&to= at server/routes.ts:593 Docs claim /api/categories Root Add/Edit dialogs query /api/categories, but root routes expose /api/v1/categories and /api/tools/categories, not /api/categories Docs imply external AI blueprinting in root app Root server/services/blueprint-generator.ts:72-123 is deterministic/rule-based, not an LLM call Salvageable Code Strongly Salvageable Code Why It Is Useful Branches/StackfastPro/public/catalog/v1/* Clean static registry with 33 tools, 10 categories, 53 rules Branches/StackfastPro/src/engine/* Rules engine, score calculator, worker/fallback model Branches/StackfastPro/src/data/recipes/* Recipe-based scaffold/export architecture Branches/StackfastPro/src/lib/export-generator.ts Real project file generation pipeline Branches/StackfastPro/tests/* Best test foundation in the repo Root shared/schema.ts Useful Drizzle model for tools, categories, compatibility, templates, rules, migration paths Root server/services/blueprint-generator.ts Good first-pass deterministic blueprint generator Root server/services/compatibility-engine.ts Useful compatibility logic reference Root client/src/pages/blueprint-builder.tsx Feature concept is valuable Root client/src/components/compatibility/* Stack harmony and heatmap components are useful concepts StackFast-101/Stackfast/StackFast/packages/schemas Good Zod schema package idea StackFast-101/Stackfast/StackFast/packages/api/src/routes/blueprint.ts Better LLM response validation pattern than the root app StackFast-101/Stackfast/StackFast/packages/api/src/routes/compatibility.ts Simple weighted overlap compatibility scoring worth reusing WebAILyzerAPI/cmd/webailyzer-api Optional enrichment worker for detecting technologies from URLs Salvageable As Product Inspiration Source Useful Concepts Branches/StackWiseAI Tool discovery, stack redundancy analysis, missing-piece detection, cost impact, roadmap generation Referencedocs/INTEGRATION_PLAN.md Compatibility-aware search, worker enrichment, migration path product direction Root analytics pages Useful later, not core MVP Root external data source UI/API Promising, but not safe enough as-is Weak Or Not Worth Salvaging Code Reason developer-tools-api Flask app Duplicates root tool APIs, uses hardcoded secret, open CORS, unauthenticated user/tool CRUD Branches/StackFastold Archive dump and duplicate repos Branches/StackFast1 Older predecessor, not clearly better than StackfastPro or root routes-broken.ts, routes-backup.ts, routes-original.ts Stale route snapshots that increase confusion Embedded nested repos inside branches They make the repo impossible to reason about cleanly Salvageable API Endpoints Keep Or Rebuild Endpoint Source Recommendation POST /api/v1/blueprint Root server/routes.ts:1223-1233 Keep concept. Rebuild with strict Zod input/output and optional LLM provider. POST /api/v1/stack/analyze Root server/routes.ts:753-790 Keep as canonical stack validation endpoint. GET /api/v1/tools/search Root server/routes.ts:793-881 Keep as canonical search endpoint. GET /api/v1/categories Root server/routes.ts:942-958 Keep. Update UI to use this path. GET /api/v1/tools/stats Root server/routes.ts:1060-1074 Keep if analytics dashboard remains. GET /api/v1/compatibility/:toolA/:toolB Root server/routes.ts:705-746 Keep. Useful public read-only endpoint. GET /api/tools/:id/alternatives Root server/routes.ts:692-699 Keep only if alternatives become part of blueprint output. GET /api/migration-path?from=&to= Root server/routes.ts:593-687 Keep concept, but rename to canonical /api/v1/migration/:from/:to or update UI. POST /v1/blueprint StackFast-101 package API Salvage validation/prompting pattern, not necessarily route path. GET /v1/compatibility?tool_id= StackFast-101 package API Salvage scoring model ideas. POST /v1/analyze WebAILyzerAPI Keep only as private/internal service after hardening. Collapse Or Delete Endpoint Family Problem Recommendation /api/tools/search and /api/v1/tools/search Duplicate search routes Keep only /api/v1/tools/search /api/tools/categories, /api/v1/categories, missing /api/categories Inconsistent category API Keep only /api/v1/categories, optionally temporary alias /api/v1/stack/compatibility-report, /api/stack/validate, /api/stack/harmony-score, /api/stack/bulk-compatibility Overlapping stack analysis endpoints Collapse into POST /api/v1/stack/analyze /api/v1/tools/recommend, /api/v1/recommendations, /api/stack/recommendations Overlapping recommendation APIs Keep one idea-based endpoint and one stack-extension endpoint /api/tools/generate-compatibility, /api/compatibility/generate Duplicate admin job endpoints Keep one internal/admin job only Flask /api/tools/* Duplicates Node API Delete Flask service Flask /api/users/* Template user CRUD with no value to Stackfast Delete Must Be Admin-Only Or Removed Endpoint Or Route Type Risk DELETE /api/tools Public destructive operation DELETE /api/tools/:id Public destructive operation POST /api/tools/seed Public database mutation POST /api/tools/import-csv Public import route POST /api/tools/import-stackfast Public import route POST /api/tools/migrate-categories Public migration route POST /api/tools/cleanup Public destructive cleanup POST /api/external-sources/import Accepts external source and API key material from request body POST /api/integrations/sync/:toolId Mutates tool data and accepts API key values Branch debug endpoints Potential environment/config leakage WebAILyzer public /v1/analyze SSRF risk unless private IP and DNS rebinding protections are added What Should Be Deleted This is the exact cleanup recommendation after extracting anything you want to preserve.

Delete From Active Repository Path Reason Branches/StackFastold/ Archive dump, duplicated old code, contains StackFast.zip Branches/StackFast1/ Older predecessor; no clear unique value versus StackfastPro and root Branches/StackfastPro/StackFast-101/ Embedded nested clone inside the Pro branch Branches/StackFast-101/server/routes-broken.ts Stale broken route snapshot Branches/StackFast-101/server/routes-backup.ts Stale backup route snapshot Branches/StackFast-101/server/routes-original.ts Stale original route snapshot unless needed for diff archaeology developer-tools-api/ Obsolete duplicate Flask API with security issues WebAILyzerAPI/cmd/wappalyzer-server/ Older duplicate server path; keep only cmd/webailyzer-api if retaining WebAILyzer All desktop.ini files Windows metadata noise All committed or untracked node_modules/ folders under archived branches Generated dependency folders All branch dist/ folders unless needed as artifacts Generated build output .local/ Local Replit state, not source .vs/ Local Visual Studio state Real .env files Secrets/config should not live in source .env.fixed Looks like a local repair artifact, not source Delete Or Archive From Referencedocs Path Reason Referencedocs/STACKFAST_MERGER_SUCCESS.md Historical celebration doc, misleading now Referencedocs/PHASE2_COMPLETE.md Historical milestone, stale stats Referencedocs/PHASE3_PROGRESS.md Historical milestone, stale stats Referencedocs/PHASE4_COMPLETE.md Claims completion and endpoints that do not exist Referencedocs/CODEBASE_REVIEW.md Contradictory and no longer reliable as current audit Keep But Rewrite Path Required Action readme.md Rewrite around actual rebuilt architecture and remove false claims Referencedocs/README_CI_DOCKER.md Update ports, commands, actual Docker/CI state Referencedocs/INTEGRATION_PLAN.md Keep as historical backlog, not current-state doc replit.md Keep only if Replit is still used; otherwise archive after extracting accurate architecture notes Should We Proceed? Yes, with a reset mindset.

The core idea still has potential because developers in 2026 have the opposite problem from 2023: too many frameworks, AI tools, hosting platforms, auth providers, database options, agent frameworks, and deployment paths. A useful Stackfast would reduce choice overload and produce an explainable, runnable starting point.

The app should not compete as a generic “tool directory.” It should become:

An AI-assisted architecture and starter-stack generator that turns an idea into a validated technical plan, compatibility-scored stack, starter repo, cost/risk estimate, and migration path.

The differentiator should be explainability. Most AI coding tools can suggest a stack. Stackfast can be better if it explains why, shows alternatives, flags incompatibilities, estimates complexity, and generates starter files from tested recipes.

Recommended Product Direction For 2026 Product Promise “Describe your idea, constraints, team, budget, and target deployment. Stackfast returns the best-fit architecture, stack options, compatibility risks, generated starter files, and next implementation steps.”

Core User Flow Step User Experience 1 User enters idea, audience, timeline, budget, team skill, deployment preference, data sensitivity 2 Stackfast classifies the project type and required capabilities 3 Stackfast proposes 2 to 4 stack options with confidence scores 4 User sees compatibility, cost, maturity, security, deployment, and lock-in tradeoffs 5 User picks a stack or adjusts constraints 6 Stackfast generates scaffold files, .env.example, setup guide, ADRs, and implementation roadmap 7 Optional: user enters an existing URL/repo and Stackfast suggests migration or modernization paths What Makes It Useful Feature Why It Matters Explainable stack scoring Users trust recommendations when they see evidence Registry with freshness timestamps Tech choices go stale fast Recipe-based scaffolding Converts recommendations into action Compatibility and migration graph Adds value beyond generic LLM output Cost and complexity estimates Helps solo builders and teams make realistic choices Alternatives and tradeoffs Avoids one-size-fits-all recommendations Admin-only enrichment pipeline Keeps catalog fresh without exposing dangerous endpoints Step-By-Step Technical Plan Phase 0: Freeze And Preserve Create a backup branch or external archive before deletion. Record which files are intentionally kept from each historical branch. Move or copy Branches/StackfastPro into the new canonical app location. Extract useful root backend files into a temporary salvage/ workspace or notes before deleting duplicates. Remove real .env files from source and keep only .env.example. Verify .gitignore excludes .env, .local, .vs, node_modules, dist, desktop.ini, logs, and nested generated artifacts. Phase 1: Choose The New Architecture Recommended structure:

apps/ web/ api/ packages/ registry/ rules-engine/ schemas/ exporter/ ai/ shared/ workers/ webailyzer/ docs/ architecture/ decisions/ Recommended stack:

Layer Recommendation Web React, Vite, TypeScript, TanStack Router or existing routing if keeping minimal API Node TypeScript with Hono, Fastify, or Express if minimizing migration Database Postgres with Drizzle Validation Zod schemas shared between API and web Registry Versioned JSON plus Postgres mirror for dynamic/admin data AI Provider abstraction for OpenAI, Azure OpenAI, Gemini, local models if desired Jobs Background worker for enrichment, compatibility recompute, URL analysis Testing Vitest for packages, API contract tests, Playwright for key flows Deployment Static web plus containerized API, or a single full-stack deployment if simplicity wins I would not start with Next.js unless you want the entire app moved into one full-stack framework. The current strongest code is Vite/React plus API services, so a split web and api setup is the lower-risk modernization path.

Phase 2: Extract The Core Engine Move StackfastPro catalog files into packages/registry. Move StackfastPro rules engine into packages/rules-engine. Move StackfastPro recipe/export code into packages/exporter. Move StackFast-101 tool profile Zod schema ideas into packages/schemas. Normalize tool IDs, category IDs, capability names, pricing fields, and integration metadata. Add schema validation for every registry file at build/test time. Add tests that prove the same input stack always yields the same score and diagnostics. Phase 3: Build A Clean API Surface Canonical public API:

Endpoint Purpose POST /api/v1/blueprints Generate idea-to-stack blueprint POST /api/v1/stacks/analyze Validate selected tools and return score, conflicts, warnings GET /api/v1/tools/search Search/filter tool registry GET /api/v1/tools/:id Tool details GET /api/v1/categories Category metadata GET /api/v1/compatibility/:a/:b Pairwise compatibility POST /api/v1/scaffolds Generate downloadable starter files GET /api/v1/migrations/:from/:to Migration path between tools Admin/internal API:

Endpoint Purpose POST /admin/tools/import Protected import POST /admin/compatibility/recompute Protected recompute job POST /internal/analyze-url Private WebAILyzer-backed enrichment POST /internal/enrich-tool Refresh metadata from docs, GitHub, npm, package registries Rules:

Rule Requirement Public APIs Read-only except generation/analyze requests Mutations Admin-only Imports Admin-only Secrets Server-side only AI calls Server-side only URL fetches Internal-only with SSRF protections Phase 4: Repair Or Replace The Existing UI Use StackfastPro UI as the starting point for stack selection and export. Port root blueprint-builder UI only after API contracts are clean. Port compatibility heatmap and stack harmony components after normalizing data types. Remove UI buttons that call missing endpoints until those endpoints exist. Replace the current root Add/Edit dialogs or fix their apiRequest argument order. Update category queries to use /api/v1/categories. Update migration UI to use the canonical migration endpoint. Implement scaffold export through the new packages/exporter package. Phase 5: Make The Blueprint Generator Actually Valuable Keep deterministic rules as the foundation. Add LLM only as an explanation and synthesis layer, not the source of truth. Validate every AI response with Zod. Require the model to cite registry facts, constraints, and tradeoffs. Return multiple stack options instead of one answer. Score each option with deterministic compatibility rules. Include “why not” explanations for popular alternatives that were rejected. Generate architecture decision records as part of the output. Recommended blueprint output:

{ "summary": {}, "recommendedStack": {}, "alternatives": [], "compatibility": {}, "risks": [], "costEstimate": {}, "implementationPlan": [], "generatedFiles": [], "architectureDecisions": [] } Phase 6: Build The Registry As The Moat Expand the catalog from 33 tools to 100 to 200 carefully curated tools. Add support for AI app categories: agent frameworks, vector databases, eval tooling, observability, auth, billing, queues, workflow engines, deployment, serverless, edge, mobile, desktop. Add lastVerified, sourceUrls, confidence, pricingLastChecked, and deprecated fields. Add compatibility rules with evidence and versioning. Add “capabilities” as the primary matching layer, not just categories. Add import/enrichment jobs, but keep them admin-only. Use WebAILyzer only to enrich existing URLs, not as a public endpoint. Phase 7: Quality Gate Run typecheck for every package. Run unit tests for rules, scoring, registry validation, exporter, and API schemas. Add API contract tests for every public endpoint. Add Playwright tests for the primary flow: idea input, stack generation, stack adjustment, export. Add security tests for admin-only routes and SSRF protections. Add CI that blocks merge on type errors, tests, lint, and registry validation. Add a small seed dataset that works without a database for local development. Phase 8: Deployment And Operations Deploy web separately from API if keeping the split architecture. Use Postgres for persisted registry, generated blueprint history, user projects, and admin data. Add Redis or durable job queue only when enrichment jobs become necessary. Add rate limiting to generation endpoints. Add request logging, error tracking, and metrics. Add a public status/health route. Add privacy controls if saving user ideas. Add admin authentication before exposing any registry mutation. Phase 9: MVP Definition The revived MVP should include only:

Feature Include In MVP Idea-to-stack blueprint Yes Compatibility-scored stack options Yes Tool search and details Yes Stack builder Yes Starter file export Yes Alternatives and tradeoffs Yes Migration path between tools Basic version User accounts No, unless needed for saving Voting No Analytics dashboard No External public import endpoints No Public URL analyzer No Full admin portal No, CLI/admin scripts first Immediate Fixes If Continuing From Root Temporarily If you want to make the current root app usable before the larger rebuild, fix these first:

Issue Fix Broken Add Tool mutation Change apiRequest("/api/tools", "POST", data) to apiRequest("POST", "/api/tools", data) Broken Edit Tool mutation Change apiRequest(url, "PUT", data) to apiRequest("PUT", url, data) Missing /api/categories Update UI to /api/v1/categories or add temporary alias Missing /api/stack/export Implement route using StackfastPro exporter or remove buttons Missing /api/v1/migration/:from/:to Add route wrapper or update UI to /api/migration-path?from=&to= Public destructive routes Remove or protect immediately False README claims Rewrite README before any public release .env files in source tree Remove and rotate secrets if real Final Recommendation Proceed, but make this a focused rebuild rather than a rescue mission.

Use Branches/StackfastPro as the base because it is the clearest expression of the original product and has the best core engine/export/test structure. Treat the root app and StackFast-101 as salvage sources. Delete the old branch dumps, duplicate APIs, stale docs, generated files, local state, and unsafe public mutation routes.

The best 2026 version of Stackfast is an explainable stack intelligence platform: idea in, validated architecture and starter implementation out. That is still a strong product direction, especially if the registry, compatibility graph, and recipe-based exports become the trusted core rather than relying on generic LLM suggestions.