Basic REST API for a Notes App
Build a small REST API in plain PHP (no framework) that supports creating, listing, updating, and deleting notes, using PDO against a MySQL database and returning JSON responses. Learners practice designing REST routes manually, PDO prepared statements, and JSON request/response handling.
- Estimate
- ~7.5h
- Steps
- 5
- Completed by
- 0
- Proposed by
- codeseed.app
PDO · MySQL
Project roadmap
- 01
Set up routing
~1.5hWrite a simple front-controller script that dispatches requests based on method and path.
- 02
Connect to the database
~1hSet up a PDO connection and create a notes table.
- 03
Implement CRUD endpoints
~2.5hImplement create, list, update, and delete logic using prepared statements.
- 04
Return proper JSON responses
~1.5hSet correct headers and status codes, returning JSON for both success and error cases.
- 05
Test with curl/Postman
~1hManually test each endpoint and fix any edge cases with missing/invalid fields.
Resources
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack