Case Study: How We Built an Automated Legal Platform (UK Name Change)
Most people think of a "website" as a digital brochure—some text, some images, and a contact form. But at Custom Coded Websites, we build web applications: sites that actually do work.
A perfect example of this is our recent project: UK Name Change.
The client approached us with a clear problem: The legal process of changing a name in the UK is simple, but solicitors charge £150+ to draft the paperwork. The client wanted to democratise this by building a platform that could generate legally binding Deed Polls instantly, 24/7, for a fraction of the cost.
Here is how we used Python & Django to automate an entire legal service.
The Challenge: Precision at Scale
This wasn't just about displaying information. The system needed to:
- Capture Complex Data: Handle old names, new names, addresses, and children's details with zero margin for error.
- Process Payments: Securely take payments via credit card (Stripe).
- Generate Legal Documents: Instantly create a bespoke, print-ready PDF Deed Poll containing specific legal phrasing based on the user's input.
- Deliver Instantly: Email the documents to the customer within seconds of purchase.
A standard WordPress site with plugins simply couldn't handle this logic securely or reliably.
The Solution: A Custom Django Architecture
We chose Django (a high-level Python framework) for this build. Django is the same technology used by Instagram and Pinterest, known for its "battery-included" security and scalability.
1. The PDF Generation Engine
The core of the business is the document itself. We wrote a custom Python script that acts as a "Digital Solicitor."
When a user submits the form, our code takes their data and dynamically injects it into a strict legal template. It automatically handles formatting issues (like long names or double-barrelled surnames) to ensure the final PDF looks professional and official.
2. Stripe Payment Integration
Security was paramount. We integrated Stripe's API directly into the backend. Crucially, we used "Webhooks" to link the payment to the document generation.
This means the PDF is only generated once Stripe confirms the funds have cleared. It happens in milliseconds. The user clicks "Pay," and before the success page has even finished loading, their legal documents are already in their inbox.
3. Data Validation & Security
Because these are legal documents, data integrity is vital. We built custom validation rules to stop users from entering invalid characters or making common mistakes (like forgetting to capitalize their new surname).
Furthermore, because we didn't use WordPress plugins, the site is hardened against attacks. Customer data is processed securely without being exposed to third-party vulnerabilities.
The Result: A Business on Autopilot
The launch of UK Name Change has been a massive success.
- Zero Manual Work: The business owner does not need to draft a single document. The code does 100% of the fulfillment.
- High Margins: Because the delivery is digital and automated, the operating costs are incredibly low.
- Speed: Users can change their name at 3 am on a Sunday and get their documents immediately.
Do You Have a Complex Business Idea?
This project proves that a website can be more than just a marketing tool—it can be the entire engine of your business.
If you have an idea that requires custom logic, automation, or secure data handling, "drag-and-drop" builders won't cut it. You need a software partner who can write the code to make it happen.
Let’s turn your idea into a working platform.