Giter Site home page Giter Site logo

l-walaszczyk / ec-api Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 162 KB

Appointment scheduler API for a psychotherapist's website | Node.js | Express.js | MongoDB | Mongoose

Home Page: https://emiliacwojdzinska.pl/umow-spotkanie

JavaScript 100.00%
nodejs express mongodb mongoose moment dotenv nodemailer przelewy24 appointment-scheduling

ec-api's Introduction

ec-api

Back-end part of the "ec" project

The "ec" project is a Single Page Application created for a psychologist Emilia Cwojdzińska. It was designed to provide the Emilia's customers with information about her areas of expertise, services she offers and - most importantly - a way to book an apointment online and pay for it in advance.

Technologies, frameworks and libraries used on the back end

  • node.js
  • express
  • mongodb
  • mongoose (to enforce data validation before saving to mongodb)
  • moment (extended with moment-timezone - to stick to Emilia's local time regardless of the customer's timezone)
  • dotenv (to use environmental variables locally)
  • nodemailer (to send automatic email notifications to Emilia and her customers when an appointment is booked)
  • @ingameltd/node-przelewy24 (to implement Przelewy24 online payments)

Setup

These instructions will get you a copy of the project up and running on your local machine.

Prerequisites

You need to have access to a MongoDB database. I recommend trying MongoDB Atlas for free. Please follow instructions on the MongoDB website.

You also need to have a transactional email provider account. I recommend trying Sendinblue.

It is important that you change the text of the confirmation email so that you do not impersonate and misrepresent Emilia and her practition. To do that, modify the object (specifically, its html property) that is an input to transporter.sendMail method which is located in ec-ui/functions/emailSender.js. The contents of the confirmation email are within template literals, in the area of lines 50-120.

Once you have the abovementioned services activated you have to create a file named .env in the main ec-api directory and paste the following code (filled with data of your accounts):

DB_URL=mongodb+srv://admin:<password>@<cluster-name>-icadi.mongodb.net/<dbname>?retryWrites=true&w=majority
EMAIL_ALIAS=Your Name<[email protected]>
[email protected]
EMAIL_PASS=your-transactional-email-provider-account-password
[email protected]
EMAIL_USER=your-transactional-email-provider-account-username
P24_CRC=przelewy24-crc-code
P24_ID=przelewy24-merchant-id
P24_TEST=true

Installing and running

To run this project, install it locally using npm:

$ npm install
$ npm run start

Link to front-end part of the "ec" project

ec-ui

Link to the website (specifically to the appointment scheduler)

emiliacwojdzinska.pl/umow-spotkanie

ec-api's People

Contributors

bukasz avatar l-walaszczyk avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

manvi-kaur

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.