Skip to content

lrseda/Testgo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation



Nyebe

AD - CI4 Template

This repository is a beginner-friendly CodeIgniter 4 template. It helps teams quickly bootstrap backend + frontend projects, with simple sample modules that show how to extend the system.




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

Overview

This template provides a minimal CodeIgniter 4 project layout with conventions for file organization, commit practices, and simple modules.

It is designed to be easy to start with and a reference for adding new features.

  • Purpose: a clean starting point for CI4 apps.
  • Audience: developers who want a predictable structure and quick onboarding.

Key Components

These are sample modules included (or suggested) for learning how to add features:

Component Purpose Notes
Auth (Sample) Basic login/logout and role check (admin/user). Uses CI4 sessions + MySQL users table.
CRUD Module Example entity (Posts or Tasks) with create/read/update/delete. Demonstrates Controller → Service → Repository pattern.
Scheduler (Sample) Simple to-do list with due dates. 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: 3390
  • 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

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published