This application manages a waiting list, allowing users to sign up and admins to add, remove, and reorder users.
project_root/
├── public/ # Public files for users and admins
│ ├── index.html # Main page for users to join the waiting list
│ ├── admin_dashboard.html # Admin dashboard to manage the list
│ ├── api_proxy.php # Proxy to access backend API
│ └── css/ # Optional CSS files
├── api/ # Backend functionality (API endpoints)
│ ├── add_user.php # Adds a user to the waiting list
│ ├── remove_user.php # Removes a user by ID
│ ├── move_user.php # Moves a user up or down in position
│ ├── get_waiting_list.php # Fetches the waiting list
│ ├── login.php # Processes admin login
│ ├── logout.php # Processes admin logout
└── waiting_list.db # SQLite database file
index.html
to join the waiting list.admin_dashboard.html
provides an interface for admins to manage the list by adding, removing, or reordering users.api_proxy.php
routes frontend requests to backend functionality located in the api
folder.Clone the repository to your local machine.
Ensure you have PHP and SQLite installed.
Set up the SQLite database (waiting_list.db
) in the project root.
Start a local server with PHP:
php -S localhost:8000 -t public
Open http://localhost:8000
in your browser to access the application.
public
folder.waiting_list.db
file is readable and writable by the server, and that the API folder and its files are secured from direct access.Each backend function has its own file in the api
folder, accessed through api_proxy.php
:
api_proxy.php?endpoint=add_user.php
api_proxy.php?endpoint=remove_user.php
api_proxy.php?endpoint=move_user.php
api_proxy.php?endpoint=get_waiting_list.php
When contributing:
api_proxy.php
for all frontend requests to the backend.