Skip to content
 
 

Repository files navigation

EYIF 2026 Server

Backend server for the Edo Youth Impact Forum (EYIF) 2026 website. This server handles form submissions including contact forms, newsletter subscriptions, and grant applications.

Features

  • Contact form processing
  • Newsletter subscription management
  • Grant application submissions
  • Email notifications for administrators
  • Confirmation emails for users

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn
  • Gmail account for sending emails

Setup

  1. Clone the repository

    git clone [repository-url]
    cd eyif-server
    
  2. Install dependencies

    npm install
    

    or

    yarn install
    
  3. Create a .env file based on the .env.example file

    cp .env.example .env
    
  4. Update the .env file with your credentials:

    • EMAIL: Your Gmail address
    • EMAIL_PASSWORD: Your Gmail app password (see note below)
    • WEBSITE_URL: Your website URL
    • CONTACT_EMAIL: Email where contact form submissions will be sent
    • NEWSLETTER_EMAIL: Email where newsletter subscriptions will be sent
    • GRANT_EMAIL: Email where grant applications will be sent
    • SEAT_RESERVATION_EMAIL: Email where seat reservation notifications will be sent
    • MONGODB_URI: Your MongoDB connection string (e.g., mongodb+srv://user:password@cluster.mongodb.net/dbname)
    • ZEPTO_MAIL_TOKEN: Your ZeptoMail Send Mail Token
    • ZEPTO_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_TOKEN and ZEPTO_SENDER_DOMAIN in your .env file. The server will automatically use ZeptoMail if these are present.
  5. Add your logo:

    • Place your logo file in the assets directory and name it logo.png

Running the Server

Development Mode

npm run dev

or

yarn dev

Production Mode

npm start

or

yarn start

API Endpoints

Contact Form

  • 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."
    }

Newsletter Subscription

  • URL: /subscribe
  • Method: POST
  • Request Body:
    {
      "email": "johndoe@example.com"
    }

Grant Registration

  • 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-education
    • agriculture-food
    • waste-environment
    • culture-arts
    • skills-work
    • other (If 'other', an additional 'otherCategory' field is required in the request body)

Seat Reservation

  • 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.

License

ISC

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages