tractatus/ADMIN_LOGIN_INSTRUCTIONS.md
TheFlow 7ab96f15d2 feat(admin): add password reset utility and login instructions
SUMMARY:
Created admin password reset utility and comprehensive login instructions
to help user access admin portal.

NEW FILES:
- scripts/reset-admin-password.js: Automated password reset for production
- ADMIN_LOGIN_INSTRUCTIONS.md: Complete admin access documentation

PASSWORD RESET UTILITY:
- Resets admin@agenticgovernance.digital password
- Uses bcrypt for secure password hashing
- Works on both local and production environments
- Usage: node scripts/reset-admin-password.js 'NewPassword'

CURRENT ADMIN CREDENTIALS (Production):
- Email: admin@agenticgovernance.digital
- Password: TractatusDev2025
- Login URL: https://agenticgovernance.digital/admin/login.html

VERIFICATION COMPLETED:
-  Admin user exists in production database
-  Password correctly hashed with bcrypt (60 chars,  prefix)
-  Password verification test passed (bcrypt.compare returns true)
-  User active and has admin role

ADMIN DASHBOARD ACCESS:
Once logged in, provides access to 9 admin tools:
- Blog curation with AI-powered drafting
- Newsletter management
- Media triage
- Case moderation
- Rule manager
- Project manager
- Hooks dashboard
- Audit analytics
- CLAUDE.md migrator

TROUBLESHOOTING:
- Rate limit: 5 login attempts per 15 minutes
- Alternative account: admin@tractatus.local (may need reset)
- Server logs: journalctl -u tractatus -f
- Browser console for client-side errors

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

Co-Authored-By: Claude <noreply@anthropic.com)
2025-10-20 21:00:42 +13:00

3 KiB

Admin Login Instructions

Date: 2025-10-20


ADMIN ACCESS CREDENTIALS

Login URL: https://agenticgovernance.digital/admin/login.html

Credentials:

  • Email: admin@agenticgovernance.digital
  • Password: TractatusDev2025

Status: Password has been reset in production database and verified to match using bcrypt.compare()


🔍 TROUBLESHOOTING

If Login Fails:

  1. Check password is exactly: TractatusDev2025 (case-sensitive, no spaces)

  2. Try alternative admin account:

    • Email: admin@tractatus.local
    • Password: May need reset (use script below)
  3. Reset password again:

    ssh -i ~/.ssh/tractatus_deploy ubuntu@vps-93a693da.vps.ovh.net \
      "cd /var/www/tractatus && node -r dotenv/config scripts/reset-admin-password.js 'YourNewPassword'"
    
  4. Check server logs:

    ssh -i ~/.ssh/tractatus_deploy ubuntu@vps-93a693da.vps.ovh.net \
      "sudo journalctl -u tractatus -f"
    

🎯 ADMIN DASHBOARD FEATURES

Once logged in, you'll have access to:

  1. /admin/dashboard.html - Main admin dashboard
  2. /admin/blog-curation.html - Manage blog posts
  3. /admin/newsletter-management.html - Newsletter subscribers
  4. /admin/media-triage.html - Media inquiry responses
  5. /admin/case-moderation.html - Case study moderation
  6. /admin/rule-manager.html - Governance rules
  7. /admin/project-manager.html - Project tracking
  8. /admin/hooks-dashboard.html - Framework hooks metrics
  9. /admin/audit-analytics.html - System audit logs

🔧 PASSWORD RESET SCRIPT

Location: /home/theflow/projects/tractatus/scripts/reset-admin-password.js

Local:

node scripts/reset-admin-password.js 'NewPassword'

Production:

ssh -i ~/.ssh/tractatus_deploy ubuntu@vps-93a693da.vps.ovh.net \
  "cd /var/www/tractatus && node -r dotenv/config scripts/reset-admin-password.js 'NewPassword'"

VERIFICATION COMPLETED

  • Admin user exists in production database
  • Password successfully hashed with bcrypt (60 chars, starts with $2)
  • Password verification test passed: bcrypt.compare('TractatusDev2025', hash) === true
  • User is active: active: true
  • User has admin role: role: 'admin'

📋 NEXT STEPS IF STILL BLOCKED

If you cannot log in with the above credentials, possible issues:

  1. JWT_SECRET mismatch - Check .env on production
  2. CORS issue - Check browser console for errors
  3. Session cookie - Clear browser cookies for agenticgovernance.digital
  4. Rate limiting - Wait 15 minutes if too many attempts (5 max per 15 min)

Browser Console Check:

  1. Open https://agenticgovernance.digital/admin/login.html
  2. Open browser DevTools (F12)
  3. Go to Network tab
  4. Try logging in
  5. Check the /api/auth/login request/response for details

Last Password Reset: 2025-10-20 07:57:37 UTC
Verified Working: bcrypt hash matches password in database
Password: TractatusDev2025