{"id":34778302,"url":"https://github.com/ryzmdn/mern-contact-form","last_synced_at":"2026-05-25T06:01:36.381Z","repository":{"id":290878171,"uuid":"975859657","full_name":"ryzmdn/mern-contact-form","owner":"ryzmdn","description":"Full-stack web application built with the MERN Stack (MongoDB, Express, React, Node.js).","archived":false,"fork":false,"pushed_at":"2025-05-01T03:16:48.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-01T04:23:54.332Z","etag":null,"topics":["bootstrap","express","form-validation","mern-stack","mongodb","nodejs","nodemailer","react"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryzmdn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-01T03:13:42.000Z","updated_at":"2025-05-01T03:18:21.000Z","dependencies_parsed_at":"2025-05-01T04:34:02.129Z","dependency_job_id":null,"html_url":"https://github.com/ryzmdn/mern-contact-form","commit_stats":null,"previous_names":["ryzmdn/mern-contact-form"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ryzmdn/mern-contact-form","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryzmdn%2Fmern-contact-form","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryzmdn%2Fmern-contact-form/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryzmdn%2Fmern-contact-form/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryzmdn%2Fmern-contact-form/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryzmdn","download_url":"https://codeload.github.com/ryzmdn/mern-contact-form/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryzmdn%2Fmern-contact-form/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33462501,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-25T02:24:28.008Z","status":"ssl_error","status_checked_at":"2026-05-25T02:23:23.339Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap","express","form-validation","mern-stack","mongodb","nodejs","nodemailer","react"],"created_at":"2025-12-25T08:40:24.186Z","updated_at":"2026-05-25T06:01:36.376Z","avatar_url":"https://github.com/ryzmdn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MERN Email Contact Form\n\n**MERN Email Contact Form** is a full-stack web application built with the **MERN Stack** (MongoDB, Express, React, Node.js). It provides a functional and secure contact form that allows users to send messages via email using **Nodemailer**. The form collects essential details such as first name, last name, email, phone number, subject, and message, with a mandatory privacy policy agreement toggle.\n\n## Form Image\n\n![localhost_5173_](https://github.com/user-attachments/assets/d199d947-90fd-4321-a0e6-6ca06f85ff25)\n\n## Features\n\n- **Email Contact Form** with input validation\n- **Fields:** First Name, Last Name, Email, Phone Number, Subject and Message\n- **Privacy Policy Toggle** (must be accepted before submitting)\n- **Nodemailer Integration** for sending messages to a designated email\n- **Frontend \u0026 Backend Separation** (MERN stack)\n- **Environment-Based Configuration**\n- **Responsive Design** using React Bootstrap\n\n## Project Structure\n\n```plaintext\ncontact-form-mern/\n│\n├── client/                \n│   ├── public/\n│   └── src/\n│       ├── assets/\n│       ├── App.jsx\n│       └── main.jsx\n│\n├── models/\n├── routes/\n├── utils/\n│\n├── .env.example\n├── .gitignore\n├── package-lock.json\n├── package.json\n├── README.md\n└── server.js\n```\n\n## Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/ryzmdn/mern-contact-form.git\n\n# Navigate into the project directory\ncd mern-contact-form\n\n# Install server dependencies\nnpm install\n\n# Change directory to client folder\ncd client\n\n# Install client dependencies\nnpm install\n\n# Start the development client\nnpm run dev\n\n# Return to the root directory\ncd ..\n\n# Copy the example environment file\ncp .env.example .env\n\n# Fill in your environment variables (see Configuration section)\n\n# Start the development server\nnode server.js\n# or\nnodemon server.js\n```\n\n## Configuration\n\nCreate a `.env` file in the root directory and provide the following variables:\n\n```env\nPORT=4000\nMONGODB_URI=\n\nUSER_EMAIL=\nUSER_PASSWORD=\n```\n\n## Usage\n\n1. Run `npm run dev` to start client directory.\n2. Run `node server.js` or `nodemon server.js` to start root directory.\n3. Open the browser at `http://localhost:5173`.\n4. Fill in the contact form fields and accept the privacy policy.\n5. Click **Submit** button.\n6. A confirmation will appear and the message will be sent to the configured email address.\n\n## Technologies Used\n\n- **MongoDB** - NoSQL database for storing messages (optional, if storing)\n- **Express.js** - Backend API framework\n- **React.js** - Frontend UI framework\n- **React Bootstrap** - Component based CSS framework\n- **Node.js** - JavaScript runtime\n- **Nodemailer** - Email sending utility\n- **dotenv** - Environment configuration\n- **Axios** - HTTP client for frontend-backend communication\n- **Yup** - JavaScript schema builder used for value parsing and validation\n- **Formik** - React library for form management, handling tasks like form state, validation, and submission\n\n## API Endpoints Overview\n\n| Endpoint       | Method | Description          |\n|----------------|--------|----------------------|\n| `/api/contact` | POST   | Submit contact form  |\n\n## License\n\nThis project is licensed under the [MIT License](./LICENSE). You are free to use, modify, and distribute it with proper attribution.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryzmdn%2Fmern-contact-form","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryzmdn%2Fmern-contact-form","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryzmdn%2Fmern-contact-form/lists"}