Lesson 1: a local install and the project we'll build
Welcome to Developer Basics. Over the next lessons we'll build one small thing together: an upcoming-events widget, packaged as a custom UNA module. It has one form for adding an event, one admin grid for managing them and one API endpoint that returns the next few events as JSON. That's deliberately modest, and it still touches most of the parts of UNA you'll use in real projects.
Two sketches are attached to this lesson: the project proposal and the module's folder structure. Keep the folder structure open while you work through the first few lessons. It will make a lot more sense by lesson three.
First, a local install
You need a copy of UNA that you're allowed to break. Developing against a live site is how people end up apologising to their members at midnight, so this whole course assumes a local install.
- A recent PHP 8 version with the usual extensions (the installer tells you if anything is missing)
- MySQL or MariaDB, with an empty database and a user for it
- A web server such as Apache or Nginx, or a container setup if you already work that way
- A code editor you're comfortable with, and git
Download the latest release from https://unacms.com and unpack it into your web root, then open the site in a browser. The installer walks you through the requirements check, the database details and the first admin account. At the end it shows a cron command. Add it, even locally. A surprising number of "it doesn't work" questions turn out to be a missing cron job: notifications, emails and some background tasks quietly wait for it.
Check that it worked
Log in as admin, open Studio and install one module, for example Posts. Create a post, comment on it, then delete both. If that all works, you're ready for lesson 2, where we open an existing module's folder and compare it with the sketch.
Stuck? Post the exact error message in the comments, along with your operating system and PHP version. That saves two rounds of questions.
Info
html
asdasdasd