This project demonstrates an AI-assisted approach to Test-Driven Development (TDD) using Streamlit, OpenAI's GPT model, and Playwright for testing.
- Define application requirements
- Generate test scenarios based on requirements
- Create Playwright tests automatically
- Build application code iteratively
- Run tests and regenerate code until tests pass
-
Clone the repository:
git clone git@github.com:markoub/pair-programmer.git cd pair-programmer -
Install dependencies:
pip install -r requirements.txt -
Set up your OpenAI API key: Create a file named
.streamlit/secrets.tomland add your API key:OPENAI_API_KEY = "your-api-key-here"
-
Run the Streamlit app:
streamlit run app.py -
Follow the steps in the web interface:
- Define your application
- Generate test scenarios
- Create Playwright tests
- Build your application
- Run tests and iterate
app.py: Main Streamlit applicationsrc/: Contains the core logic for each step of the TDD processprojects/: Stores individual project data and generated codeutils.py: Utility functions for API calls and code generation
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.