Backend server for the Edo Youth Impact Forum (EYIF) 2026 website. This server handles form submissions including contact forms, newsletter subscriptions, and grant applications.
- Contact form processing
- Newsletter subscription management
- Grant application submissions
- Email notifications for administrators
- Confirmation emails for users
- Node.js (v14 or higher)
- npm or yarn
- Gmail account for sending emails
-
Clone the repository
git clone [repository-url] cd eyif-server -
Install dependencies
npm installor
yarn install -
Create a
.envfile based on the.env.examplefilecp .env.example .env -
Update the
.envfile with your credentials:EMAIL: Your Gmail addressEMAIL_PASSWORD: Your Gmail app password (see note below)WEBSITE_URL: Your website URLCONTACT_EMAIL: Email where contact form submissions will be sentNEWSLETTER_EMAIL: Email where newsletter subscriptions will be sentGRANT_EMAIL: Email where grant applications will be sentSEAT_RESERVATION_EMAIL: Email where seat reservation notifications will be sentMONGODB_URI: Your MongoDB connection string (e.g., mongodb+srv://user:password@cluster.mongodb.net/dbname)ZEPTO_MAIL_TOKEN: Your ZeptoMail Send Mail TokenZEPTO_MAIL_HOST: ZeptoMail API host (e.g., api.zeptomail.com)ZEPTO_SENDER_DOMAIN: Your ZeptoMail sender domain (e.g., edoyouthimpactforum.com)ZEPTO_AGENT_ALIAS: Your ZeptoMail Mail Agent alias
Note: For
EMAIL_PASSWORD, you need to use an App Password if you have 2-Factor Authentication enabled on your Google account. You can generate this from your Google Account settings.Email Provider:
- By default, the server uses Gmail SMTP for sending emails. To use ZeptoMail instead, set
ZEPTO_MAIL_TOKENandZEPTO_SENDER_DOMAINin your.envfile. The server will automatically use ZeptoMail if these are present.
-
Add your logo:
- Place your logo file in the
assetsdirectory and name itlogo.png
- Place your logo file in the
npm run dev
or
yarn dev
npm start
or
yarn start
- URL:
/contact - Method:
POST - Request Body:
{ "firstName": "John", "lastName": "Doe", "email": "johndoe@example.com", "phone": "+2341234567890", "message": "Hello, I would like more information about EYIF 2026." }
- URL:
/subscribe - Method:
POST - Request Body:
{ "email": "johndoe@example.com" }
- URL:
/grant-registration - Method:
POST - Request Body:
{ "fullName": "John Doe", "email": "johndoe@example.com", "phone": "+2341234567890", "startupName": "EcoTech Solutions", "category": "waste-environment", "ideaSummary": "A solution for recycling plastic waste...", "problemStatement": "Plastic pollution is a growing problem...", "fundUsage": "The funds will be used to develop a prototype...", "otherCategory": "If category is 'other', specify the category here" } - Categories:
basic-educationagriculture-foodwaste-environmentculture-artsskills-workother(If 'other', an additional 'otherCategory' field is required in the request body)
- URL:
/reserve-seat - Method:
POST - Request Body:
{ "firstName": "John", "lastName": "Doe", "email": "johndoe@example.com", "phone": "+2341234567890" }
On success, the user will receive a confirmation email and the admin (configured via SEAT_RESERVATION_EMAIL in your .env) will be notified of the reservation.
ISC