feat: Add stale process monitor, users route, landing page, archive old scripts

- Add backend stale process monitoring API (/api/stale-processes)
- Add users management route
- Add frontend landing page and stale process monitor UI on /scraper-tools
- Move old development scripts to backend/archive/
- Update frontend build with new features

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Kelly
2025-12-05 04:07:31 -07:00
parent d2d44d2aeb
commit d91c55a344
3115 changed files with 5755 additions and 719 deletions

View File

@@ -0,0 +1,47 @@
import { pool } from './src/db/migrate.js';
async function main() {
const result = await pool.query(`
SELECT column_name, data_type, is_nullable
FROM information_schema.columns
WHERE table_name = 'products'
ORDER BY ordinal_position;
`);
console.log('Products table columns:');
result.rows.forEach(row => {
console.log(` ${row.column_name}: ${row.data_type} (${row.is_nullable === 'YES' ? 'nullable' : 'NOT NULL'})`);
});
const constraints = await pool.query(`
SELECT constraint_name, constraint_type
FROM information_schema.table_constraints
WHERE table_name = 'products';
`);
console.log('\nProducts table constraints:');
constraints.rows.forEach(row => {
console.log(` ${row.constraint_name}: ${row.constraint_type}`);
});
// Get unique constraints details
const uniqueConstraints = await pool.query(`
SELECT
tc.constraint_name,
kcu.column_name
FROM information_schema.table_constraints tc
JOIN information_schema.key_column_usage kcu
ON tc.constraint_name = kcu.constraint_name
WHERE tc.table_name = 'products'
AND tc.constraint_type IN ('PRIMARY KEY', 'UNIQUE');
`);
console.log('\nUnique/Primary key constraints:');
uniqueConstraints.rows.forEach(row => {
console.log(` ${row.constraint_name}: ${row.column_name}`);
});
await pool.end();
}
main().catch(console.error);