{"id":19549001,"url":"https://github.com/ashwin-pc/github-admin","last_synced_at":"2025-02-26T06:29:21.061Z","repository":{"id":210502686,"uuid":"725910287","full_name":"ashwin-pc/github-admin","owner":"ashwin-pc","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-01T04:04:56.000Z","size":10896,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T05:18:29.510Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ashwin-pc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-01T05:58:36.000Z","updated_at":"2025-02-01T04:05:00.000Z","dependencies_parsed_at":"2025-02-01T05:28:28.674Z","dependency_job_id":null,"html_url":"https://github.com/ashwin-pc/github-admin","commit_stats":null,"previous_names":["ashwin-pc/github-admin"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashwin-pc%2Fgithub-admin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashwin-pc%2Fgithub-admin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashwin-pc%2Fgithub-admin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashwin-pc%2Fgithub-admin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ashwin-pc","download_url":"https://codeload.github.com/ashwin-pc/github-admin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240806114,"owners_count":19860718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T03:57:38.039Z","updated_at":"2025-02-26T06:29:21.043Z","avatar_url":"https://github.com/ashwin-pc.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Github Admin App\n\n![CI](https://github.com/ashwin-pc/github-admin/actions/workflows/ci.yml/badge.svg)\n![App Screenshot](./docs/github-admin.png)\n\nThis project is a Next.js application used to manage GitHub repositories through a GitHub OAuth integration. It replaces the default Create React App boilerplate.\n\n## Prerequisites\n\n- [Node.js](https://nodejs.org/) (see [.nvmrc](.nvmrc))\n- A GitHub OAuth App with your client ID and secret.  \n  See [GitHub OAuth Apps](https://github.com/settings/developers) for details.\n\n## Getting Started\n\n1. **Clone the repository and install dependencies:**\n\n   ```sh\n   git clone \u003crepository-url\u003e\n   cd \u003crepository-folder\u003e\n   npm install\n   ```\n\n2. **Set environment variables:**\n\n   Create a `.env.local` file in the project root with:\n   ```sh\n   NEXT_PUBLIC_GITHUB_CLIENT_ID=your_client_id\n   GITHUB_CLIENT_SECRET=your_client_secret\n   ```\n   These credentials are used by the Next.js API routes in [src/app/api/auth](src/app/api/auth) to manage GitHub authentication.\n\n3. **Run the development server:**\n\n   Use the following command to start Next.js in development mode:\n   ```sh\n   npm run dev\n   ```\n   Open [http://localhost:3000](http://localhost:3000) to view the app.\n\n## Available Scripts\n\n### `npm run dev`\nStarts the app in development mode with hot reloading.  \nYour GitHub OAuth callback should point to [http://localhost:3000](http://localhost:3000).\n\n### `npm run build`\nBuilds the app for production into the `.next` folder and optimizes the build for best performance.\n\n### `npm start`\nStarts the Next.js server in production mode after a production build.\n\n### `npm test`\nRuns the test suite in interactive watch mode.  \nTests are configured via [src/setupTests.ts](src/setupTests.ts).\n\n### `npm run deploy`\nDeploys a new production build. (Customize this script as needed for your hosting environment.)\n\n## Project Structure\n\n- **src/**  \n  Contains the source code:\n  - `app/` – Next.js pages and layouts.\n  - `components/` – Reusable React components.\n  - `context/` – Application context, including authentication state managed in [`AppContext`](src/components/AppContext.tsx).\n  - `hooks/` – Custom hooks.\n  - `utils/` – Utility functions.\n\n- **next.config.mjs** – Next.js configuration.\n\n- **.env**, **.env.local** – Environment variable files.\n\n## Authentication Flow\n\n- The login button in [`src/components/Header.tsx`](src/components/Header.tsx) triggers GitHub OAuth.\n- After successful authentication, GitHub redirects back and the code is exchanged for an access token in the API route at [`src/app/api/auth/token/route.ts`](src/app/api/auth/token/route.ts).\n- The token is stored in cookies and the authentication state is maintained by the application context.\n\n## Learn More\n\n- [Next.js Documentation](https://nextjs.org/docs)\n- [GitHub OAuth Documentation](https://docs.github.com/en/developers/apps/building-oauth-apps)\n- [React Documentation](https://reactjs.org/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashwin-pc%2Fgithub-admin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashwin-pc%2Fgithub-admin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashwin-pc%2Fgithub-admin/lists"}