Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
d52a040
feat: Add dynamic port finding for server and development
y4mau Jul 26, 2025
fb267a9
🔧 chore: Add GitHub OAuth dependencies and configuration
y4mau Jul 27, 2025
6847896
✨ feat: Create GitHub OAuth strategy with account restrictions
y4mau Jul 27, 2025
c5ab1a2
🗃️ feat: Update database schema and server for GitHub OAuth
y4mau Jul 27, 2025
986df8b
✨ feat: Implement GitHub OAuth endpoints and middleware
y4mau Jul 27, 2025
3a00cca
✨ feat: Add RequireGithubAuth component and API endpoints
y4mau Jul 27, 2025
bcc1830
♻️ refactor: Replace local auth with GitHub OAuth only
y4mau Jul 27, 2025
3db22d5
✨ feat: Add logout functionality to Quick Settings panel
y4mau Jul 27, 2025
a413cf4
📝 docs: Add comprehensive GitHub OAuth setup guide
y4mau Jul 27, 2025
408beeb
💄 style: Remove redundant authentication text
y4mau Jul 28, 2025
7d2a8a5
🎨 style: Clean up GitHub auth implementation files
y4mau Jul 28, 2025
c387591
🔧 chore: Add final newlines to GitHub auth-related files
y4mau Jul 28, 2025
370ed15
build: add react-syntax-highlighter dependency
y4mau Jul 31, 2025
501b9be
feat: create markdown utilities for content extraction
y4mau Jul 31, 2025
78ba4a7
feat: create CodeBlock component with syntax highlighting
y4mau Jul 31, 2025
d284ac1
feat: create lazy loading wrapper for CodeBlock
y4mau Jul 31, 2025
09350a8
feat: create ToolResultRenderer for enhanced tool output
y4mau Jul 31, 2025
a39d9ba
refactor: integrate enhanced markdown rendering in ChatInterface
y4mau Jul 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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

*.sqlite3

# Runtime configuration
.port-config.json
223 changes: 2 additions & 221 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 14 additions & 5 deletions server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
import { dirname } from 'path';
import { findAvailablePort } from '../utils/portFinder.js';
import { savePortConfig } from '../utils/portConfig.js';

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
Expand All @@ -23,8 +25,6 @@ try {
console.log('No .env file found or error reading it:', e.message);
}

console.log('PORT from env:', process.env.PORT);

import express from 'express';
import { WebSocketServer } from 'ws';
import http from 'http';
Expand Down Expand Up @@ -180,13 +180,13 @@ app.use(express.static(path.join(__dirname, '../dist')));

// API Routes (protected)
app.get('/api/config', authenticateToken, (req, res) => {
const host = req.headers.host || `${req.hostname}:${PORT}`;
const host = req.headers.host || `${req.hostname}:${process.env.ACTUAL_PORT || DEFAULT_PORT}`;
const protocol = req.protocol === 'https' || req.get('x-forwarded-proto') === 'https' ? 'wss' : 'ws';

console.log('Config API called - Returning host:', host, 'Protocol:', protocol);

res.json({
serverPort: PORT,
serverPort: process.env.ACTUAL_PORT || DEFAULT_PORT,
wsUrl: `${protocol}://${host}`
});
});
Expand Down Expand Up @@ -978,7 +978,7 @@ async function getFileTree(dirPath, maxDepth = 3, currentDepth = 0, showHidden =
});
}

const PORT = process.env.PORT || 3000;
const DEFAULT_PORT = process.env.PORT || 3000;

// Initialize database and start server
async function startServer() {
Expand All @@ -987,6 +987,15 @@ async function startServer() {
await initializeDatabase();
console.log('✅ Database initialization skipped (testing)');

// Find an available port
const PORT = await findAvailablePort(parseInt(DEFAULT_PORT));

// Export the port for other modules to use
process.env.ACTUAL_PORT = PORT.toString();

// Save port configuration for Vite to use
savePortConfig({ backend: PORT });

server.listen(PORT, '0.0.0.0', async () => {
console.log(`Claude Code UI server running on http://0.0.0.0:${PORT}`);

Expand Down
Loading