Virginia Divorce Filings

A website that generates the paperwork required to file a divorce

Inspiration

    A lawyer who runs a mediation firm needed a website that allows people to fill in information about their divorce and it prints out three PDFs. The lawyer, who represents both parties, cannot provide legal advice about these documents, meaning the website needed robust validation to prevent submission errors.This project was my first professional project, and it required careful planning and execution to meet the client's needs while ensuring a smooth user experience.

How I built this project

    At the time, I was experimenting with Svelte, so it became the natural choice for this project. I paired it with shadcn-Svelte components, which provided a robust foundation for form creation. Generating PDFs presented a new challenge. Drawing on lessons from previous projects, I researched extensively and chose PDFKit as my tool. It proved to be a suitable choice for creating complex, structured documents.
    The first step was to produce the initial document. Using sample templates provided by the client, I designed the PDF layout and content. It felt like creating an elaborate Mad Lib, where placeholders were dynamically populated with user-submitted information. Once this document was working, I expanded the approach to create the other two required PDFs.
    After completing the PDF generation, I turned to building the user form. This form needed strong validation to ensure users submitted accurate information. I used Zod and SuperForms to handle both client-side and server-side validation. This approach was straightforward, much easier than regular expressions, and added an essential layer of reliability to the process.
    For delivering the PDFs, I had two options: provide a direct download or send them via email. I opted for email delivery to ensure users wouldn’t lose their documents. This was my first time setting up automated emails and working with Google's OAuth2. While it required some effort to implement, this system became the backbone of the program, providing a seamless user experience.
    Finally, I integrated a payment processor. I chose Stripe because of its reputation for simplicity and reliability. After learning how the system works, implementing it was straightforward thanks to the helpful documentation and pre-written code snippets provided by Stripe.

Conclusion

    This project was my first step into professional software development, and it came with an added layer of pressure. I wanted to deliver a rock-solid program to impress the client and minimize future maintenance needs. Through this experience, I learned how to: build systems with strong validation to ensure reliability, generate professional PDFs dynamically, implement payment processing with Stripe, and collaborate with a client and understand their needs.
    The project was a success, and it taught me the importance of writing code that is not only functional but maintainable. More than anything, this experience gave me the confidence to tackle more professional projects in the future.

Technologies

  • Svelte

  • SvelteKit

  • shadcn-Svelte

  • ZOD

  • SuperForms

  • PDFKit

  • Node.js

  • Stripe