Skip to content

coozgan/serverless-loaner-form-application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Serverless Loaner Form Application

I would just like to share this project I made for my organization this repository contains the code and infrastructure setup for a Loaner Form application built using AWS serverless services. This application allows users to request and track equipment loans with a simple, interactive web form. The form dynamically reads and writes data to a Google Spreadsheet using AWS Lambda, API Gateway, and Amazon SES.

Table of Contents


Architecture Overview

loanerform-architecture

The Loaner Form Application is structured using AWS serverless services and Google Sheets for data management. Here’s an overview of the architecture:

  1. Frontend: A static website (HTML and JavaScript) hosted on an Amazon S3 bucket.
  2. API Gateway: Acts as an interface between the frontend and backend, handling all API requests.
  3. AWS Lambda: Processes requests to read from and write to a Google Spreadsheet.
  4. Google Spreadsheet Database: Serves as the primary data store for loan items, managed with the Python gspread library.
  5. AWS Secrets Manager: Securely stores Google API credentials and retrieves them when the Lambda function is invoked.
  6. Amazon SES: Sends email notifications to users when a loan request is processed.

Technologies Used

  • AWS Lambda: For backend logic and integration with Google Sheets.
  • Amazon API Gateway: To expose endpoints for frontend interactions.
  • Amazon S3: For hosting the static website.
  • Google Spreadsheet + gspread: Acts as the main database, accessed through the gspread Python library.
  • AWS Secrets Manager: Securely stores and retrieves Google API credentials.
  • Amazon SES: Sends email notifications upon loan request submissions.

Features

  • Dynamic Loan Form: The HTML form fetches data from Google Sheets to populate available loan items.
  • Real-time Updates: Updates loan request details in Google Sheets upon form submission.
  • Email Notifications: Sends confirmation emails to borrowers using Amazon SES.
  • Secure and Scalable: Serverless architecture ensures secure data handling and cost efficiency.

Getting Started

Prerequisites

  • AWS account with permissions for Lambda, API Gateway, S3, Secrets Manager, and SES.
  • Import the lambda dependencies like gspread on aws. Follow This Guide
  • Google Cloud account with API access to Google Sheets and OAuth credentials. For this project I have used gspread.
  • AWS CLI configured for deployment.

Authors Note

I find it hard to imagine that I was able to put this project all together. I was facinated with system design and started studying about cloud architecture last summer. Our organization has problem with keeping track of who borrowed devices, We used logbook on our office and ask user to sign up when borrowing an Item. It was a pain going through those handwritting.

After studying AWS for 6 months I just knew I had it in me to build a cheap serverless componenets. However being someone who is not full time developer I find it hard to code my own API and my own front end that accepts the user input. Thankfully there are libraries that are publicly available and with organize documentation.

Looking back I was looking around to find some repo that are solving problems in their organization the same way I do. However that was not the case during that season. So, I am making this repo so that if someone is trying to achieve what I want to do in their organization they can use this idea to pull a project like this altogether.

About

Loaner form for devices using AWS Serverless Services

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published