Thanks to visit codestin.com
Credit goes to github.com

Skip to content

GitHub-powered portfolio dashboard with OAuth login, repo analytics, pinned projects, and PDF export — built using the latest Next.js stack.

License

Notifications You must be signed in to change notification settings

d43ash1sh/AuthHub

License: MIT

Made with Next.js & TypeScript

Tailwind 4.0 Styled

Live Demo: Coming Soon - Deploy to Vercel

Deployment: See DEPLOYMENT.md for detailed deployment instructions


📖 Table of Contents


ℹ️ About AuthHub

AuthHub lets anyone sign in via GitHub OAuth, fetches their GitHub repositories, and presents them as a neat dashboard:

  • Public repos sorted from most to least starred
  • Total stars, top languages chart, and contribution stats
  • Ability to pin up to 5 repos for highlighting
  • Auto‑generate a PDF portfolio/resume from profile data

Built as a modern tech demonstration of React + Express + TypeScript, AuthHub is ideal for securely showcasing your GitHub work—just like gitforme.tech but customized and extensible.


✨ Features

  1. GitHub OAuth login to securely authenticate users
  2. Repo list includes repo name, description, star count, primary language, and last updated
  3. Star‑based sorting ensures high‑impact repos appear first
  4. Top Languages chart (pie/bar) showing your most-used languages
  5. Contribution summary: commits, PRs, issues over the past year
  6. Repo pinning: select your personal favorites to highlight
  7. Downloadable PDF version of your public profile
  8. Mobile‑friendly, dark mode ready, and accessible UI

🧰 Tech Stack

  • React 18 with TypeScript – Modern, type-safe frontend
  • Express.js with TypeScript – Fast, scalable backend
  • Tailwind CSS with Radix UI for modern styling
  • Vite for fast development and optimized builds
  • Passport.js for GitHub OAuth session management
  • GitHub GraphQL API v4 for real-time data fetching
  • Recharts for beautiful charts and data visualization
  • Puppeteer for PDF generation from styled HTML
  • Drizzle ORM with PostgreSQL (or in-memory for development)

🚀 Getting Started

Prerequisites

Make sure you have:

  • Node.js ≥18 LTS
  • A GitHub Developer App (for OAuth credentials)
  • (Optional) A PostgreSQL / Supabase / Neon database

Installation

git clone https://github.com/d43ash1sh/AuthHub.git  
cd AuthHub  
npm install  

Environment Variables

Create a .env file at root (do not commit this):

GITHUB_CLIENT_ID=deba123  
GITHUB_CLIENT_SECRET=xyz789deba 
SESSION_SECRET=long_random_string  
DATABASE_URL=postgres://debashishbordoloi:pass@host:5432/dbname   # optional  

Development

npm run dev  
# → Visit http://localhost:3000  

Build

npm run build  
npm run start  

🧪 Usage

  1. Click Sign in with GitHub
  2. Authorize the OAuth app
  3. View your repos sorted by star count
  4. Pin any 1–5 repos to the top
  5. Click Download PDF to generate a résumé-style PDF

🧠 API Endpoints

This app uses Express.js API routes:

GET /api/auth/user          → Profile info (avatar, bio, followers)  
GET /api/github/repositories → Sorted repo list via GraphQL  
GET /api/github/profile     → GitHub profile data  
GET /api/github/pinned      → Get pinned repositories  
POST /api/github/repositories/:id/pin → Pin or unpin a repo  
GET /api/generate-pdf       → Generate profile PDF via Puppeteer  

📄 PDF / Portfolio Export

Click Export PDF to generate a PDF via server-side rendering using Puppeteer. The output includes:

  • Profile avatar + bio
  • Contribution totals
  • Pinned repos (with stars & languages)
  • Top Languages chart
  • Download button

🤝 Contributing

Want to improve AuthHub? Contributions are welcome!

  1. Fork the project
  2. Create your feature branch: git checkout -b feature/awesome-feature
  3. Commit your changes: git commit -m 'Add awesome-feature'
  4. Push: git push origin feature/awesome-feature
  5. Open a pull request

Check out CONTRIBUTING.md for code style rules, issue templates, and CI requirements.

🧾 Code of Conduct

This project follows the Contributor Covenant. Please see CODE_OF_CONDUCT.md in the repo for details.

📜 License

Distributed under the MIT License. See LICENSE for more details.

🙏 Acknowledgments

  • Inspired by [gitforme.tech]
  • Based on React + Express + TypeScript Starter
  • Thanks to all open‑source developers and platforms that made this possible. 🙌

📬 Contact

AuthHub by Debashish Bordoloi

About

GitHub-powered portfolio dashboard with OAuth login, repo analytics, pinned projects, and PDF export — built using the latest Next.js stack.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages