Challenges
Debug real bugs and learn by fixing them
Challenges
Fix intentionally broken code to understand how backend systems work.
Available Challenges
Broken Routing
Fix route order and registration issues. Difficulty: Beginner
Broken Middleware
Fix authentication and CSRF validation bugs. Difficulty: Medium
Broken Authentication
Fix password verification vulnerability. Difficulty: Easy
Broken Database
Fix SQL injection vulnerabilities. Difficulty: Medium
Broken Session
Fix flash data handling issues. Difficulty: Medium
Broken Full-Text Search
The search endpoint uses ILIKE — replace it with a tsvector full-text search. Difficulty: Medium
Broken JOIN
The posts endpoint uses the wrong JOIN type and wrong ON clause — fix both. Difficulty: Medium
Broken Transaction
The transfer endpoint has no ROLLBACK — a failed write corrupts the balance permanently. Difficulty: Medium
Broken First Queries
Fix three SQL bugs: injection, wrong column, and invalid response format Difficulty: Easy
Migration Disorder
The posts migration runs before the users migration, and uses SQLite syntax. Fix both. Difficulty: Medium
Missing JSONB Metadata
The posts controller ignores the metadata field — add it to the INSERT and SELECT. Difficulty: Medium
Missing Pagination
The users list endpoint dumps every row — add LIMIT and OFFSET to paginate it. Difficulty: Easy
Missing RLS Policy
A multi-tenant controller relies on PHP to filter data. Add Row-Level Security to enforce isolation at the database level. Difficulty: Hard
Slow Queries
Identify columns missing indexes based on controller queries and add them to the migration. Difficulty: Medium
Broken Nginx Config
Nginx isn't forwarding PHP requests to PHP-FPM — fix the config Difficulty: Easy
Missing Compose Services
The compose file only has the app service — add db and nginx Difficulty: Easy
Incomplete Dockerfile
Complete the Dockerfile for DALT.PHP — three parts are missing Difficulty: Easy
Missing Health Check
The app container boots before Postgres is ready. Add a healthcheck so depends_on can use condition: service_healthy. Difficulty: Easy
Missing Multi-Stage Build
Convert the single-stage Dockerfile to a multi-stage build and add a HEALTHCHECK. Difficulty: Medium
Plaintext Secrets
The Postgres password is hardcoded in the compose file — move it to a Docker secret. Difficulty: Medium
How Challenges Work
- Read the lesson - Understand the concept first
- Start the challenge -
php artisan challenge:start <name>loads broken files - Test the bug - See the broken behavior
- Debug and fix - Find and fix the issues
- Run verification - Check your solution automatically
- Review solution - Compare with the provided fix
Challenge Statistics
- Total Challenges: 5
- Total Bugs: 11
- Estimated Time: 4-6 hours
- Difficulty Range: Beginner to Medium
Ready to Start?
Begin with the first challenge or jump to any that interests you!