Calendar Optimizer
- WIP
The tool for you to upload multiple documents, extract all the important dates and add them to your calendar so you never miss any deadline or appointment, ever again.
2026-05-24
Setup:
- Next.js full-stack monolith — React frontend + API routes in one repo.
- LLM: groq-sdk, Llama 3.1 - Using this because it's free and the cheapest. Model upgrades might come later if required.
Simple flow:
- User uploads a single file
- For the uploaded file, use
PDFParselibrary to extract the text from the PDF - Pass in the text to the LLM.
Cases to handle later on:
-
Uploading multiple files: Just need to handle n cases. Should be pretty straightforward.
-
Large PDFs: Given that I am using the free model, I can only process smaller pdfs with fewer than 1000 words given the token size limitations.
Possible solutions I haven't experimented with:
- Filter the text extracted from the pdf easily so I don't have to pass the entire block of text to the LLM.
- Split up the text into blocks of 1000 characters since I am mostly extracting calendar events and I don't really need the entire text context
- Use a larger model (more expensive, not ideal for a personal use project)
The ideal input would be:
curl -X POST http://localhost:3000/api/extract \
-H "Content-Type: application/json" \
-d '{"fileUrls":["https://slicedinvoices.com/pdf/wordpress-pdf-invoice-plugin-sample.pdf"]}'
with the following output:
{
"calendar_items":[
{
"start_date_time":"2016-01-25T00:00:00Z",
"end_date_time":"2016-01-25T00:00:00Z",
"estimated_duration":0,
"title":"Payment Due",
"description":"Payment due for invoice INV-3337",
"contact_number":"admin@slicedinvoices.com"
},
{
"start_date_time":"2016-01-31T00:00:00Z",
"end_date_time":"2016-01-31T00:00:00Z",
"estimated_duration":0,
"title":"Late Payment Fee",
"description":"Late payment fee for invoice INV-3337","contact_number":"admin@slicedinvoices.com"
}
]
}
The next step will be to find out how I can add these to my google calendar easily (in one batch). And the build the client side for this (and I am very excited to do this!)