Contributing
Help make StackKit better. Learn how to report bugs, suggest features, and contribute code.
StackKit is open source and contributions are very welcome. Whether you're fixing a typo, reporting a bug, or adding a new module — every contribution matters.
Ways to contribute
- Report a bug — Something broken? Open a bug report with steps to reproduce.
- Suggest a feature — Have an idea for a new module or improvement? Open a feature request.
- Improve the docs — Found a confusing explanation or a missing example? Send a PR.
- Fix a bug — Browse open issues and pick one to work on.
- Add a module — Implement a new integration (e.g., a different auth provider or storage service).
Development setup
Fork and clone the repository
git clone https://github.com/tariqul420/stackkit.git
cd stackkitBuild all packages
pnpm buildTest your changes
To test the CLI locally without publishing:
cd apps/stackkit
node bin/stackkit.js create test-appProject structure
Understanding the repo layout will help you find where to make changes:
stackkit/
├── apps/
│ ├── stackkit/ # The CLI package (published to npm)
│ │ ├── src/ # TypeScript source
│ │ │ ├── cli/ # Command implementations (create, add, doctor, list)
│ │ │ ├── lib/ # Shared utilities (discovery, generation, prompts)
│ │ │ └── types/ # TypeScript type definitions
│ │ └── bin/ # CLI entry point
│ └── docs/ # This documentation site (Next.js + Fumadocs)
├── modules/ # Module definitions
│ ├── auth/ # Authentication modules
│ │ └── better-auth/ # Better Auth files and generator config
│ ├── database/ # Database modules
│ │ ├── prisma/ # Prisma files and generator config
│ │ └── mongoose/ # Mongoose files and generator config
│ ├── storage/ # Storage modules
│ ├── ui/ # UI modules
│ └── components/ # Pre-built UI components
└── templates/ # Base project templates
├── nextjs/ # Next.js template
├── express/ # Express template
└── react/ # React + Vite templateAdding a new module
Each module in the modules/ directory follows the same structure:
modules/<category>/<module-name>/
├── module.json # Module metadata (name, description, frameworks, etc.)
├── generator.json # File operations and conditions
└── files/ # Files to copy into the projectThe generator.json file is declarative — it describes what files to copy, what conditions apply, and what packages to install. You don't need to modify CLI source code to add most modules.
Adding a new template
Templates live in templates/<framework>/. A template is just a complete project structure for that framework. The CLI copies it as-is, then applies any selected modules on top.
When adding a template, make sure it:
- Uses TypeScript with strict mode
- Includes ESLint configuration
- Has a
.env.examplefile - Has a helpful
README.md - Follows the framework's official conventions
Code style
The codebase uses TypeScript and ESLint. Before submitting a PR, make sure your changes pass the linter:
pnpm lintSubmitting a pull request
- Create a branch from
mainwith a descriptive name (e.g.,feat/add-drizzle-moduleorfix/mongoose-connection) - Make your changes
- Test locally with
node bin/stackkit.js - Submit the PR against
mainwith a clear description of what changed and why
For large changes (new modules, template rewrites, architecture changes), open an issue first to discuss the approach before writing code. This avoids wasted effort on work that might not align with the project's direction.
Questions?
Join the Discord server or open a GitHub Discussion — we're happy to help.
Testing
Running Tests
# Run all tests
pnpm test
# Test specific CLI commands
pnpm run test:create
pnpm run test:add
pnpm run test:doctor
# Test documentation build
cd apps/docs && pnpm run types:checkManual Testing
-
Test CLI Commands
# Build and test locally pnpm build node apps/stackkit/bin/stackkit.js --help -
Test Project Generation
# Create a test project mkdir test-project && cd test-project npx ../apps/stackkit/bin/stackkit.js create test-app --yes -
Test Module Addition
cd test-project npx ../apps/stackkit/bin/stackkit.js add --dry-run
Code Quality
TypeScript
- Use strict TypeScript settings
- Add proper type annotations
- Avoid
anytypes
Code Style
- Follow existing patterns in the codebase
- Use meaningful variable and function names
- Add JSDoc comments for public APIs
Error Handling
- Use proper error messages
- Handle edge cases gracefully
- Provide helpful debugging information
Documentation
- Update docs for any new features
- Add code examples where helpful
- Keep API documentation up to date
Need Help? Join our Discord or ask questions in GitHub issues.
License
By contributing to StackKit, you agree that your contributions will be licensed under the MIT License.