A web application that automates the process of syncing your Replit projects to GitHub repositories.
- GitHub Integration: Connect your GitHub account using a personal access token
- Project Management: View and manage all your Replit projects from a dashboard
- Automated Sync: One-click sync of projects to GitHub repositories
- Configuration Options: Set repository names, descriptions, privacy settings, and auto-sync
- Real-time Status: Track sync progress and view error details
- Batch Operations: Sync multiple projects at once
- Frontend: React with TypeScript, Vite, Tailwind CSS, shadcn/ui
- Backend: Node.js with Express.js and TypeScript
- Database: PostgreSQL with Drizzle ORM (in-memory storage for demo)
- External APIs: GitHub API via Octokit
- Node.js 20 or higher
- npm or yarn package manager
- GitHub personal access token
- Extract all files to your desired directory
- Install dependencies:
npm install
-
GitHub Token: You'll need a GitHub personal access token with repository permissions:
- Go to https://github.com/settings/tokens/new
- Select "Generate new token (classic)"
- Give it a name like "Replit Sync Tool"
- Select scopes:
repo,user:email - Copy the generated token
-
Environment Variables (optional): Create a
.envfile in the root directory:GIT_USER_NAME=Your Name GIT_USER_EMAIL=your.email@example.com
Start the development server:
npm run devThe application will be available at http://localhost:5000
- Connect GitHub: Enter your GitHub personal access token on the setup page
- View Projects: Browse your Replit projects in the dashboard
- Configure Sync: Click the settings icon to configure repository settings
- Sync Projects: Use individual sync buttons or "Sync All" for batch operations
- Monitor Progress: Track sync status and view GitHub links for completed syncs
├── client/ # React frontend
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── hooks/ # Custom React hooks
│ │ ├── lib/ # Utility functions
│ │ └── pages/ # Application pages
├── server/ # Express.js backend
│ ├── services/ # Business logic services
│ ├── index.ts # Server entry point
│ ├── routes.ts # API routes
│ └── storage.ts # Data storage layer
├── shared/ # Shared TypeScript types
└── package.json # Dependencies and scripts
GET /api/github/config- Check GitHub connection statusPOST /api/github/connect- Connect GitHub accountDELETE /api/github/disconnect- Disconnect GitHub accountGET /api/projects- Get all projectsPOST /api/projects- Create new projectPATCH /api/projects/:id- Update project configurationPOST /api/projects/:id/sync- Sync project to GitHub
npm run dev- Start development server with hot reloadnpm run build- Build for productionnpm run preview- Preview production build
The application uses the following main entities:
- Users: Basic user authentication
- GitHub Configs: Store GitHub tokens and usernames
- Projects: Replit projects with sync configuration
- GitHub tokens are stored securely and never logged
- All API calls use proper authentication
- Repository creation respects privacy settings
- Tokens are validated before storage
- Currently uses in-memory storage (data resets on restart)
- Demo mode with hardcoded user ID
- Simulated file copying (real implementation would use Replit API)
This is a demo application. For production use, consider:
- Implementing proper user authentication
- Adding PostgreSQL database persistence
- Integrating with actual Replit API
- Adding comprehensive error handling
- Implementing rate limiting and security measures
MIT License - Feel free to modify and use as needed.