Title: No caching on users.json — file read on every authenticated request
Description: In main.py, load_users() opens and parses users.json on every call to /login, /register, and save_user. Under concurrent load this causes repeated disk I/O and a race condition — two simultaneous registrations could both read the same file, both add their user, and one write overwrites the other, silently losing a registration. There is no file lock, no in-memory cache, and no atomic write pattern.
Title: No caching on
users.json— file read on every authenticated requestDescription: In main.py,
load_users() opens and parsesusers.jsonon every call to /login, /register, andsave_user. Under concurrent load this causes repeated disk I/O and a race condition — two simultaneous registrations could both read the same file, both add their user, and one write overwrites the other, silently losing a registration. There is no file lock, no in-memory cache, and no atomic write pattern.