Integrations
Connect a project to the tools you ship with. Two providers are supported today: GitHub and Vercel. Each connection belongs to a single project, or you can connect a provider once for your whole team and reuse it across projects.
Providers
| Provider | What you get |
|---|---|
| GitHub | Link a repository and branch to the project, then see its recent commits and branches in the dashboard. |
| Vercel | Link a Vercel project, see its deployments, and sync your basefyio environment variables to it in one click. |
In the dashboard
Open your project and choose Integrations.
- GitHub — use the team's GitHub connection or provide a token, select a repository, then pick a branch (defaults to
main). Disconnect removes the link. - Vercel — use the team's Vercel connection or provide a token, then select a Vercel project. Save Environment Variables pushes the variables below to that project; Disconnect removes the link.
- Team connections — a team can connect GitHub (OAuth or a personal access token) and Vercel once, and each project then picks the team connection instead of its own token.
Variables synced to Vercel
| Variable | Value |
|---|---|
NEXT_PUBLIC_BASEFYIO_URL | The project's API base URL |
NEXT_PUBLIC_BASEFYIO_ANON_KEY | The anon key |
BASEFYIO_SERVICE_ROLE_KEY | The service key — keep it server-side |
DATABASE_URL, DIRECT_URL | Pooled and direct database connection strings |
PROJECT_ID | The project id |
Existing variables with the same name are updated; the response reports how many were created and updated.
REST API
Routes are under https://api.basefyio.com/api/projects/:projectId/integrations and need a dashboard session.
| Method | Path | Description |
|---|---|---|
| PUT | /github | Connect { owner, repo, branch?, token? | useTeamToken, teamId? } |
| GET | /github | Connection status |
| DELETE | /github | Disconnect |
| GET | /github/repos | List the token's repositories (?token=) |
| GET | /github/commits | Recent commits of the linked repository |
| GET | /github/branches | Branches of the linked repository |
| PUT | /vercel | Connect { projectId, teamId?, token? | useTeamToken, sourceTeamId? } |
| GET | /vercel | Connection status |
| DELETE | /vercel | Disconnect |
| GET | /vercel/projects | List Vercel projects (?token=&teamId=) |
| GET | /vercel/deployments | Recent deployments |
| POST | /vercel/sync-env | Push the variables above to the linked Vercel project |
# Connect a GitHub repository, then read its latest commits
curl -s -X PUT https://api.basefyio.com/api/projects/$PROJECT_ID/integrations/github \
-H "Authorization: Bearer $SESSION_TOKEN" -H "Content-Type: application/json" \
-d '{"token":"ghp_...","owner":"my-org","repo":"my-app","branch":"main"}'
curl -s https://api.basefyio.com/api/projects/$PROJECT_ID/integrations/github/commits \
-H "Authorization: Bearer $SESSION_TOKEN"Notes
- Connecting needs a token with access to the repository or Vercel project, or a team connection that already has one.
- Syncing writes your service key into Vercel; only link a Vercel project you trust with it.
- Integrations are managed from the dashboard session; they are not available with a project API key.