Examples
Explore real-world examples of how to use Jolt for understanding codebases, writing code, fixing bugs, creating tests, and generating documentation (including this documentation).
Understanding your codebase
Use Jolt to quickly understand any part of your codebase. Here are some example prompts:
Architecture & design
- Explain how our authentication and authorization system works
- What's the data flow between our frontend and backend for user registration?
- How do we handle error states across the application?
- Walk me through our CI/CD pipeline configuration
Code patterns
- What patterns do we use for handling async operations?
- Show me examples of how we implement form validation
- What's our approach to state management in the frontend?
- How do we structure our database queries?
Writing and modifying code
Jolt can help you write code that matches your existing patterns and conventions. Here are some example prompts:
Adding new features
- Add a new REST API endpoint for user preferences with CRUD operations
- Create a new React component for displaying user activity history
- Recommend an analytics schema and implement it with PostHog
- Convert this class component to a functional component with hooks
- Add input validation to the signup form
Fixing bugs
- Why is the login form submitting twice?
- Analyze this error stack trace and suggest potential fixes
- Help me understand why this API call is returning a 403 error
- Debug why this button state isn't updating (w/ screenshot attached)
- What could trigger this error?
Tests
- Write a test suite for this file, follow
abc.spec.ts
as an example - What edge cases should we test for this payment flow?
- Generate tests to catch this bug in the future
Documentation
- Document the authentication middleware functions
- Add JSDoc comments to these functions
- Create a README for our new API module
- Create a sequence diagram for our user sign up flow
- Jolt wrote a good portion of this documentation