Welcome to the FormSwift ! This web application provides a platform for users to submit booking requests for entities requiring reservations and/or enquiries (E.g: Hotel Rooms, AirBnBs, Appointments, Booking sites) It includes backend functionality for storing booking information in a MongoDB database and sending email notifications upon each new booking submission. Additionally, it serves a "thank you" HTML page to users after successfully submitting a booking request.
- Booking Form Submission: Users can submit booking requests through a form.
- Backend Data Storage: Booking information is stored in a MongoDB database.
- Email Notifications: Upon each new booking submission, an email notification is sent to the specified address.
- Response to User: Users receive a "thank you" HTML page as a confirmation after successfully submitting a booking request.
-
Clone the repository: git@github.com:joelrgeorge/FormSwift---Form-Submission-App.git
-
Navigate to the project directory: cd FormSwift---Form-Submission-App
-
Install dependencies: npm install
-
Set up environment variables:
- Create a
.envfile in the root directory. - Define the following variables in the
.envfile:PORT=3005 MONGODB_URI=<your_mongodb_uri> SMTP_HOST=smtpout.secureserver.net SMTP_PORT=587 SMTP_USER=user@domain SMTP_PASS=your_smtp_password
-
Start the server: npm start
-
Access the application in your web browser at
http://localhost:3005. -
Submit booking requests through the provided form.
This project is designed to run as a Dockerized backend service.
docker build -t formswift .
Run the container docker run --env-file .env -p 3005:3005 formswift
Once running, the API will be available at:
Docker Compose can be used to run FormSwift along with MongoDB.
docker-compose up
This will start:
-
FormSwift API
-
MongoDB service
The API will be available at:
A simple HTML form integration:
<form method="POST" action="http://localhost:3005/submit">
<input name="name" placeholder="Name" />
<input name="email" placeholder="Email" />
<button type="submit">Submit</button>
</form>FormSwift is intended to be used as a backend integration service and is not a standalone frontend application.
It can be integrated into:
-
Static websites
-
React / Vue / Angular apps
-
CMS platforms such as WordPress
This project is licensed under the MIT License - see the LICENSE file for details.