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
Configure environment variables
Create a
.env file in the root directory with the following variables: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.
Available Commands
All commands should be run from the root of the project:| Command | Description |
|---|---|
npm run dev | Starts the local development server at localhost:4321 |
npm run build | Builds the production site to ./dist/ |
npm run preview | Previews the production build locally |
npm run astro | Runs 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
TypeScript Configuration
The project uses strict TypeScript configuration extendingastro/tsconfigs/strict. Type checking is built into the Astro build process.
Email Testing
During development, test the RSVP form functionality by:- Ensuring your
.envfile has valid SMTP credentials - Submitting the form on the homepage
- 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:- Clear the cache:
rm -rf .astro node_modules/.vite - Reinstall dependencies:
npm install - 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