A data conversion tool built with TanStack Start, designed to convert data from various platforms to Rote format.
- Multi-platform support: Currently supports converting from Memos to Rote format
- Dual input modes:
- API mode: Fetch data directly from platform API
- File mode: Upload data file (JSON or SQLite) for conversion
- Real-time feedback: Progress indicators and detailed conversion statistics
- User-friendly interface: Simple and intuitive design with responsive layout
- Internationalization: Support for Chinese and English languages
- Downloadable output: Convert data to Rote format and download as JSON file
- Framework: TanStack Start (React + Vite)
- Routing: TanStack Router (file-based routing)
- Styling: Tailwind CSS v4
- UI Components: shadcn/ui + Radix UI
- Icons: Lucide React
- Testing: Vitest with Testing Library
- Build: Vite
- Internationalization: i18next
- Node.js 18+
- Bun (recommended) or npm/pnpm
# Install dependencies
bun install
# Start development server on port 4000
bun run dev
# Build for production
bun run build
# Preview production build
bun run preview- Select Platform: Choose the source platform from the available options (currently Memos)
- Choose Input Mode:
- API Mode: Enter platform API endpoint and access token
- File Mode: Upload JSON or SQLite file containing your data
- Start Conversion: Click "Start Conversion" button
- View Results: Monitor conversion progress and view detailed statistics
- Download Output: Download the converted Rote format data file
Rerote/
├── src/
│ ├── components/
│ │ ├── converter/ # Converter UI components
│ │ ├── ui/ # Reusable UI components (shadcn/ui)
│ │ ├── Footer.tsx # Footer component
│ │ ├── logo.tsx # Logo component
│ │ └── not-found.tsx # 404 page
│ ├── lib/
│ │ ├── converters/ # Platform-specific conversion logic
│ │ │ ├── index.ts # Converter interface and registry
│ │ │ ├── memos-to-rote.ts # Memos to Rote converter
│ │ │ ├── memos-api.ts # Memos API client
│ │ │ └── types.ts # Shared types across converters
│ │ ├── i18n/ # Internationalization configuration
│ │ └── utils/ # Utility functions (file operations, etc.)
│ ├── routes/ # File-based routes
│ │ ├── __root.tsx # Root layout
│ │ ├── index.tsx # Home page
│ │ └── converter.tsx # Converter page
│ └── styles.css # Global styles
├── package.json
├── tsconfig.json
├── vite.config.ts
└── README.md
To add support for a new platform:
- Create a new converter file in
src/lib/converters/(e.g.,notion-to-rote.ts) - Add the platform to the
Platformenum insrc/lib/converters/index.ts - Define source types for the platform in
src/lib/converters/types.ts - Implement the
Converterinterface withvalidate()andconvert()methods - Add the converter to the
convertersarray insrc/lib/converters/index.ts
# Start dev server
bun run dev
# Build for production
bun run build
# Run tests (Vitest)
bun run test
# Run ESLint
bun run lint
# Fix ESLint errors
bun run lint:fix
# Check Prettier formatting
bun run format
# Fix Prettier formatting
bun run format:fix
# Format and fix all issues
bun run checkThe converter system follows a plugin-based architecture:
-
Converter Interface: Each platform implements a
Converterinterface with:validate(data): Check if data can be processed by this converterconvert(data): Transform data to Rote formatsupportedModes: Array of supported input modes (['file'],['api'], or both)
-
Data Flow:
- User selects platform and input mode
- Converter validates input data
- Data is transformed to Rote format
ConversionResultis produced with statistics and errors- Output is downloadable as JSON
- Memos:
- API: Direct API access
- File: JSON export or SQLite database file (
.db,.sqlite,.sqlite3)
- Rote: Standardized JSON format for notes and data
MIT License
Contributions are welcome! Please feel free to submit a Pull Request.