Files
Dani 6866f91f10 refactor: Reorganize project structure for better maintainability
Moved files to improve project organization:

📦 Scripts → /scripts:
- dev-server.js
- generate_agents_api.py
- generate_claude_jobs.py
- generate_components_json.py
- generate_trending_data.py
- sync-api.sh

📚 Documentation → /docs/guides:
- claude-jobs.md (was CLAUDE_JOBS_README.md)
- deployment.md (was DEPLOYMENT.md)
- discord-bot-setup.md (was DISCORD_BOT_SETUP.md)
- growth-kit-pr.md (was GROWTH_KIT_PR.md)

🖼️ Images → /docs/images:
- social-preview.png

Updated all references:
- .github/workflows/update-json-data.yml
- CLAUDE.md
- docs/CLAUDE.md
- docs/api/README.md
- docs/guides/growth-kit-pr.md
- cli-tool/src/validation/README.md

Result:
- Root directory reduced from ~24 files to 13 essential config files
- Better separation of concerns (scripts, docs, images)
- Follows industry-standard project structure
- Easier navigation and maintenance

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-20 16:25:18 -05:00

46 lines
1.5 KiB
JavaScript

const express = require('express');
const path = require('path');
const app = express();
const port = 3001;
// Serve static files from docs directory
app.use(express.static('docs'));
// Handle filter routes - redirect to index.html
const filterRoutes = ['agents', 'commands', 'settings', 'hooks', 'mcps', 'templates'];
filterRoutes.forEach(filter => {
app.get(`/${filter}`, (req, res) => {
res.sendFile(path.join(__dirname, 'docs', 'index.html'));
});
});
// Handle component routes
app.get('/component/:type/:name', (req, res) => {
res.sendFile(path.join(__dirname, 'docs', 'component.html'));
});
// Handle blog routes
app.get('/blog/*', (req, res) => {
const blogPath = req.path.replace('/blog', '');
res.sendFile(path.join(__dirname, 'docs', 'blog', blogPath, 'index.html'), (err) => {
if (err) {
res.status(404).send('Blog post not found');
}
});
});
// Default route
app.get('/', (req, res) => {
res.sendFile(path.join(__dirname, 'docs', 'index.html'));
});
app.listen(port, () => {
console.log(`Development server running at http://localhost:${port}`);
console.log('Testing URLs:');
console.log(`- http://localhost:${port}/ (agents)`);
console.log(`- http://localhost:${port}/mcps`);
console.log(`- http://localhost:${port}/commands`);
console.log(`- http://localhost:${port}/settings`);
console.log(`- http://localhost:${port}/hooks`);
console.log(`- http://localhost:${port}/templates`);
});