Skip to content

SidinGit/DevsOnGithub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Devs On Github

Built using the GitHub API, authenticated with PassportJS to find developers, explore, like projects, and filter repositories.

About the Project

  • Tech Stack: MERN (MongoDB, Express, React, Node.js) with TailwindCSS and GitHub API integration.
  • Authentication: Secure GitHub OAuth implemented using Passport.js.
  • Features: Fetch and display GitHub user profiles and repositories.
  • Client-Side Functionality: Efficient repository filtering.

Passport JS authentication overview

Deployment Steps

1. SETUP server.js (express.static, res.sendFile, path for react app)

const __dirname = path.resolve();
app.use(express.static(path.join(__dirname, "/frontend/dist")));
app.get("*", (req, res) => {
  res.sendFile(path.join(__dirname, "frontend", "dist", "index.html"));
});

2. SETUP "build" and "start" scripts in package.json

"scripts": {
    "dev": "nodemon backend/server.js",
    "build": "npm install && npm install --prefix frontend && npm run build --prefix frontend", // build
    "start": "node backend/server.js" // start
  }

3. Deploy with env variables

4. Update Github OAuth App (homepage url and callback url)

5. Add CLIENT_BASE_URL as env variable on render(or a deployment service of your choice)

6. Update the callback url on github.auth.js to full url (deployed url)

callbackURL: "deployed-url/api/auth/github/callback"

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published