Skip to content

Latest commit

 

History

45 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation



Nyebe

CAFENOD

Cafenod is a website built using CodeIgniter 4, designed for a coffee house. It features a landing page with a hero section, product cards, and a call-to-action. The site also includes login and signup pages for user authentication, a mood board showcasing the brand's visual style, and a roadmap outlining the project's development.




Table of Contents
  1. Overview
    1. Key Components
    2. Technology
  2. Rules, Practices and Principles
  3. Resources

Overview

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

Key Components

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.

Technology

Language

HTML CSS JavaScript PHP

Framework/Library

Tailwind CSS CodeIgniter

Databases

MySQL PostgreSQL MongoDB Firebase


Quick Start (Docker)

Run the development stack and the app (rebuild if needed):

docker compose up --watch

Common 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 UserzSeeder

If you prefer, you can include -f "compose.yaml" explicitly; the shorter commands above work when running from the repo root.

Ports & Database

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.

Rules, Practices and Principles

  1. Always prefix project titles with AD-.

  2. Place files in their respective CI4 folders (Controllers/, Services/, Repositories/, Views/).

  3. Naming conventions:

    Type Case Example
    Classes PascalCase UserService.php
    Interfaces PascalCase UserRepositoryInterface
    DB tables/fields snake_case users, created_at
    Docs kebab-case dev-manual.md
  4. Git commits use: feat, fix, docs, refactor.

  5. Use Controller → Service → Repository pattern.

  6. Assets (CSS/JS/img) live under public/.

  7. Docker configs are at the repo root (docker-compose.yml, nginx.conf).

  8. 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

Resources

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)

About

quad

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

Generated from nyebe/CI4-template