This project is a full-stack, API-driven personal contact manager developed as part of a small group software engineering project. The application allows users to register, log in, and securely manage their own contacts, including creating, viewing, searching, updating, and deleting contact records.
The application is deployed on a remote server, accessed via a custom domain, and demonstrated live during a team presentation.
- User registration (sign up)
- User login with credentials
- Users can only access their own data
Logged-in users can:
- Create new contacts
- View all of their contacts
- Update existing contacts
- Delete contacts (with confirmation)
Each contact includes:
- First Name
- Last Name
- Phone Number
- Date Created
- Associated User ID
- Server-side search using MySQL queries
- Partial match support (e.g.,
Jo→ John, Jones) - Case-insensitive
- No client-side caching of contact lists
| Field | Type |
|---|---|
| ID | INT (PK) |
| FirstName | VARCHAR(50) |
| LastName | VARCHAR(50) |
| Login | VARCHAR(50) |
| Password | VARCHAR(50) |
| Field | Type |
|---|---|
| ID | INT (PK) |
| FirstName | VARCHAR(50) |
| LastName | VARCHAR(50) |
| Phone | VARCHAR(50) |
| VARCHAR(50) | |
| UserID | INT (FK) |
-
Create a DigitalOcean LAMP Droplet
- Ubuntu
- Basic Plan ($7/month)
-
Set and save your root password
-
SSH into the server:
ssh root@your_domain_or_ip
Apache, MySQL, and PHP are preinstalled.
cd /var/www/htmlDirectory structure:
/var/www/html
│── index.html
│── css/
│── js/
│── images/
│── LAMPAPI/
Login to MySQL:
mysql -u root -pCreate database:
CREATE DATABASE COP4331;
USE COP4331;Create tables:
CREATE TABLE Users (
ID INT AUTO_INCREMENT PRIMARY KEY,
FirstName VARCHAR(50),
LastName VARCHAR(50),
Login VARCHAR(50),
Password VARCHAR(50)
);
CREATE TABLE Contacts (
ID INT AUTO_INCREMENT PRIMARY KEY,
FirstName VARCHAR(50),
LastName VARCHAR(50),
Phone VARCHAR(50),
Email VARCHAR(50),
UserID INT
);Create database user:
CREATE USER 'TheBeast' IDENTIFIED BY 'WeLoveCOP4331';
GRANT ALL PRIVILEGES ON COP4331.* TO 'TheBeast'@'%';All API endpoints live in:
/var/www/html/LAMPAPI
Each PHP file must include:
$conn = new mysqli("localhost", "TheBeast", "WeLoveCOP4331", "COP4331");Upload:
index.htmlcontacts.html/css/js/images
Use FileZilla or SFTP for uploads.
POST /LAMPAPI/Login.php
{
"login": "username",
"password": "password"
}POST /LAMPAPI/SearchContacts.php
{
"userId": 1,
"search": "Jo"
}Responses are returned as JSON objects or arrays.
- No localhost demos – application must be live
- No Python frameworks used
- Search is server-side only
- Users can only access their own data
- All communication uses JSON
- Repository is public as required
- Live Application: (add domain here)
- SwaggerHub API: (add link here)