Documentation Index
Fetch the complete documentation index at: https://mintlify.com/amanvarshney01/create-better-t-stack/llms.txt
Use this file to discover all available pages before exploring further.
Before starting work on any new features or major changes, please open an issue first to discuss your proposal and get approval. We don’t want you to waste time on work that might not align with the project’s direction or get merged.
Overview
Better-T-Stack is an open-source monorepo containing:- CLI:
apps/cli- The scaffolding CLI tool (create-better-t-stack) - Documentation:
apps/web- Official website and documentation - Template Generator:
packages/template-generator- Template generation engine - Backend:
packages/backend- Convex backend for web features - Types:
packages/types- Shared schemas and types
Prerequisites
Before you begin, ensure you have:- Node.js LTS (version 20 or higher)
- Bun (recommended for development)
- Git (for version control)
Development Setup
CLI Development
Link the CLI globally (optional)
create-better-t-stack from anywhere in your system.CLI Testing
Before committing CLI changes:Documentation Development
Set GitHub tokens
Run
bun dev in the root. It will complain about GitHub tokens, so run this in packages/backend:Code Style & Conventions
File Naming
- Use kebab-case for files:
database-setup.ts,template-processor.ts - Use PascalCase for types and components:
CLIError,ProjectCreationError - Use camelCase for functions and variables:
createProject,validateOptions
TypeScript
- Language: TypeScript (strict mode enabled)
- Modules: ESM-first (
"type": "module"where applicable) - Keep feature logic near domain folders (
helpers,utils,template-handlers)
Error Handling
In CLI code, preferbetter-result over ad-hoc try/catch:
apps/cli/src/utils/errors.ts:
CLIErrorProjectCreationErrorUserCancelledError
Template Authoring
Templates live inpackages/template-generator/templates and use Handlebars with custom helpers:
{{ ... }} (Vue/JSX), escape braces:
Testing Guidelines
- Framework:
bun:test - Test files:
*.test.tsnaming convention - Location:
apps/cli/testandpackages/template-generator/test - Add or update tests with behavior changes (especially prompt flows, template output, config validation)
- Keep tests deterministic; reuse shared setup utilities in
apps/cli/test/setup.ts
Linting & Formatting
Before committing, ensure your code passes checks:oxfmtfor formattingoxlintfor linting
Contribution Workflow
Create an issue
If one doesn’t exist, create an issue describing:
- The bug or feature request
- Steps to reproduce (for bugs)
- Proposed solution
Commit Conventions
Use Conventional Commits with the appropriate scope:feat(cli): add new CLI featurefix(cli): fix CLI bugfeat(web): add new web featurefix(web): fix web bugchore(web): update dependenciesdocs: update documentationtest(cli): add tests for feature
Pull Request Guidelines
Your PR should include:- Clear summary of changes
- Linked issue (if applicable)
- Verification steps run (
bun run check, relevant tests) - Screenshots/GIFs for web UI changes
- Breaking changes clearly marked (if any)
Available Commands
Getting Help
GitHub Issues
Open an issue for bugs or feature requests
GitHub Discussions
Join discussions for questions or ideas
Discord
Join our Discord for real-time help
Documentation
Check existing issues and PRs for similar work