Fixie is an autonomous dead link fixer for GitHub repositories. It scans markdown files within a repository, identifies broken hyperlinks, replaces them with active snapshots from the Wayback Machine (Archive.org), and automatically opens a pull request with the fixes.
- Submission: A user submits a public GitHub repository URL on the dashboard.
- Queueing: The request is added to a database-backed queue to process sequentially, avoiding rate limits.
- Execution:
- The bot forks the repository.
- It recursively scans all markdown files for links.
- It checks if the links are dead and fetches the closest archive snapshot.
- It commits the changes to a new branch on the fork and creates a pull request to the original repository.
Create a .env file in the root directory with the following variables:
# GitHub Personal Access Token (PAT) for the bot account
GITHUB_BOT_TOKEN="your_github_pat"
# Secret key to secure the cron route from unauthorized access
CRON_SECRET="your_secure_cron_secret"
# Local SQLite database url
DATABASE_URL="file:./dev.db"
# Turso serverless SQLite configuration (optional for production deployment)
TURSO_DATABASE_URL="libsql://your-database.turso.io"
TURSO_AUTH_TOKEN="your_turso_auth_token"First, install the dependencies:
npm installGenerate the Prisma client:
npx prisma generateCreate database tables:
- For local development:
npx prisma db push - For Turso:
node init-turso.mjs
Run the development server:
npm run devOpen http://localhost:3000 in your browser.
You can deploy the application on Vercel.
- Ensure all environment variables are added in the Vercel project settings.
- To run the queue processing periodically, configure an external cron service (like cron-job.org) to ping
https://your-domain.vercel.app/api/process-queuewith the headerAuthorization: Bearer <your_cron_secret>.