Camagru
42 / 1337 school project

Your webcam.
Your stickers.
One shared gallery.

Camagru turns your webcam into a sticker photo booth — capture a shot, layer on overlays, then share it to a public gallery where people can like and comment. Built from scratch with a hand-rolled PHP backend, no frameworks allowed.

PHP 8.2, zero frameworks PostgreSQL GD image compositing Dockerized
What is this?

A school-grade clone of the classic 42 “Camagru” subject.

The brief: build a photobooth web app where users snap a webcam picture (or upload one), overlay it with sticker/filter graphics, and publish it to a gallery the whole community can browse, like and comment on — complete with account creation, email verification and password recovery.

Every line of the backend is hand-written PHP with PDO prepared statements — no Laravel, no Symfony, no Composer packages. The image compositing runs through the GD extension, and the whole stack ships in Docker containers for the backend, frontend and database.

  • Webcam capture & file upload, center-cropped to a 512×512 canvas
  • Sticker overlays alpha-blended server-side with GD
  • Public paginated gallery with likes & comments
  • JWT auth, bcrypt hashing, sanitized output everywhere
camagru.app/gallery
128 likes 34 comments
Features

Everything a photo social app needs

Scoped to the 42 subject requirements, implemented end to end.

Webcam capture

Snap directly from your camera or upload a file — both go through the same compositing pipeline.

Sticker overlays

Pick from a library of PNG overlays, layered and alpha-blended server-side at full resolution.

Public gallery

Every published photo lands in a paginated gallery, newest first, five per page.

Likes & comments

Real-time-feeling interactions backed by simple, honest SQL — no sockets required.

Email notifications

Comment on someone's photo and they get notified by email — opt-out from their profile.

Secure by default

JWT sessions, bcrypt password hashing, and sanitized output on every rendered field.

How it works

From webcam to gallery in three steps

1

Capture

Take a photo with your webcam or upload one — it's center-cropped to a square canvas.

2

Composite

Choose one or more stickers; the PHP backend blends them onto your photo with GD.

3

Share

Your creation joins the public gallery, ready for likes and comments from everyone.

Under the hood

The stack, no frameworks attached

Built to satisfy a strict school evaluation sheet: raw PHP, PDO, and GD only.

PHP 8.2 + Apache PostgreSQL GD image processing Vanilla JavaScript Nginx Docker Compose JWT auth Deployed on Render + Vercel
Good to know

How this live demo works

This deployment is public, so a few things are intentionally locked down.

No new accounts

Registration, email verification and password reset are disabled — sign in with one of the five test accounts below instead.

Shared test accounts

Every visitor uses the same five accounts, so profile edits, password changes and photo deletion are turned off to keep them usable for everyone.

Photos aren't saved

The editor still captures your webcam and composites stickers for real — the result just isn't written to disk or the database.

Likes & comments are real

These write to the shared database, so you'll see other visitors' activity — and they'll see yours.

Try it yourself

Sign in with a test account

Registration is disabled for this demo, so pick any of these five shared test accounts to explore the gallery, editor and profile. Photos you capture will composite live but won't be saved.

Ready to look around?

No sign-up needed — jump straight into a test account or browse the gallery as a guest.