Skip to content

gnonymous1/CameraGPT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


Version Platform License PRs

JavaScript Netlify Functions JWT Auth WebCam


Gate. Capture. Redirect. A serverless visual security gateway that logs visitors with camera evidence before granting access to protected resources.


πŸ” What Is CameraGPT?

CameraGPT (Secure Gateway Portal) is a consent-based, serverless visitor verification layer. It sits in front of any protected link β€” visitors must pass through the gateway, approve camera access, and get logged with photographic evidence before being redirected to the protected destination.

Built entirely on Netlify's serverless stack β€” zero backend servers, zero infrastructure management.

[Visitor] β†’ [Public Gateway Link]
               β”‚
               β–Ό
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚  Camera Consent Prompt  β”‚  ← Consent-based image capture
    β”‚  Image Evidence Stored  β”‚  ← Netlify Blobs (serverless storage)
    β”‚  Metadata Logged        β”‚  ← IP, timestamp, user agent
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚  Redirect to Protected  β”‚  ← Only after successful log
    β”‚  Destination            β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚
    [Admin Console]  β†’  View evidence, manage profiles, review logs

✨ Key Features

Feature Description
πŸ“Έ Consent-Based Capture Visitor explicitly approves camera before capture occurs
πŸ” JWT-Secured Admin Admin console protected with token-based authentication
πŸ—‚οΈ Profile-Based Links Each gateway profile generates a unique public URL
πŸ–ΌοΈ Image Evidence Vault Captured images stored in Netlify Blobs, viewable in admin
πŸ“Š Access Log Tracking Capture success/failure + redirect status per visit
☁️ Zero-Server Deployment 100% Netlify Functions β€” no VPS, no Docker, no DB
πŸ”„ Redirect Control Configurable per-profile destination URLs
πŸ‘οΈ Visitor Verify Secondary verification flow for sensitive destinations

⚑ Quick Start

1 β€” Clone & Install

git clone https://github.com/gnonymous1/CameraGPT.git
cd CameraGPT
npm install

2 β€” Configure Environment

cp .env.example .env
# Fill in your values β€” see .env.example for all variables

3 β€” Deploy to Netlify

# Install Netlify CLI
npm install -g netlify-cli

# Link to your Netlify site
netlify link

# Deploy
netlify deploy --prod

Set these environment variables in your Netlify dashboard β†’ Site Settings β†’ Environment Variables:

Variable Required Purpose
JWT_SECRET βœ… Signs admin session tokens
ADMIN_EMAIL βœ… Admin login email
ADMIN_PASSWORD βœ… Admin login password

⚠️ Never commit .env to version control. Use .env.example as your template.

4 β€” Access the Portal

URL Purpose
/ Admin console β€” manage profiles, view evidence
/gateway/main-gateway Public gateway entry point

πŸ—οΈ Architecture

CameraGPT/
β”‚
β”œβ”€β”€ πŸ“„  index.html               Admin console UI
β”œβ”€β”€ πŸ“„  public-attendance.html   Public gateway page shell
β”œβ”€β”€ πŸ“„  visitor-verify.html      Visitor verification page
β”‚
β”œβ”€β”€ βš™οΈ   script.js                Admin console logic
β”œβ”€β”€ βš™οΈ   public-attendance.js    Capture & redirect flow
β”œβ”€β”€ βš™οΈ   visitor-verify.js       Verification logic
β”œβ”€β”€ βš™οΈ   face-recognition.js     Camera access & capture
β”‚
β”œβ”€β”€ netlify/
β”‚   └── functions/
β”‚       └── πŸ”§  api.mjs          Serverless API (JWT, Blobs, profiles)
β”‚
β”œβ”€β”€ 🎨  styles.css               UI styling
β”œβ”€β”€ πŸ“‹  netlify.toml             Netlify routing config
β”œβ”€β”€ πŸ“‹  _redirects               URL redirect rules
└── πŸ”  .env.example             Environment variable template

πŸ”’ Security

  • All admin routes protected by JWT authentication
  • Camera capture only occurs after explicit visitor consent
  • Credentials configured via environment variables only β€” never hardcoded
  • Image evidence stored in Netlify Blobs β€” not on public filesystem
  • JWT_SECRET should be a cryptographically random 256-bit string

Changing Default Credentials

⚠️ Change the default password before any production deployment.

Set ADMIN_EMAIL and ADMIN_PASSWORD in Netlify environment variables. If ADMIN_PASSWORD is not set, the system uses the fallback Admin@12345 β€” never leave this in production.

# Generate a strong JWT secret
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

πŸ› οΈ Local Development

# Start local Netlify dev server
netlify dev

# Admin console available at:
# http://localhost:8888/

# Public gateway at:
# http://localhost:8888/gateway/main-gateway

πŸ—ΊοΈ Roadmap

  • Multi-admin role support
  • Email notifications on visitor capture
  • Rate limiting on gateway endpoints
  • Analytics dashboard for capture metrics
  • Time-limited gateway links (expiry)
  • Webhook integration for capture events

🀝 Contributing

git checkout -b feature/your-feature
# Make changes, test with netlify dev
git commit -m "feat: your feature"
# Open a Pull Request

Read CONTRIBUTING.md for full guidelines.


βš–οΈ Legal & Ethics

CameraGPT is designed for authorized, consent-based visitor logging only. Camera capture occurs only after explicit visitor approval. This tool must not be used to capture images of individuals without their knowledge or consent. The developer assumes no liability for misuse.


About

πŸ“· AI-powered serverless visitor management system β€” Netlify serverless, webcam photo capture, face detection, secure visitor logs

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors