Skip to main content
This guide will help you set up the wedding website project on your local machine for development.

Prerequisites

Before you begin, ensure you have the following installed:
  • Node.js (v18 or higher recommended)
  • npm, yarn, or pnpm package manager
  • Git for version control

Installation

1

Clone the repository

Clone the project repository to your local machine:
git clone <repository-url>
cd boda
2

Install dependencies

Install the required dependencies using your preferred package manager:
npm install
3

Configure environment variables

Create a .env file in the root directory with the following variables:
EMAIL_USER=your-email@example.com
EMAIL_PASS=your-email-password
EMAIL_TO=recipient@example.com
These credentials are used by Nodemailer to send RSVP confirmation emails. The project is currently configured to use IONOS SMTP (smtp.ionos.es) on port 587.
4

Start the development server

Launch the local development server:
npm run dev
The site will be available at http://localhost:4321

Available Commands

All commands should be run from the root of the project:
CommandDescription
npm run devStarts the local development server at localhost:4321
npm run buildBuilds the production site to ./dist/
npm run previewPreviews the production build locally
npm run astroRuns Astro CLI commands

Technology Stack

The wedding website is built with:
  • Astro 5.17.1 - Modern static site framework
  • TailwindCSS 4.2.1 - Utility-first CSS framework
  • Nodemailer 8.0.1 - Email sending for RSVP confirmations
  • @astrojs/node - SSR adapter in standalone mode
The project uses the @astrojs/node adapter in standalone mode, which allows for server-side rendering of API routes like the RSVP confirmation endpoint.

Development Tips

Hot Module Replacement (HMR) is enabled in development mode. Changes to .astro, .ts, and style files will automatically refresh in the browser.

TypeScript Configuration

The project uses strict TypeScript configuration extending astro/tsconfigs/strict. Type checking is built into the Astro build process.

Email Testing

During development, test the RSVP form functionality by:
  1. Ensuring your .env file has valid SMTP credentials
  2. Submitting the form on the homepage
  3. Checking the terminal output for any Nodemailer errors
The API endpoint at /api/confirmar requires valid email credentials to send confirmation emails. Without them, form submissions will fail.

Troubleshooting

Port Already in Use

If port 4321 is already in use, Astro will automatically try the next available port (4322, 4323, etc.).

Build Errors

If you encounter build errors:
  1. Clear the cache: rm -rf .astro node_modules/.vite
  2. Reinstall dependencies: npm install
  3. Try building again: npm run build

Email Not Sending

Verify your SMTP credentials and ensure:
  • The email/password are correct
  • Port 587 is not blocked by your firewall
  • The SMTP server allows connections from your IP

Next Steps

Once your development environment is set up, explore the Project Structure to understand how the codebase is organized.

Build docs developers (and LLMs) love