Skip to content

Projects

What you'll build in SmithFortress

Every world ends with real code you write yourself, in PHP and Laravel. Each project comes from a client or a boss with a story, and every step is checked against tests when you submit it. Each preview below is real output from one of the project's tests: what a finished solution prints.

15 client projects 8 boss battles 8 worlds

Anvil Village

Learn programming fundamentals with PHP

Beginner

A busy village at the foot of the fortress, where you learn to think like a programmer. Write your first PHP scripts and master variables, decisions, loops, functions, and arrays: the foundation of everything that follows.

Client project

Market Stall Calculator

for Tilda Marsh, Marsh & Daughters Market Stall

Tilda adds up every customer's fruit on a slate, and on busy mornings the sums go wrong. She wants a small calculator program: one function for the price of a bag of fruit, and a proper four-operation calculator that never crashes on her, even when someone asks it to divide by zero.

  1. The price of a bag. A function that prices a bag of fruit with a discount.
  2. Four operations. A calculate() function for +, -, *, and /.
  3. Open for business. The interactive calculator Tilda will use at the stall.

Variables and arithmeticFunctions and returnmatchfgets(STDIN)

Client project

Festival Guessing Game

for Fenn Lightfoot, The Lantern Games Hall

Fenn runs the guessing game at the Lantern Festival: think of a number, and players guess until they find it. Last year, a tired helper gave wrong hints all evening. Fenn wants a program that gives honest hints, counts the guesses, and awards a fair rating.

  1. Honest hints. Compare a guess with the secret.
  2. Fair ratings. Rate a player's guess count.
  3. Let the games begin. The full game loop.

Comparisons and if/elseifwhile loopsFunctions and returnfgets(STDIN)

Client project

Village School Report Cards

for Ms. Quill, Anvil Village School

Every term, Ms. Quill marks dozens of tests and writes every report card by hand. She'd like a program that turns scores into letter grades, works out class averages, and prints neat report lines, so she can spend her evenings reading instead.

  1. Letter grades. Turn a score into a letter.
  2. Class average. Average an array of scores.
  3. Report cards. Build the report lines.

if/elseifFunctions and returnArrays and loopsJoining strings

Client project

General Store Shopping Lists

for Quartermaster Bram, The Keep's Armoury

Bram takes orders all day and keeps them in his head, which works until it doesn't. He needs a shopping list manager: add items without duplicates, price a list from the store's price book, and a little command program his assistant can use at the counter.

  1. No duplicates. Add items to a list only once.
  2. Price the list. Total a list from the price book.
  3. At the counter. The command program the assistant uses.

Indexed arraysAssociative arrayswhile loopsFunctions

Boss battleThe Archive Imp

The Scrambled Ledger

On the eve of report day, the Archive Imp crept into Anvil Village School and scrambled Ms. Quill's ledger: names vanished, grades of 140 appeared, and nobody knows who's top of the class. Only a student manager written from scratch, with everything you've learned in Anvil Village, can set the records straight.

  1. Enrol the students. Keep the records in an array of names and grade lists.
  2. Guard the grades. Record grades, refusing impossible ones.
  3. Find the top student. Averages per student, and the best of them.
  4. The student manager. Tie it all together in a command-line program.

Tinker’s Workshop

Write practical, well-organised PHP programs

Beginner

The workshop where scripts become tools. Split code across files, pass functions around, work with files and data formats, handle errors gracefully, and install packages with Composer the way professionals do.

Client project

The Post Office Contact Book

for Odo Crumb, The Hearth Bakery

Odo knows everyone on Tinker's Row, and keeps their addresses on scraps of paper that blow out of the window every time the door opens. He needs a contact book that refuses bad entries, keeps everything safely in a file, and finds anyone in a moment.

  1. Address cards. Add contacts, refusing bad ones.
  2. Never forget. Save, load, and search the book.
  3. Open the counter. The program Odo uses at the counter.

Throwing exceptionsJSON filesRegular expressionsCommand loops

Client project

The Inkwell Word Counter

for Wren Tallow, The Artisans' Guild

Wren pays writers by the word, and counts every manuscript by hand with a pencil, a tally, and a growing headache. She wants a tool she can run on any text file: how many lines, words, and characters, and which words the writer leans on most.

  1. Count everything. Lines, words, and characters in any text.
  2. Favourite words. The words a writer uses most.
  3. Off the press. The command-line tool Wren will run.

Reading filesRegular expressionsArray functionsCommand-line arguments

Boss battleThe Receipt Moth

The Nibbled Ledger

Every night, the Receipt Moth flutters into the workshop's counting house and nibbles the paper receipts. Nobody knows what the coal cost last month, or whether the iron was paid for at all. Only a proper expense tracker, one that validates, saves, reports, and exports, can keep the workshop's money safe from those hungry wings.

  1. Record the receipts. Validate each expense before it goes in the ledger.
  2. Out of the Moth's reach. Keep the ledger safe in a JSON file.
  3. Count every coin. Totals by category and month, and a CSV export.
  4. The Moth's last stand. The tracker the forge master will use every day.

Object Keep

Design object-oriented programs and test them

Intermediate

A keep built from objects. Design classes, protect their data, share behaviour with inheritance, interfaces, and traits, and organise it all with namespaces and autoloading. Then learn to test everything with PHPUnit.

Client project

The Counting House Accounts

for Gilda Coinwright, The Keep's Counting House

Gilda's ledgers are so heavy that two guards have to open them, and a single blot can lose a family's savings. She wants accounts that refuse impossible withdrawals, savings that earn interest, checking accounts with an overdraft, and transfers that never lose gold halfway.

  1. Open an account. A balance only its own methods can change.
  2. Savings and checking. Two kinds of account sharing one parent.
  3. The counting house. Transfers and the monthly report.

EncapsulationAbstract classesInheritanceExceptions

Client project

The Keep's Armoury Inventory

for Quartermaster Bram, The Keep's Armoury

Quartermaster Bram knows every sword by its nicks, but never how many are left until a guard asks for one. He wants an inventory that knows each kind of item, warns him before anything runs low, and can be loaded from the stocktake list his clerks write.

  1. Know your kit. Categories and items that can't go wrong.
  2. The racks. Add, remove, and count what's in the armoury.
  3. The stocktake. Load the clerks' list, and print the report.

EnumsValue objectsInterfacesMagic methodsCSV files

Boss battleThe Index Wraith

The Forgotten Library

Deep in Object Keep lies the great library, and in its stacks drifts the Index Wraith. Each night it garbles a catalogue entry, forgets a loan, or nudges a due date by a day. The librarians can't catch it by hand. Only a library built from sound classes, and guarded by its own tests, can drive it out.

  1. Rebuild the catalogue. Books that can't be wrong, and a catalogue to find them.
  2. Lend and return. Loans with due dates, from a clock you control.
  3. Who has what?. Overdue books and each member's loans.
  4. The Wraith's trial. A test suite that catches every bug the Wraith plants.

Web Gatehouse

Understand the web and databases that Laravel builds on

Intermediate

The gate every web request passes through. Learn how browsers and servers talk over HTTP, serve pages with PHP, handle forms safely, keep users signed in with sessions, and store data with SQL and PDO.

Client project

The Gatehouse Guestbook

for Hilde Ironlatch, The Gatehouse

Hilde wants every traveller to leave a word in the Gatehouse's book. The paper one fills up, gets rained on, and last week someone drew a dragon over three pages. She wants it on the web: safe from pranks, easy to sign, and still readable when there are hundreds of entries.

  1. The book itself. Entries stored in SQLite, checked before they're kept.
  2. Sign here. The page travellers read and sign.
  3. Turning pages. Five entries a page, with links between them.

PDOForms and validationEscaping outputSessionsPagination

Client project

The Lantern Inn Bookings

for Marta Wick, The Lantern Inn

Marta's new booking app was a gift from her nephew, and it keeps asking for "the API". The inn seats 20 guests a night, bookings are for up to eight, and the kitchen wants a list for each day. Build what the app and the kitchen need to talk to.

  1. The bookings book. Bookings stored safely, with the inn's rules.
  2. The booking API. The app books tables with JSON.
  3. The kitchen's list. A day's bookings for the cook, and cancelling.

PDOPrepared statementsJSON APIsStatus codes

Boss battleThe Gate Crasher

The Gate Crasher

Every morning the Gatehouse's to-do list is a mess: chores ticked off that nobody did, strange scripts in the titles, and once, the whole list emptied. The Gate Crasher has found every weak spot in it. Rebuild the list as a proper web app, with accounts, sessions, and safe forms, then show the Crasher that the gate holds.

  1. The task ledger. Tasks in SQLite, each one its owner's alone.
  2. Who goes there?. Registering, signing in, and signing out.
  3. The list on the gate. Adding and finishing tasks, through safe forms.
  4. The siege. Close the four holes the Gate Crasher planted.

Artisan Hall

Build data-driven websites with Laravel

Intermediate

Enter the hall of the artisans and build web apps with Laravel. Install it with Composer, route requests to controllers, render Blade templates, model your data with migrations and Eloquent, and connect it with relationships.

Client project

The Hearth Bakery's Menu

for Odo Crumb, The Hearth Bakery

Odo bakes before dawn and sells out by noon. Every morning, people knock on the window to ask whether there's rye left. He'd like a website: the menu, by section, showing what's sold out, a page for each bake, and a form where he can add a new one before the shop opens. He has heard Laravel is the tool for the job.

  1. The bakes. A model for the menu, with its scopes and helpers.
  2. The menu board. The menu page, grouped by section, in the bakery's layout.
  3. Behind the counter. The controller: the menu, each bake's page, and adding new bakes.

Eloquent models and scopesBlade layouts and componentsControllersValidationRoute model binding

Client project

The Guild Noticeboard

for Wren Tallow, The Artisans' Guild

The Artisans' Guild has a noticeboard for every trade, and Wren keeps them all. Every morning she reads each pin to see whether it's out of date, and every week someone complains that the fair notice is still up a month after the fair. She'd like the boards on the guild's new Laravel site, notices that know when they expire, and a command she can run (or schedule) to clear the old ones away.

  1. Boards and pins. The migration for the boards and their notices.
  2. Pins that know their dates. The Notice model: its board, its types, and which notices are current.
  3. Wren's commands. Artisan commands to prune expired notices and count current ones.

Migrations and foreign keysEloquent relationshipsScopesArtisan commands

Boss battleThe Ink-Spiller

The Ink-Spiller

The Hall Chronicle, the guild's own news-sheet, is ruined. The Ink-Spiller crept into the archive and blotted every page: drafts printed as news, recipes filed under the wrong trade, and a notice for a fair that hasn't been planned yet. The editors want it rebuilt on Laravel, properly: posts in categories, readable addresses, nothing shown before it's published, and a desk where they write and publish.

  1. The archive. The tables for categories and posts.
  2. The scribe's rules. The Post model: its category, its dates, and what's published.
  3. The reading room. The public pages: the front page, each post, and each category.
  4. The editors' desk. Writing, checking, and publishing posts.

Warden’s Bastion

Handle users, forms, and permissions securely

Advanced

The bastion that guards every input. Validate what users send, add accounts with registration and login, control who can do what with middleware, gates, and policies, and keep your site safe from common attacks.

Client project

The Midsummer Fair Sign-up

for Tamsin Reed, The Midsummer Fair

Every June the Bastion's green fills with stalls, games, and a maypole, and Tamsin has to know who's coming. Last year's sign-up sheet hung on the gate, got rained on, and half the names washed away. This year she wants a page: visitors sign up with their name, email, and how many tickets they need, each email only once, and get a thank you. The list itself is for her and the other organisers, not for the helpers, and certainly not for the whole town. And after last year's prank, nobody should be able to sign up a hundred times in a minute.

  1. The sign-up rules. A form request that checks and cleans every sign-up.
  2. The sign-up page. The form, its mistakes, and the thank-you.
  3. The fair's routes. The public form, sign-in, and the organisers' list.

Form requestsValidationCSRFFlash messagesAuthenticationGatesMiddleware

Client project

The Weavers' Hall Showcase

for Isolde Marsh, The Weavers' Hall

The Weavers' Hall makes the finest cloth in the valley, and hardly anyone outside its walls has seen it. Isolde wants a showcase: every weaver may add pieces, keep a piece as a draft until it's ready, and add a photo. Only a piece's own weaver may change it or take it down, except Isolde, who as master may do anything. Apprentices may look, but not add pieces yet. And nobody, she insists, should ever be able to change someone else's work by typing its address.

  1. The piece policy. Who may see, add, change, and take down each piece.
  2. The showcase controller. All seven actions of the pieces resource, each asking the policy.
  3. The photo controller. A photo for each piece, on the public disk.

PoliciesResource controllersFile uploadsStorageFlash messagesAuthentication

Boss battleThe Impostor

The Impostor

The Lantern Society keeps the Bastion's lamps lit, and its members' site has been overrun by the Impostor. He joined four times, once as Ada with her email in capitals; he made himself an elder by adding a field to the form; he rewrote Ada's profile by sending her id with his own; and even after the wardens suspended him, he kept signing in. Rebuild the site so that none of it works again.

  1. The register. Joining the Society, safely.
  2. The profiles. Members' pages, and each member's own profile.
  3. Ranks and rules. Who may see the members' list, suspend, and reinstate.
  4. The night watch. Middleware that turns suspended members away.

Courier Spire

Build secure, scalable REST APIs

Advanced

Climb the spire that every app talks to. Design REST APIs with Laravel, shape responses with API resources, secure them with Sanctum tokens, page and filter results, and move slow work into caches, queues, and scheduled tasks.

Client project

The Notes API

for Juno Ash, Marshland Field Notes

Juno walks the marshes below the Spire every morning, and writes down everything: nests, tides, the otter by the east dyke. A friend built her a phone app for it, with screens for listing, writing, pinning, and searching notes, but it has nowhere to keep them. She needs the API it talks to. Her friend Odo wants to use the app too, so notes must stay their writer's own: Odo should never see, change, or even learn about one of Juno's. And since the API is on the open internet, nobody may guess passwords at it all night.

  1. The note rules. A form request for creating and updating notes.
  2. The notes controller. Listing, searching, and keeping notes their own.
  3. The API's routes. Sign-in, sign-out, and the notes, guarded and limited.

Form requestsAPI resourcesSanctumPaginationSearchRate limitingREST design

Boss battleThe Scraper

The Scraper

Every courier in the valley carries the Spire's app, and the API behind it has a visitor: the Scraper. It signs in with a token from a phone lost months ago, which never expires. It counts through every parcel id and reads them all, it marks other couriers' parcels as delivered with a clerk's token, and when the mail service slowed down, recipients got three receipts each. Rebuild the API so that the app works for every courier, and for nobody else.

  1. The sign-in gate. Tokens that say what they may do, and run out.
  2. The delivery round. Each courier's own parcels, and honest deliveries.
  3. The receipts. One receipt per delivery, sent from the queue.
  4. The night shift. Expired tokens swept away while the Spire sleeps.

Crown Forge

Test, secure, and deploy a complete web application

Expert

The last forge. Test a Laravel app properly, harden it with the security checklist, make it fast, configure it for production, and deploy it behind Nginx and PHP-FPM, with queues, logging, and monitoring.

Boss battleThe Tarnish

The Tarnish

The coronation is in a week, and the crown's commission is in the Forge's app, which the Tarnish has been at. There are no tests, so nobody saw him slip in his mistakes: every smith sees everyone's commissions, anyone can mark anyone's work finished, a form field can set a commission's status, and the board crawls. There's no health check, the proxy isn't trusted, and his last release went out with debug mode on. Make the app fit to ship, the way a master would.

  1. The assay. Tests that catch the Tarnish at work.
  2. The repair. Mend the controller until every test passes.
  3. The safeguards. Health, proxies, headers, and maintenance, in bootstrap/app.php.
  4. The release. A release that won't start until the settings are right.

How projects work

Each step is a coding challenge you write in the Coding Arena. When you submit it, your code runs on your own computer against tests, and you see which checks pass, with hints if you're stuck. You earn XP for every step and for finishing the project. Projects unlock as you complete the lessons they need.

The previews are trimmed to fit: a line ending in "…" goes on, and a "…" on its own line stands for lines left out.