An appointment scheduling system is a web application that allows users to book appointments with consultants . The goal is to provide user with seamless way to view available time slots and book appointment, similiar to paltform like calendly. It also provide an interface for consultants to manage their availability and appointments.
- Admin can sing up or create to their account via google account.
- Admin can allow
google calendar
to intergate withGet The Session
for good experience. - Admin can schedule a new event according to their availability.
- Admin can restrict user to book appointment .
- Admin can view list all events in their primary google calendar.
- Admin can generate link for sharing the event to their client.
- Admin can also delete the event from events list.
- Admin receive email when new appointment is scheduled and also get notificaiton remainder before an appointment.
- This allows users to see a list of available appointments in a calendar view.
- This allows users to search for available appointments by date and time.
- This allows users to make appointment online by filling the deatils.
- This allows users to receive emial about confirmation of appointments .
Tech stack which followed in this project:
- React.js - UI library for frontend management
- node.js - evented I/O for the backend
- Express - fast node.js network app
- Mongodb - database to store tokens.
Tools which followed in this project:
- VS code - Source code editor for debugging, snippets and code refactoring.
- git - for version control system
- Google Developer Console- for Create Credentials
You need the front-end and back-end server for this app to work. You can find the intructions to setup servers locally here.
- Installation: You need to need clone this
repo
to run local machine. - Setup the Google Developer Console: main module to interact with Google Calendar API that provides an abstraction with business logic.
- Backend: a express server which exposes the API
- frontend: a React application written in javascript! It relies on well known frameworks like TaislwindCSS, formik and react router.
-
Clone the repo
git clone https://github.com/singhvivekkumar/session-scheduler.git
- Go to Google Developer Console
- Sign in and create an Google Project
- Click on
CREATE PROJECT
then Enter the Name of project and clickCREATE
- Go to hamburger menu and click on
API and Services
- Enable the Google Calendar API
- Please set up a Google OAuth consent screen
- Select the project that you want to use for your OAuth consent screen.
- Select the User type for your app.
- Internal means that your app will only be used by users within your organization.
- External means that your app will be used by users outside of your organization.
- Select on of them and Click
CREATE
. - In the name field, enter a name for your app.
- In the Support email field, enter an email address where users can contact you for support.
- Click Add or remove scopes.
- In the Scopes dialog, select the scopes that your app needs to access.
- A scope is a permission that your app requests from the user.
- In our project, app needs to access the user's calendar and three more 1.See your primary Google Account email address. 2.See your personal info, including any personal info you've made publicly available 3.See your personal info, including any personal info you've made publicly available 4 By search select calendar api
- You would select all these scope.
- Click Save and continue.
- In the Test users section, you can add test users for your app.
- Test users are real users who can test your app and give you feedback.
- Click Save and continue.
- Create an OAuth Client ID
- Go to Credentials
- Choose Create Credentials and pick OAuth Client ID
- Pick Web Application
- In Authorized JavaScript origins section add this for dev localhost server:
http://localhost:3000
for frontend server.
- In Authorized redirect URIs section add this for dev localhost server:
http://localhost:3002/api/calendar/redirect
for backend dev server- (your production servers here)
- Confirm it. You can let allowed redirect URIs empty. We will be using Google's own sign in.
- Take note of your OAuth Client ID
- Store the Client credentials:
- Set an Environment Variable called
CLIENT_ID
with the value - Set an Environment Variable called
CLIENT_SECRET
with the value - Set an Environment Variable called
REDIRECT_URL
with the value - Save it on
.env
file.
- Set an Environment Variable called
- Create a MongoDB Atlas account. You can create an account for free at https://www.mongodb.com/cloud/atlas/signup.
- Create a cluster. A cluster is a group of MongoDB servers that work together to provide high availability and scalability. You can create a cluster in the MongoDB Atlas console.
- Connect to your cluster. You can connect to your cluster using the MongoDB Compass GUI or the MongoDB command-line tools.
- Setup mongoDB with express js visit
If succeed, you should see something like this at http://localhost:3002/api/calendar:
- You redireact on event list page of frontend with all events
I encourge you to create new calendars from https://calendar.google.com and add some test events on it!
-
Go to
api
folder of session-schedular by:cd api
-
create new
.env
file toapi
folder -
Add the following environments variable to
.env
file ofapi
folderPORT=3002 CLIENT_ID= <YOUR_GOOGLE_CLIENT_ID> CLIENT_SECRET=<YOUR_GOOGLE_SECRET_ID> REDIRECT_URL=http://localhost:3002/api/calendar/redirect API_KEY=<YOUR_GOOGLE_API_KEY> MONGODB_URI="mongodb+srv://<YOUR_MONDODB_USER_ID>:<YOUR_MONGODB_PASSWORD>@cluster0.gjor0co.mongodb.net/?retryWrites=true&w=majority"
-
Install the dependencies and devDependencies and start the server
-
Install NPM packages in
api
npm install
npm start
Once running:
- visit http://localhost:3002/api/calender/redirect to explore the API
- Go to
frontend
folder of session-schedular by:cd frontend
- Install the dependencies and devDependencies and start the server
- Install NPM packages in
api
npm install
npm start
Once running, visit http://localhost:3000 to open the app
Note: it may take a while to build, basically because it need to build and bundle the frontend module as well.
Note: This
APP
is not is production ready.
MIT