25ghost/superteacher ? reverse-engineered prompt
Reverse engineered prompt
Build me the SuperTeacher backend API in Python. I want a clean FastAPI service for the new Student Registration Portal, separate from any desktop app, with working authentication, student accounts, schools, education levels, pathways, programs, subjects, and enrollment.
Please include register, login, refresh, logout, and self service account endpoints, plus admin endpoints for managing students, teachers, and registrations. Registration should create a student account and profile together, validate things like email, password, date of birth, and name, and return helpful errors instead of weird server failures. Make sure identity always comes from the logged in token, not from user supplied ids, and keep student, teacher, and admin routes properly separated.
Use PostgreSQL, SQLAlchemy, Alembic, and secure JWT access and refresh tokens with session revocation and rotation. Passwords should be hashed securely, and the backend should support things like deactivation, password recovery, invitations, audit trail, and rate limiting. If you need to check current library details, look them up online.
Are you gonna build this?
make sure you review the code using coderabbit