🌿 Forever Fields Memorial Template

Beautiful, responsive memorial pages with API integration

Try the Demo

View memorial pages with different configurations:

Note: These demos require a running backend server. Start your server with npm run dev in the server directory.

Features

Usage

To use this memorial template in your application:

1. Include the Files

<!-- In your HTML head -->
<link rel="stylesheet" href="memorial-template/css/memorial.css">

<!-- Before closing body tag -->
<script src="memorial-template/js/api-client.js"></script>
<script src="memorial-template/js/memorial.js"></script>

2. Configure API URL

Update the API base URL in memorial.js:

const api = new ForeverFieldsAPI('https://your-api.onrender.com');

3. Pass Memorial ID

The template reads the memorial ID from URL parameters:

https://yoursite.com/memorial?id=memorial-id-here

4. Customize Styles

Modify CSS variables in memorial.css to match your brand:

:root {
  --sage-primary: #8B9F82;
  --gold-primary: #C9A962;
  --cream: #F5F1E8;
  /* ... */
}

API Integration

The template automatically handles:

Privacy Modes:
  • Public: Anyone can view
  • Link: Anyone with the URL can view
  • Private: Only owner + invited users can view

Testing

Test the full memorial CRUD flow:

# Set your access token (from magic link auth)
export ACCESS_TOKEN="your-token-here"

# Run memorial CRUD tests
npm run test:memorial

# Or directly:
node tests/memorial-crud.test.js

Tests include:

File Structure

memorial-template/
├── index.html              # Memorial page template
├── css/
│   └── memorial.css        # Styles (Forever Fields design)
├── js/
│   ├── api-client.js       # API communication layer
│   └── memorial.js         # Page controller & interactions
└── demo/
    └── index.html          # This demo page

🌿 Forever Fields - v0.1-memorial

Made with compassion, for moments that matter.