This project is a comprehensive, open-source wedding website that features a custom-built, fully functional gift registry system. It serves as a customizable and self-hostable alternative to traditional wedding registry platforms, complete with modern features like 3D animations and a full administrative interface.
Live Demo | Architecture Overview | API Documentation
The primary goal of this project is to provide a personal, customizable, and cost-effective solution for couples who want more control over their wedding website and registry. Unlike commercial platforms that often charge fees or have limited customization, this open-source solution allows you to:
- Host your own registry without third-party fees.
- Customize the design and content to match your wedding theme.
- Integrate unique features like 3D interactive elements.
- Keep your guest data private.
- Interactive User Experience:
- Engaging 3D animations using React Three Fiber (e.g., the interactive Heart page).
- A fully responsive design for seamless viewing on all devices.
- Smooth page transitions and scroll-based animations with Framer Motion.
- "Add to Calendar" functionality for guests.
- Custom Gift Registry:
- Add & Edit Items: Manually input gift details or use the built-in web scraper to pre-fill item information from online stores (supports Open Graph metadata and basic Amazon scraping).
- Group Gifting: Allow guests to contribute partial amounts towards higher-priced items. Progress bars visualize the contribution status.
- Filtering & Sorting: Guests can easily browse the registry by filtering items by category, price range, and status.
- Admin Dashboard: A password-protected dashboard for managing registry items, including adding, editing, and deleting products.
- Standard Wedding Info Pages: Easily customizable pages for event details, travel information, weather forecasts, and photo galleries.
This project is built with a modern, full-stack TypeScript architecture.
- Framework: Next.js (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- Database ORM: Prisma
- Database: PostgreSQL (hosted on Neon)
- 3D & Animation: React Three Fiber, Drei, & Framer Motion
- Physics: Rapier (via
@react-three/rapier) for 3D interactions. - State Management: React Query (TanStack Query) for server state.
- Testing: Jest, React Testing Library, and Playwright for end-to-end testing.
- Deployment: Vercel
- Node.js: LTS version recommended (v18+).
- Git: For version control.
- PostgreSQL Database: You can use a local Postgres instance or a cloud provider like Neon or Supabase.
-
Clone the repository:
git clone https://github.com/fderuiter/wedding_website.git cd wedding_website -
Install dependencies:
npm install
Create a .env.development.local file in the root directory by copying the example or creating a new one. You need to define the following variables:
# Required for Admin Login (Must be a BCrypt hash, NOT plaintext)
# Generate a hash by running: node scripts/generate-password-hash.js "your_password"
ADMIN_PASSWORD="$2b$10$..."
# Required for Prisma (PostgreSQL connection)
# Obtain these from your database provider
POSTGRES_PRISMA_URL="postgresql://user:password@host:port/database?pgbouncer=true&connect_timeout=15"
POSTGRES_URL_NON_POOLING="postgresql://user:password@host:port/database?connect_timeout=15"-
Run Migrations: Apply the database schema to your PostgreSQL database.
npm run migrate:dev
This command creates the necessary tables (
RegistryItem,Contributor, etc.) defined inprisma/schema.prisma. -
Seed Data (Optional): If you have a seeding script or want to migrate data from a JSON file, you can run the migration script (this uses the configured Prisma provider to seed the database).
npm run db:seed
Start the development server:
npm run devThe application will be available at http://localhost:3000.
Run the linter to ensure code quality:
npm run lintRun the test suite:
npm test- Navigate to
/admin/login. - Enter the password you configured in
ADMIN_PASSWORD. - Upon successful login, you will be redirected to
/admin/dashboard.
- Adding Items: From the dashboard, click "Add New Item". You can paste a product URL to auto-fill details or enter them manually.
- Group Gifts: Toggle the "Allow Group Gifting?" checkbox to let multiple guests contribute to a single item.
- Managing Contributions: The dashboard shows the funded status of each item. You can edit items to update quantities or fix typos.
src/app: Next.js App Router pages and API routes.src/components: Shared React components (Layout, UI elements, 3D scenes).src/features: Feature-specific logic (e.g.,src/features/registrycontains all registry-related components, hooks, and services).src/data: Static data files (e.g., wedding party members, things to do).src/lib: Core library configurations (Prisma client).src/utils: Utility functions (validation, formatting, auth).src/styles: Global styles and theme configuration.prisma: Database schema definition.public: Static assets (images, fonts).e2e: End-to-end tests (Playwright).scripts: Utility scripts for database migration and maintenance.
Contributions are welcome! Please see the CONTRIBUTING.md file for guidelines on how to participate in this project.
This project is open-source and available under the MIT License.