Skip to content

Conversation

kei9o
Copy link

@kei9o kei9o commented Jul 28, 2025

No description provided.

kei9o and others added 12 commits July 26, 2025 20:11
Implement automatic port discovery to avoid conflicts
- Add port finder utility to check and find available ports
- Add port configuration manager to share ports between processes
- Update server to dynamically find available port on startup
- Update Vite config to read backend port and find its own port
- Add .port-config.json to gitignore for runtime configuration
- Remove deprecated @anthropic-ai/claude-code dependency
- Bump version to 1.5.0

This ensures the application can run even when default ports are occupied
- Add passport, passport-github2, express-session, connect-sqlite3
- Update .env.example with GitHub OAuth configuration
- Add environment variables for client ID, secret, allowed users

Co-Authored-By: Claude <noreply@anthropic.com>
- Add GitHub OAuth passport strategy
- Implement allowed users check based on environment variable
- Create env.js to load environment variables early
- Add user serialization/deserialization for sessions

Co-Authored-By: Claude <noreply@anthropic.com>
- Add GitHub-specific columns to users table (github_id, avatar_url, etc)
- Create sessions table for OAuth state management
- Add GitHub user database operations
- Configure express-session with SQLite store
- Initialize passport in server middleware

Co-Authored-By: Claude <noreply@anthropic.com>
- Add /api/auth/github and callback endpoints
- Create requireGithubAuth middleware
- Update auth status to include GitHub configuration info
- Add GitHub user check endpoint
- Disable local login/register endpoints

Co-Authored-By: Claude <noreply@anthropic.com>
- Create RequireGithubAuth wrapper component
- Add GitHub status and user check API methods
- Enable GitHub authentication flow in frontend

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove username/password fields from LoginForm and SetupForm
- Remove login/register functions from AuthContext
- Update UI to show only GitHub sign-in button
- Add GitHub configuration status display
- Show allowed users when configured

Co-Authored-By: Claude <noreply@anthropic.com>
- Display user info with GitHub avatar and username
- Add logout button with icon
- Show email if available
- Create account section in settings

Co-Authored-By: Claude <noreply@anthropic.com>
- Document OAuth app creation steps
- Provide environment variable configuration
- Include testing procedures
- Add troubleshooting section
- Cover security considerations

Co-Authored-By: Claude <noreply@anthropic.com>
Remove "Authentication is managed through GitHub OAuth" message
from both LoginForm and SetupForm components to simplify UI

Co-Authored-By: Claude <noreply@anthropic.com>
Remove unnecessary comments, trailing spaces, and ensure final newlines
- Remove obvious implementation comments
- Fix trailing whitespace issues
- Add missing final newlines to all modified files
- Maintain code functionality while improving readability
Ensure auth-related files end with proper newline character
- GITHUB_OAUTH_SETUP.md
- server/auth/passport.js
- server/database/db.js
- server/middleware/auth.js
- src/components/ProtectedRoute.jsx
- src/components/RequireGithubAuth.jsx
- src/components/SetupForm.jsx
- src/utils/api.js
@kei9o kei9o force-pushed the render-markdown branch 2 times, most recently from 03f268d to 4220a80 Compare July 29, 2025 06:49
@kei9o kei9o force-pushed the render-markdown branch from 144d30d to a39d9ba Compare July 31, 2025 02:41
Copy link

@muppala749 muppala749 left a comment

Choose a reason for hiding this comment

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

Implement automatic port discovery to avoid conflicts

  • Add port finder utility to check and find available ports
  • Add port configuration manager to share ports between processes
  • Update server to dynamically find available port on startup
  • Update Vite config to read backend port and find its own port
  • Add .port-config.json to gitignore for runtime configuration
  • Remove deprecated @anthropic-ai/claude-code dependency
  • Bump version to 1.5.0

Copy link

@muppala749 muppala749 left a comment

Choose a reason for hiding this comment

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

  • Check if a port is available

  • @param {number} port - Port to check

  • @returns {Promise} - True if port is available
    */
    export function isPortAvailable(port) {
    return new Promise((resolve) => {
    const server = net.createServer();

    server.once('error', (err) => {
    if (err.code === 'EADDRINUSE') {
    resolve(false);
    } else {
    resolve(false);
    }
    });

    server.once('listening', () => {
    server.close();
    resolve(true);
    });

@@ -104,4 +104,7 @@ temp/
# Database files
*.db
*.sqlite
*.sqlite3

Choose a reason for hiding this comment

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

.port--config.json

@Anthropic-AI?claude
server?utils

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.

2 participants