php_http_apps_todo

A multi-user To-Do List web application built with a custom lightweight PHP framework ("php_http" foundations).

Features

Tech Stack

Component Technology
Language PHP 7.4+
Database SQLite (primary), PostgreSQL (optional)
ORM RedBeanPHP (vendored)
Frontend CSS Bootstrap 5.1 (CDN) + custom appwide.css
Templating Custom PHP output-buffering engine
Routing Custom query-string-based dispatcher

Quick Start

Prerequisites

Installation (Ubuntu)

sudo apt install php php-sqlite3

Run the Development Server

From the project root:

php -S localhost:8080 -t www -d session.save_path="$PWD/tmp/sessions"

Then open: http://localhost:8080/?r=todo_list

Note on sessions: The -d session.save_path=... flag points PHP sessions at the project-local tmp/sessions/ directory. Without it, the system default session.save_path (often /var/lib/php/sessions) may be unwritable, causing session_start() to fail silently and login to bounce back to the form. An absolute path is required because PHP's working directory during a request is www/.

Termux (Android)

On Termux, the default session.save_path is writable, so it can be omitted. Add -d opcache.enable=0 to avoid OPcache-related issues:

php -S localhost:8080 -t www -d opcache.enable=0

Directory Structure

php_http_apps_todo/
├── db/                     # Database layer
│   ├── rb-sqlite.php       # Vendored RedBeanPHP for SQLite
│   ├── red-bean-orm-use.php # ORM setup (connection)
│   ├── pdo.php             # Raw PDO utilities
│   ├── pdo_utilities.php   # PDO helper functions
│   ├── mysql.sql           # Alternative MySQL schema
│   ├── todo_db.sqlite      # SQLite database file
│   └── pgsql/              # PostgreSQL test scripts
├── manager/                # Business logic layer
│   ├── todo_manager.php    # Todo CRUD operations
│   └── user_manager.php    # User authentication & creation
├── routes/                 # Routing layer
│   ├── _router.php         # Route registry
│   ├── routes_todo.php     # Todo route handlers
│   ├── routes_user.php     # User route handlers
│   └── response_utilities.php # Redirect, JSON, auth helpers
├── templates/              # Presentation layer
│   ├── lib_template.php    # Custom template engine
│   ├── template_wrapper.php # HTML shell (Bootstrap, nav, footer)
│   ├── todo/               # Todo templates
│   └── user/               # User templates (login, register)
├── www/                    # Web root (public)
│   ├── index.php           # Entry point → redirects to router.php
│   ├── router.php          # Request dispatcher
│   └── css/
│       └── appwide.css     # Application-wide styles
├── readme.md               # Original readme
└── LICENSE.txt

Live Demos

Further Reading


Source: github.com/arkenidar/php_http_apps_todo