Architecture
Clear boundaries.
Less guesswork.
Start with practical responsibilities for components, layouts, services, hooks, utilities, stores, and types - only where they are needed.
A practical frontend foundation
A framework-aware CLI that gives your project a clean starting point - tokens, naming conventions, motion utilities, API patterns, and architecture notes - without forcing every app into the same shape.
$ npx frontend-setup init
◆ Frontend Setup
✓ Project detected Astro
✓ Profile selected Marketing site
✓ Styling strategy Tokenized CSS
✓ Motion engine GSAP (optional)
Planned files
+ frontend-architecture.config.json
+ ARCHITECTURE.md
+ src/styles/tokens.css
+ src/styles/typography.css
+ src/lib/text-splitting.ts
The problem
Every new frontend project needs decisions: where files live, how styles are named, how tokens work, what owns API requests, and how animations are cleaned up.
Frontend Setup captures those decisions in a reusable, editable foundation. It adapts to the framework and project type instead of generating an oversized boilerplate.
Architecture
Start with practical responsibilities for components, layouts, services, hooks, utilities, stores, and types - only where they are needed.
Design foundation
Semantic values and numerical scales for color, spacing, type, radius, sizing, and motion. Fluid typography is the default, not an afterthought.
--color-text · --space-4 · --radius-card
Motion system
Use data attributes for declarative targets, GSAP for web motion, and Reanimated for Expo. Lifecycle and cleanup stay part of the setup.
The workflow
It doesn't replace your framework's project creator. Run it inside a project to establish the architecture around it.
Identify framework and package-manager markers from limited local project metadata.
Read-only inspectionSelect a project profile and configure styling, state, API, and motion preferences.
Defaults + overridesReview the proposed files before applying the setup. Existing files are preserved by default.
Safe by defaultKeep a machine-readable config and a human-readable architecture record with the project.
Ready for your agentFramework adapters
The conventions stay consistent. The implementation respects each framework's routing, rendering, lifecycle, and styling model.
Getting started
Choose your package manager and copy the command. The package is currently an unpublished preview; these commands become usable after the npm package is released.
npx frontend-setup initUses npx to run the published CLI without installing it globally.
Useful commands
frontend-setup init --dry-runPreviewfrontend-setup doctorDiagnosefrontend-setup updateVersion checkFits your workflow
Keep your choices in frontend-architecture.config.json, and record the reasoning in ARCHITECTURE.md. Start from the recommended stack, then change what the project actually needs.
{
"framework": "astro",
"profile": "marketing-site",
"styling": {
"strategy": "tokenized-css",
"naming": "bem"
},
"motion": {
"enabled": true,
"engine": "gsap"
}
}The knowledge layer
Run the CLI offline by default. When you choose to connect, it fetches a read-only JSON catalog, validates its schema, and caches it locally. Matching framework and project-profile notes appear during setup. Generated files still come from the local templates; catalog content is never executed.
Catalog endpoint included; public after site deployment
frontend-setup updateCheck npm for a newer CLI version.
frontend-setup connect https://your-domain/catalog/v1/catalog.jsonChoose a catalog endpoint you trust.
frontend-setup syncDownload and validate the configured catalog.
After deployment, use your docs domain for the included catalog endpoint. Review and version catalog guidance like source code.
Privacy and control
There is no telemetry or analytics in the current CLI. It reads limited metadata for detection and does not upload source files or project information. Network requests happen only when you explicitly run update or catalog commands.
Read about package securityNo usage analytics
✓No source uploads
✓Preview before writing
✓Explicit network actions
✓A better baseline
Let the setup be repeatable. Keep the decisions yours.