Skip to content

pppprasad/memory-book

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Memory Book

A simple, self-hosted web app for collecting memories, photos, and life updates from a group — then printing a beautiful PDF memory book. Perfect for school reunions, family reunions, retirement parties, or any milestone gathering.

No database, no npm, no build step. Edit one config file, upload to any PHP host, and share the link.


Preview

Page What it is
Submission form Public — classmates fill it in
Admin dashboard Password-protected — manage submissions, photos, names
Memory book Password-protected — one printed page per person, PDF-ready

The book includes a cover page, one page per person (with photos, memory, where-are-they-now, and a message), an optional In Memoriam section, and a closing class photo page.


Quick Start

1. Edit config.php

This is the only file you need to change to set up your book:

return [
    'group_name'      => "Springfield High · Class of '84",
    'class_year'      => 1984,
    'reunion_year'    => 2026,
    'school_name'     => 'Springfield High School',
    'school_location' => 'Springfield',
    'school_founded'  => 'Est. 1920',
    'deadline'        => 'July 30th, 2026',
    'expected_count'  => 40,
    'max_photos'      => 2,
    'notify_email'    => 'you@example.com',
    'from_email'      => 'noreply@yourdomain.com',
    'admin_password'  => 'CHANGEME',
    'book_password'   => 'CHANGEME',
];

Change both passwords before sharing any links.

2. Add your class photo

Drop your group photo at assets/class-photo.jpg. It appears on the closing page of the book. If the file is missing, a placeholder is shown instead.

3. Upload to your server

Upload these files to a folder on your PHP server:

index.php
submit.php
admin.php
config.php
assets/
book/

Do not upload README.md — it's not needed on the server.

4. Create directories and set permissions

Via SSH (or your hosting control panel):

mkdir -p memorybook/submissions
mkdir -p memorybook/uploads/photos
chmod 755 memorybook/submissions memorybook/uploads/photos
chown -R www-data:www-data memorybook/submissions memorybook/uploads

(www-data is typical for Apache/Nginx — your host may use a different user.)

5. Test it

  • Open your site — the form should load
  • Submit a test entry with a photo
  • Confirm you received an email notification
  • Log in to /admin.php — your test entry should appear
  • Log in to /book/ — cover and test page should appear
  • Delete the test submission from the admin when done

Server Requirements

  • PHP 8.0+
  • fileinfo extension (for photo validation — enabled by default on most hosts)
  • mail() function enabled (or swap to SMTP if your host requires it)
  • Write access to submissions/ and uploads/ directories

Any shared hosting with PHP works: cPanel hosts, Hostinger, SiteGround, DreamHost, etc. Also works on a VPS running Apache or Nginx.

Vercel / Netlify: These platforms don't support PHP or persistent file storage. You'd need to rewrite the backend in Node.js and use a database (e.g. Supabase). See the Adapting for Vercel section below.


How It Works

  • Classmates visit the public form and submit their name, up to N photos, a favorite memory, a "where are you now" update, and an optional message
  • Each submission is saved as a row in submissions/data.json and photos are saved to uploads/photos/
  • You receive an email notification for each submission
  • The admin dashboard lets you view, edit, and manage all submissions
  • The memory book reads data.json fresh on every load — new submissions appear automatically
  • When ready, open the book in Chrome and use Print → Save as PDF

Admin Dashboard

Go to /admin.php and log in with your admin password.

You can:

  • See how many submissions are in and how many are still outstanding
  • Search by name
  • Edit any person's name, memory, location, or message
  • Add, replace, or delete photos per person (up to 5)
  • Delete a full submission
  • Add In Memoriam entries (appear as a special section at the back of the book)

Generating the PDF

  1. Open /book/ in Chrome
  2. Scroll through once so all photos load
  3. Press Cmd+P / Ctrl+P
  4. Destination: Save as PDF
  5. Paper size: Letter
  6. Margins: None
  7. Check Background graphics
  8. Save — each person prints on their own page

Photo Layout in the Book

Photos submitted Layout
0 Full-width placeholder
1 Full-width single photo
2 Two photos side by side
3–5 Two main photos + small strip of extras below

File Structure

index.php           — Public submission form
submit.php          — Handles form POSTs; saves to submissions/ and uploads/
admin.php           — Admin dashboard (password-protected)
config.php          — All settings live here — edit this first
assets/
  class-photo.jpg   — Your group photo (add this yourself)
book/
  index.php         — The printable memory book (password-protected)
submissions/        — Created automatically; gitignored
  data.json         — All submissions
  memorial.json     — In Memoriam entries (managed via admin)
uploads/            — Created automatically; gitignored
  photos/           — Uploaded photos

Adapting for Vercel

Vercel doesn't support PHP or writable file storage. To host there, you'd replace:

Current Vercel equivalent
PHP files Node.js serverless functions (or Next.js API routes)
submissions/data.json Supabase (Postgres) or PlanetScale
uploads/photos/ Supabase Storage, Cloudinary, or S3
Session-based passwords Vercel password protection or NextAuth

Recommended stack: Next.js + Supabase (both have free tiers that cover a 40-person book easily).


After the Book Is Done

  • Rename or delete index.php to close submissions
  • Keep admin.php and book/ up so people can browse the online version
  • Download a backup of submissions/data.json and uploads/photos/ to your computer

License

MIT — use it, fork it, adapt it for your group.

About

Self-hosted memory book for school reunions, family gatherings, and milestone events. One config file, any PHP host, beautiful printable PDF.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages