The Ghost Cart
A user upgrades their account to premium. They log out and log back in. The app still shows them the free tier interface and blocks premium features — even though their account is definitely upgraded in the database.
The bug report
You get the whole project — a React front end, an Express API, and Mongoose models — opened in a browser editor. Reproduce the symptom by reading the code, change what’s wrong, and run the hidden tests to prove it.
What the fix must prove
- issues a login token carrying the stored plan
- reflects an upgrade in the next login token
- accepts the upgraded token on premium routes
- rejects a pre-upgrade token on premium routes
- rejects a login for an unknown account
Related challenges
- The Missing Name — api contract bug, beginner
- The Ghost Update — async / race condition, intermediate
- The Silent Field — database / schema bug, beginner