Skip to content

Conversation

@anschmieg
Copy link

Summary

This PR improves the documentation and standardizes the frontend port configuration.

Changes

Port Standardization

  • Update all port references from 3000 to 5173 (Vite's default)
  • Update README.md instructions
  • Update .env.example with correct FRONTEND_URL
  • Remove hardcoded port 3000 from CORS configuration
  • Fix incorrect port in test file (was 3000, should be 8000)

OAuth Documentation

  • Add step-by-step GitHub OAuth App setup instructions
  • Document the required callback URL
  • Clarify OAuth scopes used (user:email and repo)
  • Note the distinction between OAuth Apps and GitHub Apps

Testing

  1. Run npm run start:frontend - should start on port 5173
  2. Follow the new OAuth setup instructions in README

- Update README.md to reference port 5173 instead of 3000
- Update .env.example FRONTEND_URL to port 5173
- Remove hardcoded port 3000 from server.js CORS origins
- Fix test file API_BASE_URL to use correct backend port 8000
- Add numbered instructions for creating OAuth App at github.com/settings/developers
- Document the required callback URL: http://localhost:8000/api/auth/github/callback
- Clarify OAuth scopes used (user:email, repo)
- Note distinction between OAuth Apps and GitHub Apps
Copilot AI review requested due to automatic review settings December 10, 2025 10:31
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR standardizes the frontend port configuration from 3000 to 5173 (Vite's default) and significantly improves the developer onboarding experience by adding detailed GitHub OAuth setup instructions.

Key Changes:

  • Standardized all port references to 5173 for frontend and 8000 for backend
  • Added comprehensive step-by-step GitHub OAuth App setup guide
  • Fixed incorrect backend port reference in integration tests (3000 → 8000)

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
backend/test/cache.integration.test.js Updated backend API port from 3000 to 8000 and applied consistent indentation formatting
backend/src/server.js Removed hardcoded port 3000 from CORS origin array, keeping only the configured frontend URL
backend/.env.example Updated FRONTEND_URL from port 3000 to 5173 to match Vite's default
README.md Updated all port references, added detailed GitHub OAuth setup instructions with callback URLs and required scopes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

origin: [FRONTEND_URL, 'http://localhost:3000', 'http://localhost:5173'],
origin: [FRONTEND_URL, 'http://localhost:5173'],
credentials: true
})); // Allow requests from multiple frontend ports
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment "Allow requests from multiple frontend ports" is misleading since the CORS configuration now only allows one frontend port (5173). The comment should be updated to reflect this change, or removed entirely since it now only allows the configured FRONTEND_URL and its default fallback.

Suggested change
})); // Allow requests from multiple frontend ports
}));

Copilot uses AI. Check for mistakes.
Comment on lines +18 to 20
origin: [FRONTEND_URL, 'http://localhost:5173'],
credentials: true
})); // Allow requests from multiple frontend ports
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The CORS origin array includes both FRONTEND_URL (which defaults to 'http://localhost:5173') and the hardcoded 'http://localhost:5173'. This creates redundancy when FRONTEND_URL is not explicitly set. Consider simplifying to just origin: FRONTEND_URL or keeping the array format only if multiple origins are genuinely needed for different deployment scenarios.

Suggested change
origin: [FRONTEND_URL, 'http://localhost:5173'],
credentials: true
})); // Allow requests from multiple frontend ports
origin: FRONTEND_URL,
credentials: true
})); // Allow requests from the frontend URL

Copilot uses AI. Check for mistakes.
Comment on lines +74 to +75
Note: For the backend to start successfully you must set the GitHub OAuth environment variables in backend/.env (GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET). If these are not present the authentication routes will fail and the app may not start depending on your local configuration.

Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] This note is a single, very long sentence that's difficult to read. Consider breaking it into multiple sentences or using a bulleted list for better readability. For example:

"Note: For the backend to start successfully, you must set the GitHub OAuth environment variables in backend/.env:

  • GITHUB_CLIENT_ID
  • GITHUB_CLIENT_SECRET

If these are not present, the authentication routes will fail and the app may not start depending on your local configuration."

Suggested change
Note: For the backend to start successfully you must set the GitHub OAuth environment variables in backend/.env (GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET). If these are not present the authentication routes will fail and the app may not start depending on your local configuration.
**Note:** For the backend to start successfully, you must set the GitHub OAuth environment variables in `backend/.env`:
- `GITHUB_CLIENT_ID`
- `GITHUB_CLIENT_SECRET`
If these are not present, the authentication routes will fail and the app may not start depending on your local configuration.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant