Git Product home page Git Product logo

serverless-expense-manager's Introduction

Serverless Expense Manager

This is the submission of Cloud Developer Nanodegree Capstone project. i've implemented a Simple Expense Manager application using AWS Lambda and Serverless framework in the backend and Angular 8 in the frontend.

Functionality of the application

This application allow creating/removing/updating/fetching Expenses. Each Expense can optionally have an attachment image. Each user only has access to Expense that he/she has created.

Deployment Link

the frontend have been deployed as a static website using S3 and CloudFront as a CDN.

Tech Stack

frontend

  • Angular 8
  • Angular Material and FlexLayout
  • Auth0 for authentication
  • AWS S3
  • AWS CloudFront

backend

  • Serverless Framework
  • NodeJS
  • AWS Lambda
  • AWS S3
  • AWS DynamoDB
  • API Gateway
  • AWS XRAY

API Endpoints

endpoints:
  GET - https://xm6pd9tj3g.execute-api.us-east-1.amazonaws.com/dev/expenses
  POST - https://xm6pd9tj3g.execute-api.us-east-1.amazonaws.com/dev/expenses
  PATCH - https://xm6pd9tj3g.execute-api.us-east-1.amazonaws.com/dev/expenses/{expenseId}
  DELETE - https://xm6pd9tj3g.execute-api.us-east-1.amazonaws.com/dev/expenses/{expenseId}
  POST - https://xm6pd9tj3g.execute-api.us-east-1.amazonaws.com/dev/expenses/{expenseId}/image
functions:
  Auth: expense-manager-app-dev-Auth
  GetExpenses: expense-manager-app-dev-GetExpenses
  CreateExpense: expense-manager-app-dev-CreateExpense
  UpdateExpense: expense-manager-app-dev-UpdateExpense
  DeleteExpense: expense-manager-app-dev-DeleteExpense
  GenerateUploadUrl: expense-manager-app-dev-GenerateUploadUrl

Frontend credentials

export const environment = {
  production: false,
  baseUrl: "https://xm6pd9tj3g.execute-api.us-east-1.amazonaws.com/dev",
  auth0: {
    domain: "mowamed.auth0.com",
    client_id: "LGYoHVP8w9iFdgoAU166OlT2VpA8gDUj",
    redirect_uri: `${window.location.origin}`,
    audience: "http://finale-project-expense-manager.com",
    scope: "openid profile email read:users"
  }
};

How to run the application

Backend

To deploy an application run the following commands:

cd backend
npm install
sls deploy -v

Frontend

To run a client application first edit the frontend/src/environments/environment.ts file to set correct parameters. And then run the following commands:

tip: the default credentials have already been added in the file

cd frontend
npm install
ng serve

This should start a development server with the Angular application that will interact with the serverless Expense application.

tip: you can view it in your browser at localhost:4200

Screenshots

AWS

Xray screenshot:

Xray

Debugging with Xray: Xray

API Gateway screenshot:

API Gateway

CloudWatch screenshot:

CloudWatch

Backend

sls deploy output:

sls deploy

Serveless Dashboard:

Serveless Dashboard

Frontend

Unauthenticated user:

Unauthenticated user

Authenticated user:

Authenticated user

Add new expense:

Add new expense

Expense details:

Expense details

Expense List:

Expense List

serverless-expense-manager's People

Contributors

mowamed avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.