Seqtto (Internship)
The 6-beat story
Section titled “The 6-beat story”- What: Seqtto’s internal and external platform: a job/internship portal plus admin tooling.
- My role: I built the portal (listings, applications, tracking), the automated document generation + email system, and a CMS for the marketing site.
- Architecture:
Candidate ──► Portal UI ──► API ──► DB (jobs, applications, documents)│Admin dashboard ──(approve)────┤├──► PDF-lib: fill template → PDF bytes└──► Email service: send PDF as attachment/link
- Hard problem: [e.g., positioning text precisely on certificate templates, handling long names/fonts, email deliverability/spam, generating many documents at once.]
- Result: Admins went from manually creating documents in [Canva/Word] to one click → [N documents/week automated].
- Improve: Move generation to a background queue, store generated PDFs in object storage with a record, add idempotency so a document is never emailed twice, add delivery-status tracking.
Q: Walk me through what happens when an admin approves a candidate.
“The admin clicks approve. The API updates the application’s status to approved and triggers the document flow: we load the offer-letter template, fill in the candidate’s name, role, dates and a unique ID with PDF-lib, get the PDF bytes, and send them through [email service] as an attachment. We save a record of the generated document so it can be re-downloaded.”
Q: How does PDF-lib work? How did you put the name in the right place?
“PDF-lib is a pure-JS library that can create or modify existing PDFs, in Node or the browser. We loaded a designed template PDF with PDFDocument.load(bytes), got the page, embedded a font with embedFont, and used page.drawText(name, { x, y, size, font }) at fixed coordinates. For centering, I measured the text width with font.widthOfTextAtSize(text, size) and computed x = (pageWidth - textWidth) / 2. Then pdfDoc.save() returns a Uint8Array.”
Alternative if you used form fields: pdfDoc.getForm().getTextField('name').setText(...) and then form.flatten().
Q: Why not generate PDFs from HTML with Puppeteer?
“Puppeteer launches a headless Chrome, which is heavy: lots of memory, slow startup, hard to run serverless. Our documents were fixed-layout templates, so filling a PDF template with PDF-lib was much lighter and faster. If we needed complex dynamic layouts like tables, HTML→PDF would be better.”
Q: What if the email fails to send? What if the admin clicks approve twice?
Be honest about what you did, then show what you’d do:
“Currently, [we caught the error and showed it to the admin / logged it]. Ideally I’d make it a background job with retries and exponential backoff, store a status (pending/sent/failed) per document, and make the trigger idempotent: the approve endpoint checks whether a document already exists for that application before generating, so double-clicks don’t send two offer letters.”
Q: Is sending email synchronously in the request a problem?
“Yes, at scale. The admin’s request waits for PDF generation + SMTP, which can take seconds, and if it times out the state can be inconsistent. The better design is: the request updates the DB and enqueues a job, and a worker generates and sends. The UI shows status. For our volume it was acceptable, but I’d change it.”
Q: How did you prevent fake certificates?
Good answer if true or as an improvement: “Each certificate has a unique ID stored in our DB, and there’s a public verification page (/verify/:id) or a QR code linking to it, so anyone can check that it’s genuine.”
Q: Why build a custom CMS instead of using WordPress, Strapi, or Sanity?
Give real reasons: “The content needs were small and specific (a few sections like jobs, team, and testimonials), we wanted it inside our existing admin and DB with the same auth, and we didn’t want another service to host or pay for.” Then the tradeoff: “With more content types or editors, I’d use a headless CMS rather than maintain our own.”
Q: How does content from the CMS get onto the website? Is it fast?
“Content is stored in the DB as [structured fields / JSON / markdown]. The website fetches it [at build time / on request / with ISR revalidation]. When an admin saves, we [revalidate the page / it shows on next load].” Know which one. If it’s Next.js, mention revalidatePath/revalidateTag.
Q: How did you handle authorization in the admin dashboard?
“Only users with the admin role can access admin routes. This is checked on the server [middleware/route guard], not just by hiding buttons in the UI, because the API must enforce it.”
Q: What did you learn at your internship?
“Working with real users: non-technical admins used my CMS and told me what was confusing, so I learned to design for them. Also, automating a manual process has a measurable impact, and production code needs error handling for the unhappy path, like failed emails.”