A modern desktop application for managing SQL Server database connections and performing BACPAC export/import operations. Built with Tauri, React, and Rust for a fast, lightweight, and cross-platform experience.
- Connection Management: Store and manage multiple SQL Server connection profiles
- BACPAC Export: Export SQL Server databases to BACPAC files for backup and migration
- BACPAC Import: Import BACPAC files into SQL Server databases
- Authentication Support:
- Windows Authentication
- SQL Server Authentication
- Security Options:
- Trust Server Certificate
- Encrypt connection
- Theme Support: Light, dark, and system themes
- Persistent Storage: SQLite-based local storage for connection profiles
- Cross-Platform: Built with Tauri for native performance on Windows, macOS, and Linux
Before running Shapac Tool, ensure you have the following installed:
-
Microsoft SqlPackage - Required for BACPAC operations
- Windows: Download from Microsoft SqlPackage
- macOS/Linux: Install via dotnet tool:
dotnet tool install -g microsoft.sqlpackage
-
Node.js (v18 or higher) - For development
-
Rust (latest stable) - For development
-
SQL Server - The target database server
Download the latest release for your platform from the Releases page.
-
Clone the repository:
git clone https://github.com/your-username/shapac-tool.git cd shapac-tool -
Install dependencies:
npm install
-
Build and run:
npm run tauri build
- Click the "New Connection" button to add a SQL Server connection
- Fill in the connection details:
- Connection name (for easy identification)
- Server address
- Port (optional, defaults to 1433)
- Database name (optional)
- Authentication method (Windows or SQL Server)
- Security options (Trust Server Certificate, Encrypt)
- Click "Save" to store the connection
- Select a connection from your saved connections list
- Click the Export button
- Choose the database to export (if not specified in the connection)
- Select the output location for the BACPAC file
- Monitor the progress and wait for completion
- Click the "Import" button in the toolbar
- Choose between:
- Use Saved Connection: Select an existing connection profile
- Enter Details: Provide connection details manually
- Select the BACPAC file to import
- Specify the target database name
- Monitor the progress and wait for completion
Access the settings dialog to customize:
- Theme: Choose between Light, Dark, or System theme
- Additional preferences as they become available
shapac-tool/
├── src/ # React frontend source
│ ├── components/ # React components
│ ├── hooks/ # Custom React hooks
│ ├── utils/ # Utility functions
│ ├── contexts/ # React contexts
│ └── types/ # TypeScript type definitions
├── src-tauri/ # Rust backend source
│ └── src/
│ ├── commands/ # Tauri command handlers
│ ├── db/ # Database operations
│ ├── models/ # Data models
│ └── utils/ # Utility functions
└── public/ # Static assets
Frontend:
- React 19
- TypeScript
- Vite
Backend:
- Rust
- Tauri 2.0
- SQLite (via rusqlite)
- Tokio (async runtime)
Dependencies:
- @tauri-apps/api - Frontend-backend communication
- @tauri-apps/plugin-dialog - File dialogs
- @tauri-apps/plugin-opener - System opener
- serde - Serialization/deserialization
- chrono - Date/time handling
Start the development server:
npm run devBuild for production:
npm run build
npm run tauri buildRun Tauri development mode:
npm run tauri dev- Frontend: Add components in
src/components/and hooks insrc/hooks/ - Backend: Add commands in
src-tauri/src/commands/and register them inlib.rs - Database: Update models in
src-tauri/src/models/and migrations insrc-tauri/src/db/
Shapac Tool uses a modern desktop application architecture:
- UI Layer: React-based frontend provides an intuitive user interface
- Application Layer: Tauri bridges the frontend with the Rust backend
- Business Logic: Rust backend handles:
- Connection management
- SqlPackage command execution
- Database operations (SQLite)
- File system operations
- Storage Layer: SQLite stores connection profiles and preferences locally
If the application shows "SqlPackage is not installed":
- Verify SqlPackage is installed:
sqlpackage /version - Ensure SqlPackage is in your system PATH
- Restart the application after installation
- Verify SQL Server is running and accessible
- Check firewall settings allow connections on the specified port
- Ensure credentials are correct
- Try enabling "Trust Server Certificate" if using self-signed certificates
- Check you have sufficient permissions on the SQL Server
- Ensure sufficient disk space for BACPAC files
- Verify the database name is correct
- Check SqlPackage logs for detailed error messages
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Tauri
- Uses Microsoft SqlPackage for BACPAC operations
- Developed by Shesha.io
For issues, questions, or suggestions, please open an issue on the GitHub repository.