A simple and vanilla php Rest CRUD with similar programming to emacs-personal for easy extents

saravia 3d54885759 . 1 anno fa
backend d65f0f7c66 upd 2 anni fa
frontend 575dcf2734 upd 2 anni fa
.gitignore 0620c6c1b9 upd 2 anni fa
LICENSE 81e16f1dc5 Initial commit 2 anni fa
README.md 12b9c15ad5 upd 2 anni fa
favicon.ico ccb2aa4583 upd 2 anni fa
index.php 3d54885759 . 1 anno fa
utils.php 3d54885759 . 1 anno fa

README.md

php-personal

Guide for ubuntu 22.04 (commin soon)

Users CRUD for personal-tube in PHP

Requeriments

  • php
  • php-pdo
  • mariadb-server
  • mariadb-client

and maybe you prefer enable 'errors' for development time

  • Put display_errors = On on file /etc/php/php.ini

Install a mysql db on your system

  • You need be root becose with doas or sudo not works the mariadb installation.
  • Note: user and libre will be replace by your user and group case in your machine.
    • apt install mariadb-server mariadb-client
    • mv /var/lib/mysql ~
    • mkdir -p /var/lib/mysql
    • chown user:libre /var/lib/mysql
    • mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
    • service mariadb start
    • mysqladmin -u root password 1234
    • exit

For the next steps you dont need be root

Create a database

  • mysql -uroot -p (1234)
  • create database php_personal;
  • quit

  • for this example i use a database name but you can change if prefer but too indicate on ~/.bashrc

Becose you need add to ~/.bashrc

export EV_php_user='root'
export EV_php_pass='1234'
export EV_php_name='php_personal'
export EV_php_host='127.0.0.1'

Finally clone and run

  • git clone https://notabug.org/saravia/php-personal.git
  • php -S localhost:8080 -t php-personal

Scalable backends modes

Mode force scalabe every run

  • This mode force reinstall the hidden querys on all backends, removing and install again, is for development mode tables edition.

Mode install and use only

  • Too you can run one time with the exec uncomment and after finish run and install all the backends, you can comment the exec line for use only.

TODO

  • [*] Create user.
  • [*] Read user.
  • [*] Read single.
  • [*] Soft delete.
  • [*] Update user.
  • [*] User auto creation.
  • [*] Print rest info.
  • [*] Rest library.
  • [*] Auto create database.
  • [*] Environment variables for install EV_php_name Environment php.
  • [*] Not duplicate username.
  • [*] Rol superuser needed for update rols.
  • [] Like be optional: One client logged at time.
  • [] Like be optional: Timeout hash.
  • [] Like be optional: Creation of temporal folder symlink.
  • [] Like be optional: Remove temporal symlink folder from 24Hours logged.
  • [] Like be optional: Hack command for test endpoind request with restclient.

Usuarios

  • [*] Usuarios: Mantenimientos.
  • [*] Usuarios: Auto instalación.
  • [*] Usuarios: Manejo de contraseña con Seguridad.

Funcionalidad cliente

  • [*] Interfaz web para vídeos.
  • [*] Home público como inicio de sesión (pide identificarse).
  • [*] Agregar lógica a las plantillas para usuarios.
  • [*] Manejo de cookies conjunto cabeceras para identificación.
  • [*] Cierre de sesión en un tiempo determinado (1 año).
  • [*] Redirección para no usuarios.

Funcionalidad básica faltando (2h)

  • [*] Duplicación de usuarios.
  • [*] Manejo de roles.

Funcionalidad administrador

  • [*] Inicio de sesión.
  • [*] Agregar usuarios.
  • [*] Modificar usuarios.

Rentar servidor

  • [] Calculo de las capacidades del servidor.
  • [] Evaluar cuantos usuarios se pueden tener al mismo tiempo.
  • [] Evaluar espacio en disco.
  • [] Rentar un dominio.
  • [] Rentar un servidor.

Final

  • [] Instalar el servidor (hyperbola, ngix).
  • [] Instalar la base de datos (mariadb).
  • [] Instalar videoteca.
  • [] Agregar los artículos vídeos y archivos.
  • [] Enseñar como crear usuarios.