The full-stack web application has been successfully created and is ready to use.
✅ Backend (Node.js + Express)
- GitHub API integration
- SQLite database for data persistence
- Daily cron job (9:00 AM UTC) to fetch commits
- RESTful API endpoints
✅ Frontend (React + Vite + Tailwind)
- Modern, responsive UI
- User setup flow
- Real-time commit display
- Manual refresh capability
✅ Features
- Enter GitHub username
- Select from available repositories
- View 10 random commits daily
- Automatic daily updates
- Manual refresh option
-
Start the application:
npm run dev
Or double-click
start.baton Windows -
Open your browser: Navigate to
http://localhost:3000 -
Enter a GitHub username: Type any public GitHub username (e.g., "facebook", "microsoft", "vercel")
-
Select a repository: Choose from the list of available repositories
-
View commits: The app will display 10 random commits from your selected repository
-
Manual refresh: Click "Refresh Now" to fetch commits immediately
GET /api/health- Server statusGET /api/repositories/:username- Get user repositoriesPOST /api/preferences- Save user preferenceGET /api/commits/:username- Get daily commitsPOST /api/trigger-fetch- Manual commit fetch
The application automatically:
- Runs daily at 9:00 AM UTC
- Fetches commits from all registered users
- Selects 10 random commits per user
- Stores them in the database
-
Test with a popular repository:
- Enter username: "facebook"
- Select repository: "react"
- Click "Refresh Now" to fetch commits immediately
-
Test with your own repository:
- Enter your GitHub username
- Select one of your repositories
- View your commits
- Server not starting: Check if port 5000 is available
- Frontend not loading: Check if port 3000 is available
- GitHub API errors: The app works without authentication, but rate limits apply
- Database issues: SQLite database is created automatically
- Customize the cron schedule in
server/index.jsif needed - Add GitHub token in
.envfor higher API rate limits - Deploy to production using your preferred hosting service
- Add authentication if needed for production use
auto-commits/
├── server/ # Backend
│ ├── index.js # Main server + API routes
│ ├── database.js # SQLite operations
│ └── github.js # GitHub API integration
├── client/ # Frontend
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── utils/ # API utilities
│ │ └── App.jsx # Main app
│ └── package.json
└── package.json # Root dependencies
🎉 Your application is ready to use! Start it with npm run dev and enjoy your daily GitHub commits!