Giter VIP home page Giter VIP logo

expense-aws-public's Introduction

Mooni Expense Tracking

CMSC389L Final Project

Overview

Mooni is an expense tracking web application.

Users can log in (currently only with GitHub authentication) and input their expenses into a database. Users will provide the vendor name, expense date, dollar amount, and tags when submitting an expense to be saved. Expenses are recovered through sessions and viewable when logged in.

Future Plans to be Implemented:

The goal is to implement viewing filters based on tags that each user has submitted and date ranges of expenses. This will allow easier monitoring and highlighting of each expense.

Demo it here Link

Video Demo

The video demo of Mooni can be found here Link

Architecture Diagram

alt text

Setup

After npm install make sure to create a config.json in the main directory with your AWS credentials like so:

{
  "region": "us-west-2",
  "endpoint": "http://localhost:8000",
  "accessKeyId": "<INSERT_HERE>",
  "secretAccessKey": "<INSERT_HERE>"
}

Next, set up your GitHub Strategy credentials for Authenticating User in index.js

passport.use(new GithubStrategy({
    clientID: "<INSERT_HERE>",
    clientSecret: "<INSERT_HERE>",
    callbackURL: "http://localhost:3000/auth/github/callback"
  },
  function(accessToken, refreshToken, profile, done) {
    return done(null, profile);
  }
));

Running locally

npm start runs index.js

npm run watch runs development version using nodemon to update on changes in the directory

npm run watch-css runs a sass precompiler to update public/css/main.css when changes are seen in scss/main.scss

Also make sure to run DynamoDB locally using Amazon's guide: Link

Deploy on Elastic Beanstalk

These are the steps necessary to deploy this on Elastic Beanstalk

  1. npm uninstall --save nodemon underscore node-sass

  2. Remove from package.json the scripts for watch and watch-css and test. The package.json should look like below:

{
  "name": "expense-aws",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "start": "node index.js"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/ng-david/expense-aws.git"
  },
  "author": "",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/ng-david/expense-aws/issues"
  },
  "homepage": "https://github.com/ng-david/expense-aws#readme",
  "dependencies": {
    "aws-sdk": "^2.154.0",
    "body-parser": "^1.18.2",
    "express": "^4.16.2",
    "express-handlebars": "^3.0.0",
    "express-session": "^1.15.6",
    "morgan": "^1.9.0",
    "passport": "^0.4.0",
    "passport-github": "^1.1.0"
  }
}
  1. Update the passport GitHub strategy's callbackURL in index.js to be where your Elastic Beanstalk App's URL will be:
passport.use(new GithubStrategy({
    clientID: "secret",
    clientSecret: "secret",
    callbackURL: "<UPDATE ME>"
  },
  function(accessToken, refreshToken, profile, done) {
    return done(null, profile);
  }
));
  1. Remove the folders upload and scssfrom the directory

  2. Select all the contents of this directory and zip them up.

  3. The zip file should now successfully deploy on AWS Elastic Beanstalk

expense-aws-public's People

Contributors

ng-david 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.