One place that checks every meeting, event and approval for a CEO, so visitors are never cancelled at the last minute.
This desk now runs the CEO's real diary, so the app itself is private. The screenshots below show every feature.
As Secretary to the CEO, meetings reach me from three places: visitors the CEO asks me to arrange, meetings he fixes himself and tells me about later, and events he has to attend. Nothing checked all three together, so meetings clashed and visitors were cancelled at the last minute. Company policy does not allow any app or AI to connect to Outlook, so the solution had to stand on its own.
Whether a meeting starts with me, a visitor or the CEO, it passes through the same check against all meetings and events, including travel and preparation buffers. The CEO approves with one tap from WhatsApp, visitors only ever see free times, and AI turns pasted messages into diary entries and writes polite replies.
The AI only reads text typed or pasted into the app. It never connects to Outlook or company email. The API key stays on the server, and the whole app keeps working without AI, using built-in templates and a rule-based reader.
This is the brief I gave the AI. The design was later changed to match this portfolio.
ROLE You are a senior PHP and MySQL developer. Build a complete, working web app called "CEO Appointment Desk" for an educational institute. I am the Secretary to the CEO and will be the admin of this app. PROBLEM Meetings for the CEO come from 3 places: 1. The CEO gives me a visitor's contact and I arrange the time. 2. The CEO fixes meetings himself and then informs me. 3. The CEO has events to attend. There is no single place that checks all of these, so meetings clash and visitors get cancelled at the last minute. Company policy does not allow AI or any app to connect to our Outlook, so this app must be fully standalone. TECH STACK - PHP 8 (plain PHP, no framework), MySQL, HTML, CSS, a little vanilla JavaScript - Must run on Hostinger shared hosting inside the folder /appointments - Database settings kept in a separate config.php file - Use PDO with prepared statements, password_hash for login, CSRF tokens on all forms, and escape all output - Clean, professional, mobile-friendly design (navy and white theme) USERS 1. Admin (Secretary): logs in with username and password and manages everything. 2. CEO: no login. Uses secure one-time links sent on WhatsApp. 3. Visitors: no login. Use a public booking link. DATABASE TABLES - users (admin login) - appointments: id, visitor_name, phone, email, organisation, purpose, date, start_time, end_time, source (Visitor Request / Arranged by Secretary / Fixed by CEO), status, notes, created_at - events: id, title, date, start_time, end_time, location, buffer_minutes (travel or preparation time), is_locked - approval_tokens: id, appointment_id, token, expires_at, used - status_history: id, appointment_id, old_status, new_status, changed_by, changed_at - settings: office hours, slot length (default 30 minutes), days off STATUSES Requested, Waiting for CEO, Approved, Confirmed, Rescheduled, Declined, Cancelled, Completed FEATURES 1. Admin dashboard: today's schedule, pending approvals, clash warnings, and counts for this week. 2. Add appointment form for the secretary. 3. Quick add (AI): a text box where I paste a message such as "Meeting with Mr. Gupta Thursday 4pm about MoU". AI reads it and fills in the name, date, time and purpose. I check it and then save. 4. Events register: add the CEO's events. Locked events plus their buffer time can never be booked over. 5. Clash checker: every time an appointment or event is added or edited, check it against all others, including buffer time. If there's an overlap, show a red warning that names what it clashes with. 6. Free slot finder: show the next 5 free slots within office hours. 7. Public booking page (/appointments/book.php): the visitor enters name, phone, email, organisation and purpose, and picks from FREE slots only. Never show the CEO's other meetings. After submitting, show "Request received, you will be confirmed shortly." Status becomes Requested. 8. CEO approval link: the admin clicks "Send to CEO" and the app creates a secure one-time link that expires in 48 hours, and opens WhatsApp (wa.me link) with a ready message. The CEO's page shows the details and 3 buttons: Approve, Suggest another time (choose from free slots), Decline. If there is a clash, it shows options: Keep this one / Move this one / Move the other one. 9. Appointment view page (view.php?id=): all details, status history timeline, and action buttons. 10. AI message writer: buttons that generate a confirmation, reminder, polite reschedule (with 2 new time options), or decline message. Each one has a Copy button and a "Send on WhatsApp" button. 11. Daily agenda: a printable one-page schedule for the CEO for any chosen date, and a WhatsApp-ready text version for the evening briefing. 12. Monthly report: total meetings, clashes caught, reschedules, cancellations, and meetings by source, with simple charts. 13. Search and filters by date, status and visitor name. AI RULES - Use the AI only on text I paste or type in the app. Never connect to Outlook or company email. - Keep the AI API key in config.php, never in the browser JavaScript. - If the AI is not available, the app should still work fully without it. DEMO DATA Add sample data: 10 appointments with different statuses, 3 events (for example Annual Day, Board Meeting, Admission Fair), and at least 1 clash, so the features can be shown. OUTPUT 1. The complete folder structure. 2. The full code for every file. 3. database.sql with tables and demo data. 4. Step-by-step instructions to upload to Hostinger, create the database and log in. 5. Default admin login details, and how to change them.