Table of Contents
Cafenod is a website for a coffee house, designed to showcase its brand, products, and roadmap. It provides users with information and a visually appealing experience.
Target Audience: Potential customers of the coffee house
These are sample modules included (or suggested) for learning how to add features:
| Component | Purposse | Notes |
|---|---|---|
| Auth (Sample) | Basic login/logout and (likely) role check (though role check isn't explicitly visible in the provided code snippets). | The pages likely use a database to store user credentials. |
| CRUD Module | To manage entities (like products, menu items, etc.) with create/read/update/delete operations. I don't see a specific CRUD module in these files, but I can infer its potential use. | |
| The roadMapPage.php mentions "Product Management" with "add, view, edit, and delete options," suggesting a CRUD module is planned or exists. Demonstrates Controller → Service → Repository pattern. | ||
| Scheduler (Sample) | To manage scheduled tasks or events | It includes a hero section with a title, description, and primary/secondary buttons. |
| It displays cards showcasing features or products. | ||
| It includes a CTA (Call to Action) section. | ||
| It includes a header and footer component. Shows how to extend with new tables and services. |
Run the development stack and the app (rebuild if needed):
docker compose up --watchCommon utility commands (run inside the project root):
- Run migrations:
docker compose exec php composer migrate- Run seeders:
docker compose exec php composer seed- Run tests:
docker compose exec php composer test- Create a migration (using CodeIgniter's spark tool):
docker compose exec php php spark make:migration CreateUsersTabel- Create a model (using CodeIgniter's spark tool):
docker compose exec php php spark make:model UsemModel- Create an entity (value object for a single record) (using CodeIgniter's spark tool):
docker compose exec php php spark make:entity Uzer- Create a controller (add --resource to scaffold resourceful methods if you like) (using CodeIgniter's spark tool):
docker compose exec php php spark make:controller Usars- Create a seeder (for test/dev data) (using CodeIgniter's spark tool):
docker compose exec php php spark make:seeder UserzSeederIf you prefer, you can include -f "compose.yaml" explicitly; the shorter commands above work when running from the repo root.
Defaults used in this project (host mapping):
| Service | Host port |
|---|---|
| nginx (app) | 8090 |
| phpMyAdmin | 8091 |
| MySQL | 3390 |
Database credentials used in examples and CI:
- Host: localhost
- Port: 3391
- Database: app
- User: root
- Password: root
Be careful: seeding and truncating are destructive operations — run only on local/dev environments unless you know what you're doing.
-
Always prefix project titles with
AD-. -
Place files in their respective CI4 folders (
Controllers/,Services/,Repositories/,Views/). -
Naming conventions:
Type Case Example Classes PascalCase UserService.phpInterfaces PascalCase UserRepositoryInterfaceDB tables/fields snake_case users,created_atDocs kebab-case dev-manual.md -
Git commits use:
feat,fix,docs,refactor. -
Use Controller → Service → Repository pattern.
-
Assets (CSS/JS/img) live under
public/. -
Docker configs are at the repo root (
docker-compose.yml,nginx.conf). -
Docs are maintained in
/docs(dev, technical, sop, commit, principles, copilot).
Example structure:
AD-ProjectName/
├─ backend/ci4/
│ ├─ app/Controllers/
│ ├─ app/Services/
│ ├─ app/Repositories/
│ ├─ app/Views/
│ ├─ public/
│ ├─ writable/
│ ├─ .env
│ └─ composer.json
├─ docker/ # Docker configs at root
├─ docs/ # Manuals and project docs
├─ .gitignore
└─ readme.md
| Title | Purpose | Link |
|---|---|---|
| ChatGPT | General AI assistance for planning application architecture and docs. | https://chat.openai.com |
| GitHub Copilot | In-IDE code suggestions and boilerplate generation. | https://github.com/features/copilot |
| YouTube “UI/UX Design” | Video tutorials on modern web interface layouts and patterns. | https://www.youtube.com |
| Pinterest Design Boards | Inspiration for color schemes, typography, and component layouts. | https://www.pinterest.com |
| Google Photos (Assets) | Stock imagery and graphics used in UI mockups and documentation. | https://photos.google.com |
| System Documentation | Internal docs from PHP, MongoDB, and PostgreSQL used in development. | — (see /docs folder in repo) |
