Inspiration

As AI becomes more integrated into everyday applications, users are increasingly sharing sensitive information such as names, email addresses, phone numbers, and financial details. We wanted to solve a simple but important problem: how can developers use powerful AI models without exposing users' personal data? PrivacyGate was inspired by the idea that privacy should be the default, not an afterthought.

What it does

PrivacyGate is a privacy-first middleware that sits between an application and an AI model. Before a request reaches the LLM, it automatically detects and redacts personally identifiable information (PII), replacing it with placeholders. The AI processes only the sanitized text, and once a response is received, PrivacyGate securely restores the original information before returning the final result to the user.

How we built it

We built the backend using FastAPI and Python. We implemented a PII redaction engine using pattern matching, generated placeholder mappings, integrated an LLM to process only redacted prompts, and rehydrated the AI's response with the original data. We also explored integrating Midnight to strengthen the privacy layer by protecting sensitive data and proving its integrity without exposing the underlying information.

Challenges we ran into

The biggest challenge was learning Midnight's ecosystem within a 48-hour hackathon while also building the application itself. Designing a privacy-preserving workflow that was both practical and easy to demonstrate also required several iterations.

Accomplishments that we're proud of

We're proud of building a working end-to-end privacy pipeline that demonstrates how AI can operate without direct access to users' sensitive information. We also designed the project in a modular way, making it easy to swap AI providers and extend the privacy layer in the future.

What we learned

This project taught us that privacy-preserving AI is achievable without sacrificing usability. We also gained experience designing secure middleware, working with modern AI APIs, and exploring confidential blockchain technologies like Midnight.

What's next for PrivacyGate

Our next steps are to complete the Midnight integration for secure proof storage, support more advanced PII detection using NLP, add authentication and audit logs, package PrivacyGate as a reusable API/SDK, and enable developers to integrate privacy-preserving AI into their own applications with minimal effort.

Built With

Share this project:

Updates

Submission history