A full-stack application that displays GitHub repositories and provides detailed metadata per repository, including size, visibility, file count, YAML file contents, and active webhooks.
Built with:
- Node.js + Apollo Server (GraphQL)
- React (Vite)
- GitHub GraphQL & REST APIs
- Node.js v18+
- A GitHub Personal Access Token (PAT) with:
repoadmin:repo_hook
- Your GitHub username
git clone https://github.com/your-username/github-scanner.git
cd github-scannerCreate a .env file in the server directory:
GITHUB_TOKEN=your_personal_access_token
GITHUB_USERNAME=your_github_username
cd server
npm install
node index.jsThe GraphQL server will be running at:
http://localhost:4000
You can access the GraphQL Playground there for testing queries.
In a separate terminal window:
cd client
npm install
npm run devVisit the app in your browser:
http://localhost:3000
Ensure the backend is running first so the client can query data.
- π List all repositories of a GitHub user
- π View:
- Repository name, size, visibility
- Total number of files
- YAML file content (first one found)
- Active webhooks
List Repositories
query {
repositories {
name
size
owner
}
}Get Repository Details
query {
repoDetails(owner: "your-username", name: "repo-name") {
name
size
owner
isPrivate
numberOfFiles
ymlContent
activeWebhooks
}
}github-scanner/
βββ client/ # React frontend
β βββ src/
βββ server/ # Node.js GraphQL API
β βββ index.js
β βββ schema.js
βββ README.md