HakiDocs

Inspiration

HakiDocs was inspired by a problem that affects millions of people: legal help is often difficult to access, expensive, or intimidating. In Kenya, many people face issues such as landlord disputes, unfair dismissals, debt recovery, and business disagreements but don't know how to create the legal documents needed to protect their rights.

I wanted to build a tool that could make legal documentation accessible to everyone, not just those who can afford legal services. The idea was simple: if people can explain their problem in plain language, AI should be able to help them create a professional legal document.

What It Does

HakiDocs is an AI-powered legal document generator that helps users create formal legal documents in seconds.

Users describe their situation in English, Kiswahili, or Sheng, and HakiDocs transforms that description into a professionally structured legal document. Instead of searching for templates or struggling with legal language, users receive a document tailored to their specific situation.

The platform aims to simplify access to legal documentation while making the process faster, more affordable, and more accessible.

How I Built It

I built HakiDocs entirely as a solo developer.

The frontend was built using Next.js, React, TypeScript, and Tailwind CSS to provide a modern and mobile-friendly user experience. The backend was developed using FastAPI and Python to handle document generation and API requests efficiently.

At the core of the platform is the Google Gemini API. I designed custom prompts and workflows that convert informal user descriptions into professionally formatted legal documents. I also integrated PostgreSQL and SQLAlchemy for data management and deployed the application using Vercel for the frontend and Render for the backend.

Building HakiDocs required combining AI, backend development, frontend engineering, database design, and product thinking into a single solution.

Challenges I Faced

One of the biggest challenges was ensuring the generated documents were both professional and contextually relevant. Legal documents require structure and precision, while users often describe their situations informally or provide incomplete information.

Another challenge was designing prompts that could reliably understand different communication styles, including English, Kiswahili, and Sheng, while still producing formal legal language.

As a solo developer, I also had to balance product design, development, testing, deployment, and debugging within a limited timeframe.

Accomplishments I'm Proud Of

The accomplishment I am most proud of is building a complete end-to-end AI product that addresses a real societal challenge.

HakiDocs demonstrates how AI can help bridge the gap between ordinary citizens and legal services. It successfully transforms natural-language descriptions into structured legal documents and provides a user experience that is simple enough for non-technical users.

I am also proud that the project was designed, developed, tested, and deployed entirely by me.

What I Learned

Building HakiDocs taught me valuable lessons about AI application development, prompt engineering, system design, and user experience.

I learned how to integrate large language models into real-world workflows, how to design prompts for specialized use cases, and how to build a production-ready application using modern web technologies.

Most importantly, I learned that the best technology solutions focus on solving real problems for real people.

What's Next for HakiDocs

This project is only the beginning.

My vision is to expand HakiDocs into a broader legal-access platform that helps people across Kenya and eventually across Africa. Future improvements include additional document types, multilingual expansion, AI-powered document review, secure document storage, and integrations with legal aid organizations.

Ultimately, I want HakiDocs to make legal documentation and basic legal assistance more accessible to anyone, regardless of their location, education level, or financial situation.

Built With

Share this project:

Updates