import os, re  
base_dir = r'd:\personal\src-code\ejobs360\job-portal\frontend_mono\src'  
app_dir = os.path.join(base_dir, 'app')  
routes = set()  
for root, dirs, files in os.walk(app_dir):  
    for f in files:  
        if f in ('page.tsx', 'page.jsx', 'route.ts', 'route.js'):  
            rel = os.path.relpath(root, app_dir).replace(chr(92), '/')  
            parts = [p for p in rel.split('/') if not (p.startswith('(') and p.endswith(')'))]  
            route = '/' + '/'.join(parts) if parts and parts != ['.'] else '/'  
            routes.add(route)  
print('Valid routes:', len(routes))  
