How the API works:
1. /api/repos (GET): Fetches all repositories from the database.
2. /api/repos/{username} (GET): Fetches repositories for a specific user.
3. /api/deploy/{repo_id} (GET/POST): Trigger a deployment using repo_id. The server downloads the code from GitHub using git_url and git_token, then deploys to Cloudflare Pages.
4. /api/deploy/{repo_id}/domain (GET): Retrieve the deployment domain for a repository.
5. /api/logs (GET): Retrieve recent server logs. Use ?project_id={repo_id} to filter logs for a specific deployment.
6. /api/health (GET): Checks if the deployment server is running.