Home / Learn React / Project 7: Notes App with React, PHP and MySQL

Project 7: Notes App with React, PHP and MySQL

Build the full stack in one go: tables, API and the React screen, with search, pages, done checkbox and delete.

In shortImport the schema, upload notes.php, and use the React component below. It already contains search, pagination and every CRUD action.

Theory in plain words

Project mapReact: App.jsx (search, list, add, toggle, delete, pages)PHP: api/notes.php + api/db.phpMySQL: notes table
Project map

What it is

This project joins everything: SQL tables, the PHP API, and a React screen with search and pages.

Why we use it

Building one complete feature end to end is the best way to understand how the three layers fit together.

How it works

Use the files from the PHP lesson on the server. Put the React component below into src/App.jsx, replace the fake api() with the real helper, run the build and upload.

Where it is used

  • A starter for any CRUD app: customers, orders, tasks, bookmarks

What you will build

Backend files

Use schema.sql, config.php, api/db.php, api/notes.php and api/.htaccess from the lesson Build the PHP + MySQL API with PDO. No change needed.

The React app (runs here with a fake server)

Complete notes appTry it Yourself

All state that the server owns (rows, total) comes from the answer. Local state only holds what the user is typing or the current page.

Go live checklist

  1. Import schema.sql in phpMyAdmin.
  2. Create config.php with the real credentials.
  3. Upload api/ and open notes.php in the browser. Expect JSON.
  4. Swap the fake api() for the real fetch helper.
  5. npm run build, upload dist contents.
  6. Add login (previous lesson) and filter every query by user_id.
  7. Backup the database.

Ideas to extend

Quick quiz

1. Which parts hold the real data?