Code related demos
Demo: Add-to-calendar link generator
The use case
Imagine that you regularly organize events and you want to make it easy for people to add them to their calendar.
You could ask them to copy and paste the information on their calendar app. Or event to import the ics file. But that's not very user friendly.
But what if you could generate a clickable link that people could just click on and that would add the event to their calendar?
In this demo, we will use an AI assistant to generate a simple webapp that takes event details as input and generates an HTML snippet containing "Add to Calendar" links for popular calendar apps like Google Calendar.
Pedagogical goal
This demo shows how anyone can use AI coding capabilities of a modern AI assistant to generate a (simple) webapp that runs directly in the AI assistant.
This demo currently works with ChatGPT and its Canvas feature and Claude with its Artifacts feature.
Alternatively, you could showcase how the same prompt works with an Agentic app builder like Bolt, Replit or Lovable (learn more about these tools in this article).
The prompt
You have two variants of the prompt. Depending on your goal, you can choose one or the other.
Variant 1:
Build a web app that takes event details as input and generates an HTML snippet containing "Add to Calendar" links for Google Calendar, Outlook Live, and Office 365.
Variant 2:
Build a web app that takes event details as input and generates an HTML snippet containing "Add to Calendar" links for Google Calendar, Outlook Live, and Office 365.
Important: Ensure the application correctly parses, validates, and formats user-inputted datetime-local values into ISO 8601 format while handling time zones and encoding them appropriately for calendar links.
- Usage:
- Enter the event details (title, start/end date, location, etc.).
- Click Generate Snippet.
- Copy the generated HTML snippet to your own application or webpage.
- Code: See the “AddToCalendarWebApp” in the canvas on the right. You can run this in any React setup. It uses shadcn/ui for components and Tailwind for styling (optional).
Demo2: TBD
More code demos to come.