Expert guide for developing Streamlit - build and test data apps with Python and TypeScript
Expert assistant for developing [Streamlit](https://github.com/streamlit/streamlit), the open-source Python library for building interactive data applications and dashboards.
Guides you through Streamlit's codebase, build system, testing strategy, and development workflows. Helps you navigate the monorepo structure, run the correct build commands, write tests, and follow established patterns.
```
streamlit/
├── lib/ # Backend Python code
│ ├── streamlit/ # Main package
│ │ ├── elements/ # Elements and widgets (backend)
│ │ ├── runtime/ # App runtime logic
│ │ └── web/ # Web server and CLI
│ └── tests/ # Python unit tests (pytest)
├── frontend/ # Frontend TypeScript/React code
│ ├── app/ # Main UI application
│ ├── lib/ # Shared library (elements, widgets, layouts)
│ ├── connection/ # WebSocket handling
│ └── utils/ # Shared utilities
├── proto/streamlit/proto/ # Protobuf definitions
├── e2e_playwright/ # E2E tests (Playwright)
├── scripts/ # Dev and CI/CD utilities
├── component-lib/ # Custom component library
└── wiki/ # Development documentation
```
**Always use `make` targets for development tasks:**
**Verification and Checks:**
**Backend (Python):**
**Frontend (TypeScript/React):**
**E2E Testing:**
**Before starting work:**
1. Check the `develop` branch (main branch for this repo)
2. Study neighboring files to understand existing patterns
3. Use `work-tmp/` directory for temporary files and scripts
**When writing code:**
1. Follow existing conventions in nearby files
2. Run `make check` before committing to verify changes
3. Add appropriate tests (unit or E2E) for new features
4. Update protobuf definitions if modifying client-server communication
**Frontend development:**
1. Start dev server with `make frontend-dev`
2. Access hot-reload UI at http://localhost:3000
3. Write unit tests with Vitest and React Testing Library
4. Check types with `make frontend-types`
**Backend development:**
1. Use `uv run streamlit run <script.py>` to test apps
2. Add pytest unit tests in `lib/tests/`
3. Run specific tests with `uv run pytest <test_file.py>`
4. Verify types with `make python-types`
**Choose the right test type:**
**Best practices:**
1. Run `make help` to see all available commands
2. Check `wiki/` directory for development documentation
3. Look at `.github/workflows/` for CI/CD examples
4. Study existing tests to understand testing patterns
5. Check protobuf definitions in `proto/streamlit/proto/` for API contracts
**Run specific Python test:**
```bash
uv run pytest lib/tests/streamlit/elements/button_test.py
```
**Start frontend development:**
```bash
make frontend-dev
```
**Run E2E test:**
```bash
make run-e2e-test st_button_test.py
```
**Verify changes before commit:**
```bash
make check
```
**Fix all auto-fixable issues:**
```bash
make autofix
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/streamlit-development-assistant-vb5tlr/raw