Preface
- What you will build
- What you will use
- How this book works
- A note on honesty
- What you need to start
- Who wrote this
- How to get the most out of this book
- If you only have three hours
- How to begin
Chapter 1: Why Schools Need Their Own Software
- What you will learn
- Why it matters
- Where most school software loses to the spreadsheet
- What the AI coding agent changes
- What this looks like in practice
- A month in the life of the spreadsheet
- What “owning your own tool” actually means
- When to buy instead
- The honest case for building
- Where this book goes from here
- Checklist
- A first reality check before you start
- The honest cost of building
- Stop, look, decide: the five-minute refusal
- Summary
- Try it yourself
Chapter 2: Setting Up Your AI Coding Workflow
- What you will learn
- Why it matters
- Step 1: Install Node.js
- Step 2: Install Git
- Step 3: Install OpenCode
- Step 4: Create your project folder
- Step 5: Write your rules file
- Step 6: Checkpoint your empty project
- Step 7: Understand how to talk to the agent
- Step 8: Understand OpenCode modes
- Step 9: Your first conversation
- If a step does not go smoothly
- What a good result looks like
- A demo conversation, start to finish
- Three rules that save you all week
- Your workbench, in one glance
- Common mistakes and how to fix them
- Chapter checklist
- Summary
- Try it yourself
Chapter 3: Writing a Product Spec Before You Prompt
- What you will learn
- Why it matters
- The five parts of a small spec
- Step 1: Write the problem in one paragraph
- Step 2: Name the roles
- Step 3: Write user stories
- Step 4: Sketch the data
- Step 5: Write acceptance criteria
- From spec to prompts
- Keep your data sketch honest
- From spec to build order: read the dependencies
- What a good result looks like
- Common mistakes and how to fix them
- Chapter checklist
- Summary
- Try it yourself
Chapter 4: Project 1 – School LMS
- What you will build
- Why it matters
- Step 1: Create the project with Next.js
- Step 2: Create the database layer
- Step 3: Add passwords and sessions
- Step 4: Seed the app with demo accounts
- Step 5: Login page and role guards
- Step 6: Admin page to manage users
- Step 7: Classes and enrollments
- Step 8: Assignments and grades
- Step 9: The student report card
- What the AI produced and how to check it
- Common mistakes and how to fix them
- Chapter checklist
- Summary
- Try it yourself
Chapter 5: Project 2 – Inventory and Asset Tracking
- What you will build
- Why it matters
- Step 0: Learn the log, then build
- Step 1: Create the project and copy your habits
- Step 2: Think about the schema before scaffolding
- Step 3: Seed a believable little world
- Step 4: List inventory and add an item
- Step 5: The move, with a transaction
- Step 6: Condition, maintenance, and write-off
- Step 7: A page the office actually likes
- The two queries your audit will ask
- A label and an audit question
- What the AI produced and how to check it
- Common mistakes and how to fix them
- Chapter checklist
- Summary
- Try it yourself
Chapter 6: Project 3 – Payments and Admin Documents
- What you will build
- Why it matters
- Step 0: Money is a ledger, not a box
- Step 1: Create the third project
- Step 2: Seed believable data
- Step 3: The fee dashboard
- Step 4: Record a payment
- Step 5: Teacher documents, the careful way
- Step 6: Wiring it together
- Step 7: The reconciliation check (bank, paper, app)
- Step 8: The proof the office asks for
- What the AI produced and how to check it
- Common mistakes and how to fix them
- Chapter checklist
- Summary
- Try it yourself
Chapter 7: Database Design for Non-Programmers
- What you will learn
- Why it matters
- The five words that explain every database
- Relations: one, many, and many-to-many
- Read a generated schema like a reviewer
- Indexes: speed you earn, not speed you buy
- Transactions: the atomic promise
- Migrations: changing the schema without the churn
- Backups: the one quest that never ends
- NULL is a fact, empty string is a lie
- Stored totals rot; queries do not
- What a good result looks like
- Common mistakes and how to fix them
- Chapter checklist
- Summary
- Try it yourself
Chapter 8: Testing and Fixing What the AI Gets Wrong
- What you will learn
- Why it matters
- Layer 1: Manual test plans, from your own words
- Layer 2: Small automated tests with node:test
- The debugging conversation: a script you can rely on
- A worked debugging session, from first alarm to green
- Which check belongs where: the two-layer map
- Who runs the tests: you, not the agent
- The three questions before you click anything
- Read the diff before you trust the fix
- Git as your time machine
- When to escalate: the diff review
- Common mistakes and how to fix them
- Chapter checklist
- Summary
- Try it yourself
Chapter 9: Security and Student Data Privacy Basics
- What you will learn
- Why it matters
- Account protection: passwords and sessions
- Validation: never trust the form
- Roles: least privilege, enforced twice
- Files: the gatehouse rules
- Secrets: the five places they leak
- Student data privacy: the part the law owns
- The security round, in one prompt
- Three threats that actually visit small schools
- The admin account is the castle gate
- Common mistakes and how to fix them
- Chapter checklist
- Summary
- Try it yourself
Chapter 10: Deploying on a Budget VPS
- What you will learn
- Why it matters
- Step 1: Rent a small server and choose a name
- Step 2: Harden the server in five moves
- Step 3: Install Node, the repo, and the app
- Step 4: Keep it alive with PM2
- Step 5: Put Nginx and HTTPS in front
- Step 6: Backups that outlive the server
- Step 7: Watch the app so the office never has to
- The disaster drill: deploy and roll back on purpose
- Step 8: The whole school, one server
- What a good result looks like
- Common mistakes and how to fix them
- Chapter checklist
- Summary
- Try it yourself
Chapter 11: Maintaining and Extending Your App
- What you will learn
- Why it matters
- Step 1: The monthly routine
- Step 2: How a feature gets born
- Step 3: Editing with the smallest possible change
- Step 4: Documenting so the next teacher can drive
- Step 5: The handover, done while nothing is on fire
- The upgrade path, without the panic
- The account map: where the keys live
- Some features you should kill
- What a good result looks like
- Common mistakes and how to fix them
- Chapter checklist
- Summary
- Try it yourself
About the Author
Appendix A: Prompt Templates
- 1. Spec prompt (plan first, before any code)
- 2. Feature prompt (one small, runnable step)
- 3. Bug-fix prompt (full evidence, small territory)
- 4. Refactor prompt (same behaviour, cleaner code)
- 5. Security and data review prompt (termly)
- How to adapt these
Appendix B: Checklists
- Pre-launch checklist
- Security checklist
- Backup checklist
- Monthly routine (one line each)
Appendix C: Troubleshooting
- The app will not start
- Login does not work
- The agent’s feature did not change anything
- Grades yield odd numbers
- A table gives a 500 error or empty rows
- Payments show the wrong owed amount
- The document will not download
- The server is slow
- Everything looks fine and it is still wrong
- The universal debug loop