Paste AI-generated text and get a natural, human-sounding version with an AI detection score — before and after.
- 4 writing modes — Casual, Professional, Student, Creative
- AI detection scoring — heuristic score (0-100%) before and after rewriting
- JWT auth — register/login, each user sees only their own history
- Rewrite history — all rewrites saved to PostgreSQL, accessible anytime
- Side-by-side view — original vs humanised text
| Layer | Tech |
|---|---|
| Frontend | Next.js 15, TypeScript, Tailwind CSS |
| Backend | FastAPI (Python) |
| Database | PostgreSQL |
| LLM | Groq (llama-3.3-70b-versatile) — free |
| Auth | JWT (bcrypt passwords) |
| Deploy | Vercel (frontend) + Render (backend) |
cd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp .env.example .envEdit backend/.env:
DATABASE_URL=postgresql://postgres:password@localhost:5432/humaniser
SECRET_KEY=any-long-random-string
GROQ_API_KEY=your_groq_key # free at console.groq.comStart PostgreSQL (Docker easiest):
docker run -d --name humaniser-db \
-e POSTGRES_PASSWORD=password \
-e POSTGRES_DB=humaniser \
-p 5432:5432 postgres:15Run backend:
uvicorn main:app --reload
# → http://localhost:8000
# → API docs: http://localhost:8000/docscd frontend
npm install
cp .env.example .env.local
npm run dev
# → http://localhost:3000The heuristic scorer checks for patterns common in AI-generated text:
- AI-typical phrases — "it is important to note", "furthermore", "delve into", "leverage" etc.
- Sentence length uniformity — AI tends to write similarly-lengthed sentences
- Passive voice ratio — AI overuses passive constructions
- Lack of contractions — AI often avoids "don't", "it's", "can't"
- Perfect paragraph structure — AI writes suspiciously balanced paragraphs
Score: 0-100% (higher = more AI-like)
Each mode uses a carefully engineered system prompt that:
- Instructs the LLM to avoid specific AI-typical phrases
- Requests varied sentence lengths
- Encourages natural contractions and imperfections
- Sets the appropriate tone for the mode
The LLM used is llama-3.3-70b-versatile via Groq (free tier).
Backend → Render:
- Push to GitHub
- New Web Service → connect repo, root =
backend/ - Build:
pip install -r requirements.txt - Start:
uvicorn main:app --host 0.0.0.0 --port $PORT - Add env vars + a free Render PostgreSQL database
Frontend → Vercel:
- New Project → import repo, root =
frontend/ - Add:
NEXT_PUBLIC_API_URL=https://your-render-url.onrender.com - Deploy!
humaniser/
├── backend/
│ ├── main.py # FastAPI app
│ ├── database.py # PostgreSQL setup
│ ├── auth_utils.py # JWT helpers
│ ├── requirements.txt
│ └── routers/
│ ├── auth.py # /auth/register, /auth/login
│ └── humanise.py # /humanise/ + AI scoring logic
│
└── frontend/
└── src/
├── app/
│ ├── dashboard/page.tsx # Main tool + history
│ ├── login/page.tsx # Auth page
│ └── globals.css
└── lib/
├── api.ts # Axios client
└── auth-context.tsx # Auth state
- Prompt engineering — system prompts designed to avoid specific AI patterns
- Heuristic AI detection — custom scoring algorithm using regex + NLP patterns
- JWT auth — full register/login flow with bcrypt password hashing
- PostgreSQL — relational DB for user and rewrite history storage
- FastAPI — async Python backend with dependency injection
- Full-stack — Next.js frontend + FastAPI backend, separately deployable