What: A very simple Kanban board for managing daily tasks, just for local use and without authentication.
How:
Keeping things simple for this project with minimum dependencies - just pure PHP REST api for the back-end, vanilla JS for the front-end. Builds using Parcel.
Why: To familiarize myself with PHP, and to practice some pure Javascript for a change.
Getting started:
Back-end:
- Install LAMP if not installed.
- Set up the kanban database:
CREATE TABLE
task
(id
int(11) NOT NULL AUTO_INCREMENT,content
varchar(200) NOT NULL,status
int(11) NOT NULL, PRIMARY KEY (id
) ) - Deploy /api folder, and configure database access at /config/database.php
Front-end:
- Install Parcel for bundling if not already installed (npm install -g parcel-bundler)
- Run "npm install"
- Run "parcel build ./front-end/src/index.html" to create a /dist folder, and deploy its content to the server.
- For development server, change relative API path at index.html to full address, and run "parcel ./front-end/src/index.html".
The back-end code is modified from tutorial: https://www.codeofaninja.com/2017/02/create-simple-rest-api-in-php.html