Welcome to the API documentation for the Deepfake Detection Web App. This web service allows users to sign up, log in, and upload video files to detect possible deepfake manipulations using basic blur artifact analysis.
This documentation is structured to help developers integrate and use the backend API effectively. Each route is explained with request types, expected data, and response examples in JSON or HTML format.
http://localhost:5000/
All routes mentioned below are based on this default development URL. Change it accordingly if deployed in production.
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Renders the login page |
| POST | /login |
Authenticates a user and starts a session |
| GET | /signup |
Renders the signup page |
| POST | /signup |
Registers a new user |
| GET | /home |
Renders user home/dashboard (after login) |
| POST | /upload |
Uploads a video for deepfake analysis |
| GET | /logout |
Logs the user out and ends the session |
| GET | /ststic/<filename> |
Serves static files from the ststic/ directory |
📌 Expected Difference (based on research and experiments):
Type Avg Blue Intensity
Real ~110–130
Deepfake ~90–110
📉 Deepfakes often show lower blue levels and less blue contrast overall, especially in areas where the fake face is blended.
Registers a new user with Gmail-only email validation.
{
"username": "preeti",
"email": "preeti@gmail.com",
"password": "SecurePassword"
}<h3>Signup successful, welcome preeti!</h3><h3>Only Gmail addresses are allowed!</h3>or
<h3>Username or Gmail already exists!</h3>Authenticates the user and stores a session.
{
"username": "preeti",
"password": "SecurePassword"
}- Redirects to
/home.
<h3>Invalid credentials</h3>Displays the dashboard after a successful login.
- 🔒 Requires user session (
session['user']). - Redirects to
/if not logged in.
Allows the user to upload a video file for blur-based deepfake detection.
| Field | Type | Description |
|---|---|---|
| video | file |
The video file to test |
🛑 Deepfake Detected!or
✅ Video Looks Real.Logs out the current user by clearing the session.
- Redirects to
/.
Serves CSS, JS, images, etc., from the ststic/ directory.
⚠️ You have a typo in the folder name (ststicinstead ofstatic). Either fix it or document it properly for consistency.
Let me know when you're ready, and I’ll proceed with a detailed security audit covering:
- 🔐 Session management
- 🛡️ SQL injection
- 🗂️ File upload validation
- ❌ XSS and CSRF
- 📁 Directory traversal
- 🔄 Misc recommendations
Would you like me to start the security audit now?