This repository documents the self-learning activities undertaken as part of Task 2 (Advanced) for INFO1111, with a focus on enhancing a strata management web application through the integration of PHP and real-time database capabilities on Vercel.
The application is designed to support strata-titled apartment buildings, aligning with the requirements of the Strata Schemes Management Act 2015 (NSW). It enables self-managed committees to handle unit owner records, budget management, maintenance tracking, and levy generation.
The primary aim of this self-learning task was to explore advanced backend integration using PHP (not natively supported on Vercel) and to connect this with a real-time PostgreSQL database for storing strata-related records. Additional goals included:
- Demonstrating cookie-based user session functionality
- Comparing PHP + serverless deployment against other web development options
- Creating practical, context-relevant application features using PHP
- Vercel (with custom runtime support for PHP)
- PHP 8.1
- Neon.tech (PostgreSQL database)
- Supabase Client (for frontend interaction)
- HTML / CSS / JavaScript
- Implemented a
vercel-phpruntime to allow PHP execution on Vercel. - Created a
levy.phpendpoint to simulate dynamic generation of levy notices. - Enabled dynamic routing and server-side processing within a static Vercel deployment.
- Connected the application to a PostgreSQL database hosted on Neon.tech.
- Integrated database queries into at least three application pages:
- Unit owner dashboard
- Maintenance request log
- Financial reports viewer
- Implemented cookies to identify the currently logged-in user across sessions.
- Used this mechanism to personalise page content (e.g., display logged-in unit number).
- PHP code is modular and structured for serverless environments.
- Screenshots and annotated demonstrations are included in the
/evidencefolder. vercel.jsonis used to define the custom runtime and route rewrites.
- PHP is lightweight, easy to set up, and widely supported.
- Server-side processing on Vercel allows dynamic features in a static-first deployment.
- Integration with PostgreSQL enables robust, scalable data storage.
- PHP is not natively supported by Vercel, requiring extra configuration.
- Stateless environments limit persistent session management.
- Debugging PHP on serverless platforms is more complex than traditional servers.
This approach is ideal for low-cost, quick-deploy admin dashboards where server-side logic is minimal but still required (e.g., levy calculation or form validation).
Compared to using server-side JavaScript (e.g. with Node.js), PHP requires more setup on Vercel but benefits from simplicity and mature ecosystem support. Traditional LAMP stacks provide persistent session storage and native PHP execution but require infrastructure management, unlike Vercel’s serverless model.
- This task helped reinforce backend fundamentals while exploring serverless deployment constraints.
- Cookie and session management presented practical challenges that were overcome through reading documentation and testing.
- Future improvements would include structured authentication and use of managed authentication platforms (e.g., Auth0 or Supabase Auth).
This self-learning report was completed independently, with all source code and screenshots available in this repository. The features developed contribute directly to the broader strata management application initiated in Task 1.