A web application that converts Bruno JSON collections to Postman v2.1.0 format with an intuitive drag-and-drop interface.
This tool provides a user-friendly web interface to convert Bruno API collections to Postman format. Built with a clean, modular architecture, this web app offers a modern interface with drag-and-drop functionality, real-time feedback, and automatic downloads.
bruno-converter/
βββ src/
β βββ server.js # Main Express server
β βββ routes/
β β βββ converter.js # API route handlers
β βββ services/
β β βββ bruno-converter.js # Main conversion orchestrator
β βββ mappers/
β β βββ auth-mapper.js # Authentication mapping
β β βββ body-mapper.js # Body/payload mapping
β β βββ url-mapper.js # URL parsing and mapping
β β βββ script-converter.js # Script conversion
β β βββ base-mapper.js # Common utilities
β βββ utils/
β β βββ postman-id.js # ID generation
β β βββ constants.js # Configuration constants
β β βββ validators.js # Input validation
β βββ middleware/
β βββ upload.js # File upload configuration
βββ public/
β βββ index.html # Frontend interface
βββ tests/ # Test files (future)
β βββ unit/
β βββ integration/
β βββ fixtures/
βββ package.json # Dependencies and scripts
βββ README.md # This file
- Node.js (version 14.0.0 or higher)
# Clone or create the project directory
git clone https://github.com/criteo/BrunoToPostman.git
cd BrunoToPostman/
NODE_ENV=production npm ci
Omit NODE_ENV=production
to also install dev dependencies.
Copy all the provided source files to their respective directories:
- Place server files in
src/
- Place frontend file in
public/
- Ensure
package.json
has"main": "src/server.js"
# Start the server (production)
npm start
# Start with auto-restart (development)
npm run dev
# Run tests (when implemented)
npm test
# Check code quality
npm run lint
Open your browser and go to: http://localhost:3000
- Drag & drop file upload with visual feedback
- Clean, responsive design
- Real-time progress indicators
- Automatic file download
- Modular architecture
- File validation (JSON only, 10MB limit)
- Comprehensive error handling
- Conversion statistics display
- RESTful API endpoints
- Works on desktop and mobile
- Visual feedback during conversion
- Success/error notifications
- Reset functionality for multiple conversions
- Detailed error messages
- Modular Design: Separated concerns for maintainability
- Testable: Each component can be unit tested
- Scalable: Easy to add new features and auth types
- Reusable: Core logic works independently of Express
- Professional: Follows Node.js best practices
- Upload: Users drag & drop or select their Bruno JSON file
- Validate: The app checks file type, size, and structure
- Convert: Modular conversion pipeline processes the file
- Download: The converted Postman collection downloads automatically
The converter handles all major Bruno features:
- β Collections & Folders: Complete hierarchy preservation
- β Authentication: Bearer, Basic, API Key, OAuth2, AWS, Digest
- β Variables: Collection, environment, and request-level variables
- β Scripts: Pre-request and test scripts with BrunoβPostman syntax conversion
- β Request Methods: GET, POST, PUT, DELETE, PATCH, etc.
- β Headers: Custom headers with enable/disable state
- β Body Types: JSON, Form-data, URL-encoded, Raw, GraphQL
- β Parameters: Query parameters and path variables
- β URL Structure: Complex URLs with variables and parameters
- β
Path Variables: Both
{{variable}}
and{pathParam}
formats
- Start the server:
npm run dev
- Open http://localhost:3000 in your browser
- Drag your Bruno
.json
file onto the upload area - Click "Convert to Postman"
- The converted file downloads automatically as
.postman_collection.json
The application includes comprehensive error handling for:
- Invalid file formats
- File size limits (10MB max)
- Malformed JSON structure
- Invalid Bruno collection format
- Conversion errors with detailed messages
- Network and server issues
This web app is much more user-friendly than CLI alternatives:
- No file path management - just drag and drop
- Visual feedback - see progress and results in real-time
- Clear error messages - clear, actionable feedback
- Multiple conversions - easily convert many files
- Cross-platform - works on any device with a browser
- No terminal required - accessible to non-technical users
- Structured architecture - maintainable and extensible
Port already in use:
# Kill process on port 3000
npx kill-port 3000
# Or use a different port
PORT=3001 npm start
Module not found errors:
# Reinstall dependencies
npm ci
File upload fails:
- Ensure file is valid JSON format (Bruno exported collection)
- Check file size is under 10MB
- Verify file extension is
.json
- Check browser console for errors
Conversion errors:
- Validate your Bruno JSON structure
- Check server logs for detailed error messages
- Ensure file contains
brunoConfig
section - Try with a simpler collection first
Frontend issues:
- Clear browser cache (Ctrl+Shift+R)
- Check browser Developer Tools console
- Verify server is running on http://localhost:3000
- Routes: Handle HTTP requests and responses
- Services: Core business logic and orchestration
- Mappers: Domain-specific conversion logic
- Utils: Common utilities and helpers
- Middleware: Request processing (upload, validation, etc.)
New Authentication Type:
- Add constant to
src/utils/constants.js
- Add mapper method to
src/mappers/auth-mapper.js
- Update the auth mapping switch statement
New Body Format:
- Add constant to
src/utils/constants.js
- Add mapper method to
src/mappers/body-mapper.js
- Update the body mapping switch statement
# Run unit tests (when implemented)
npm test
# Run with coverage
npm run test:coverage
# Run in watch mode
npm run test:watch
- Fork the repository π΄
- Create your feature branch πΏ
- Write tests for your changes π§ͺ
- Commit your changes πΎ
- Push to the branch β¬οΈ
- Open a Pull Request π₯
If you encounter any issues or have questions:
π¬ Send me a message on Slack β Francesco Aldrovandi
Debugging steps:
- Check the troubleshooting section above
- Review server console logs for detailed error messages
- Ensure your Bruno JSON file is valid and properly formatted
- Test with the health endpoint:
curl http://localhost:3000/health
- Check browser Developer Tools for frontend errors
Built with β€οΈ for the API development community