Content synchronization magic for your Strapi CMS environments!
2.0K
Content synchronization magic for your Strapi CMS environments!

StrapiSync is a synchronization tool for Strapi CMS that allows you to manage and synchronize content between different Strapi instances. It provides a user-friendly interface for reviewing, selecting, and merging content changes across environments.
StrapiSync is built with:
The application can be configured through environment variables or the application.conf file:
PORT: HTTP port (default: 8080)HOST: Host address (default: 0.0.0.0)DEVELOPMENT_MODE: Enable development mode (default: true)JDBC_DATABASE_URL: JDBC URL for PostgreSQL (default: jdbc:postgresql://localhost:5432/strapisync)JDBC_DATABASE_USERNAME: Database username (default: postgres)JDBC_DATABASE_PASSWORD: Database password (default: postgres)JDBC_MAXIMUM_POOL_SIZE: Maximum pool size for database connections (default: 3)DB_SALT: Salt used for database encryption (required, no default)DATA_FOLDER: Folder for storing temporary data (default: data)STRAPI_CLIENT_TIMEOUT: Timeout for Strapi API requests in milliseconds (default: 30000)STRAPI_CLIENT_MAX_RETRIES: Maximum retries for Strapi API requests (default: 3)./gradlew build
./gradlew run
./gradlew jibDockerBuild
Configure Strapi Instances:
Create Merge Requests:
Complete Merges:
The backend is built with Kotlin and Ktor:
./gradlew run
The frontend is built with React:
cd frontend
npm install
npm start
The merge request workflow in StrapiSync involves several technical steps that interact with Strapi APIs:
Creation: When a merge request is created, the system stores information about source and target Strapi instances in the database.
Schema Compatibility Check: The system queries both Strapi instances via their APIs to retrieve content types and component schemas, then compares them to ensure compatibility.
Content Comparison: StrapiSync fetches content from both instances using Strapi's REST API, comparing entries to identify differences. This involves:
Selection Process: Users select which content to synchronize, and the system tracks these selections in the database.
Merge Execution: When completing a merge request, the system:
Status Updates: Throughout the process, the merge request status is updated in the database to reflect progress.
All API interactions use the Strapi REST API with proper authentication, handling pagination, and managing relationships between content types.
This project was born out of a personal itch that needed scratching! I built StrapiSync Wizard in a relatively short time to solve a specific problem I was facing with content synchronization between Strapi environments.
Is the code architecture perfect? Absolutely not! Did I follow all the best practices? Probably missed a few (or many)! But hey, it works, and that's what matters. The code might make seasoned developers cringe a bit, but it gets the job done.
If you're brave enough to continue this project or want to improve it, you're more than welcome to jump in. Just remember to bring your sense of humor and a lot of patience. The codebase might be a bit... let's say "creatively organized," but it's a fun challenge for anyone who enjoys untangling spaghetti code!
This project is licensed under the MIT License - see the LICENSE file for details.
Content type
Image
Digest
sha256:53748fbcc…
Size
155.5 MB
Last updated
about 1 month ago
docker pull isebben/strapi-sync-wizard