tRPC Explorer is a lightweight tool for manually testing your tRPC backend. It provides an intuitive interface for interacting with your tRPC endpoints, making development and debugging easier.
- 🌟 Intuitive Interface: User-friendly interface for testing tRPC endpoints.
- 🚀 Fast and Lightweight: Optimized for performance and ease of use.
- 🛠️ Customizable: Easily configure and extend to fit your development needs.
- 🔄 Real-time Updates: Instant feedback on your tRPC requests and responses.
- Node.js (v14 or later)
- npm or yarn
You can install tRPC Explorer via npm:
npm install trpc-explorer
Or with yarn:
yarn add trpc-explorer
To use tRPC Explorer in your project, follow these steps:
-
Import and Initialize:
import { createTRPCExplorer } from 'trpc-explorer'; const explorer = createTRPCExplorer({ url: 'http://localhost:3000/trpc', }); explorer.init();
-
Open in Browser:
Once initialized, open
http://localhost:3000/trpc-explorer
in your browser to start testing your tRPC endpoints.
tRPC Explorer supports various configuration options to customize its behavior. You can pass these options when initializing:
const explorer = createTRPCExplorer({
url: 'http://localhost:3000/trpc',
headers: {
Authorization: 'Bearer YOUR_TOKEN',
},
theme: 'dark', // or 'light'
});
explorer.init();
url
: The URL of your tRPC backend.headers
: Additional headers to include in your requests.theme
: UI theme, either 'light' or 'dark'.
We welcome contributions to improve tRPC Explorer! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request.
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeature
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature/YourFeature
). - Create a new Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- tRPC - The fantastic framework that makes this tool possible.
Enjoy using tRPC Explorer! 🚀
Feel free to customize this README to fit any additional features or specific details about your project.