├── Procfile ├── static ├── favicon.ico ├── spent-background.jpg ├── spent-map-screenshot.png ├── spent-login-screenshot.png ├── spent-modal-screenshot.png ├── spent-widget-screenshot.png ├── spent-dashboard-screenshot.png ├── bootstrap-3.3.6 │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ ├── js │ │ ├── npm.js │ │ └── bootstrap.min.js │ └── css │ │ ├── bootstrap-theme.min.css.map │ │ ├── bootstrap-theme.min.css │ │ └── bootstrap-theme.css ├── js │ ├── intercom-shutdown.js │ ├── charts.js │ ├── delete-expenditure.js │ ├── submit-new-account-info.js │ ├── submit-budget.js │ ├── map.js │ └── submit-expenditure.js └── style.css ├── seed_data ├── categories.csv ├── users.csv ├── budget.csv └── expenditures.csv ├── .gitignore ├── requirements.txt ├── templates ├── base.html ├── homepage.html └── dashboard.html ├── README.md ├── tools.py ├── model.py ├── seed.py ├── tests.py └── server.py /Procfile: -------------------------------------------------------------------------------- 1 | web: gunicorn server:app -------------------------------------------------------------------------------- /static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilydowgialo/Spent/HEAD/static/favicon.ico -------------------------------------------------------------------------------- /static/spent-background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilydowgialo/Spent/HEAD/static/spent-background.jpg -------------------------------------------------------------------------------- /seed_data/categories.csv: -------------------------------------------------------------------------------- 1 | 1|Online Purchase 2 | 2|Travel 3 | 3|Food 4 | 4|Groceries 5 | 5|Clothing 6 | 6|Entertainment -------------------------------------------------------------------------------- /static/spent-map-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilydowgialo/Spent/HEAD/static/spent-map-screenshot.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | env/ 2 | *.pyc 3 | .DS_Store 4 | spent.sublime-* 5 | htmlcov/* 6 | .coverage 7 | env 8 | instance/ 9 | secrets.sh -------------------------------------------------------------------------------- /static/spent-login-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilydowgialo/Spent/HEAD/static/spent-login-screenshot.png -------------------------------------------------------------------------------- /static/spent-modal-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilydowgialo/Spent/HEAD/static/spent-modal-screenshot.png -------------------------------------------------------------------------------- /static/spent-widget-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilydowgialo/Spent/HEAD/static/spent-widget-screenshot.png -------------------------------------------------------------------------------- /static/spent-dashboard-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilydowgialo/Spent/HEAD/static/spent-dashboard-screenshot.png -------------------------------------------------------------------------------- /static/bootstrap-3.3.6/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilydowgialo/Spent/HEAD/static/bootstrap-3.3.6/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /static/bootstrap-3.3.6/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilydowgialo/Spent/HEAD/static/bootstrap-3.3.6/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /seed_data/users.csv: -------------------------------------------------------------------------------- 1 | 1|Emily|emily@emily.com|emily 2 | 2|Hello Kitty|hello@kitty.com|password 3 | 3|Sailor Moon|sailor@moon.com|password 4 | 4|Dog|dog@dog.com|dog 5 | 5|Mu|mu@mu.com|mu -------------------------------------------------------------------------------- /static/bootstrap-3.3.6/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilydowgialo/Spent/HEAD/static/bootstrap-3.3.6/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /static/bootstrap-3.3.6/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilydowgialo/Spent/HEAD/static/bootstrap-3.3.6/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /seed_data/budget.csv: -------------------------------------------------------------------------------- 1 | 1|1000|1|1|2016-04-07|2016-05-07 2 | 2|500|2|4|2016-04-07|2016-05-07 3 | 3|280|3|5|2016-04-07|2016-05-07 4 | 4|700|4|3|2016-04-07|2016-05-07 5 | 5|900|5|2|2016-04-07|2016-05-07 -------------------------------------------------------------------------------- /static/js/intercom-shutdown.js: -------------------------------------------------------------------------------- 1 | 2 | function shutdownIntercom (evt) { 3 | 4 | evt.preventDefault(); 5 | 6 | Intercom('shutdown'); 7 | window.location = '/logout'; 8 | 9 | } 10 | 11 | // Button click event 12 | $('#sign-out').click(shutdownIntercom); -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | blinker==1.4 2 | Flask==0.10.1 3 | Flask-DebugToolbar==0.10.0 4 | Flask-SQLAlchemy==2.1 5 | itsdangerous==0.24 6 | Jinja2==2.8 7 | MarkupSafe==0.23 8 | pprintpp==0.2.3 9 | psycopg2==2.6.1 10 | requests==2.10.0 11 | SQLAlchemy==1.0.12 12 | Werkzeug==0.11.9 13 | gunicorn -------------------------------------------------------------------------------- /seed_data/expenditures.csv: -------------------------------------------------------------------------------- 1 | 1|1|14.00|2016-04-07|1|Whole Foods|food for the week|| 2 | 2|2|20.00|2016-04-08|5|Amazon|new leash|| 3 | 3|4|60.50|2016-04-09|3|Forever21|cool new shirt|| 4 | 4|3|550.00|2016-04-20|4|United|plane tix to Hawaii|| 5 | 5|5|20.00|2016-04-23|2|Century Theater|tickets to the Avengers|9374889676090040179500|usps -------------------------------------------------------------------------------- /static/bootstrap-3.3.6/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /static/js/charts.js: -------------------------------------------------------------------------------- 1 | 2 | // Charts are from chart.js 3 | 4 | function charts() { 5 | 6 | var options = { 7 | responsive: true 8 | }; 9 | 10 | var ctx_donut = $("#donutChart").get(0).getContext("2d"); 11 | 12 | // Gets info from this route in server.py and sends to the donut chart 13 | $.get("/expenditure-types.json", function (data) { 14 | var myDonutChart = new Chart(ctx_donut).Doughnut(data.expenditures, options); 15 | $('#donutLegend').html(myDonutChart.generateLegend()); 16 | }); 17 | 18 | var ctx_line = $("#barChart").get(0).getContext("2d"); 19 | 20 | // Gets info from this route in server.py and sends to the bar chart 21 | $.get("/total-spent.json", function (data) { 22 | var myBarChart = new Chart(ctx_line).Bar(data, options); 23 | $("#BarLegend").html(myBarChart.generateLegend()); 24 | }); 25 | 26 | } 27 | 28 | // Call the function so the charts display upon page load 29 | charts(); -------------------------------------------------------------------------------- /templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 || Category | 169 |Total Spent | 170 |Start Date | 171 |End Date | 172 |
|---|---|---|---|
| Clothing | 177 |${{ '%0.2f' % total_clothing_price|float }} | 178 |{{ cat_5_start_date }} | 179 |{{ cat_5_end_date }} | 180 |
| Entertainment | 183 |${{ '%0.2f' % total_entertainment_price|float }} | 184 |{{ cat_6_start_date }} | 185 |{{ cat_6_end_date }} | 186 |
| Food | 189 |${{ '%0.2f' % total_food_price|float }} | 190 |{{ cat_3_start_date }} | 191 |{{ cat_3_end_date }} | 192 |
| Groceries | 195 |${{ '%0.2f' % total_groceries_price|float }} | 196 |{{ cat_4_start_date }} | 197 |{{ cat_4_end_date }} | 198 |
| Online Purchases | 201 |${{ '%0.2f' % total_online_purchase_price|float }} | 202 |{{ cat_1_start_date }} | 203 |{{ cat_1_end_date }} | 204 |
| Travel | 207 |${{ '%0.2f' % total_travel_price|float }} | 208 |{{ cat_2_start_date }} | 209 |{{ cat_2_end_date }} | 210 |
| Category | 229 |Average Spent | 230 |Start Date | 231 |End Date | 232 |
|---|---|---|---|
| Clothing | 237 |${{ '%0.2f' % avg_clothing_expenditures|float }} | 238 |{{ cat_5_start_date }} | 239 |{{ cat_5_end_date }} | 240 |
| Entertainment | 243 |${{ '%0.2f' % avg_entertainment_expenditures|float }} | 244 |{{ cat_6_start_date }} | 245 |{{ cat_6_end_date }} | 246 |
| Food | 249 |${{ '%0.2f' % avg_food_expenditures|float }} | 250 |{{ cat_3_start_date }} | 251 |{{ cat_3_end_date }} | 252 |
| Groceries | 255 |${{ '%0.2f' % avg_groceries_expenditures|float }} | 256 |{{ cat_4_start_date }} | 257 |{{ cat_4_end_date }} | 258 |
| Online Purchases | 261 |${{ '%0.2f' % avg_online_expenditures|float }} | 262 |{{ cat_1_start_date }} | 263 |{{ cat_1_end_date }} | 264 |
| Travel | 267 |${{ '%0.2f' % avg_travel_expenditures|float }} | 268 |{{ cat_2_start_date }} | 269 |{{ cat_2_end_date }} | 270 |
| Category | 348 |Budget | 349 |Start Date | 350 |End Date | 351 |
|---|---|---|---|
| Clothing | 356 |${{ cat_5_budget }} | 357 |{{ cat_5_start_date }} | 358 |{{ cat_5_end_date }} | 359 |
| Entertainment | 362 |${{ cat_6_budget }} | 363 |{{ cat_6_start_date }} | 364 |{{ cat_6_end_date }} | 365 |
| Food | 368 |${{ cat_3_budget }} | 369 |{{ cat_3_start_date }} | 370 |{{ cat_3_end_date }} | 371 |
| Groceries | 374 |${{ cat_4_budget }} | 375 |{{ cat_4_start_date }} | 376 |{{ cat_4_end_date }} | 377 |
| Online Purchases | 380 |${{ cat_1_budget }} | 381 |{{ cat_1_start_date }} | 382 |{{ cat_1_end_date }} | 383 |
| Travel | 386 |${{ cat_2_budget }} | 387 |{{ cat_2_start_date }} | 388 |{{ cat_2_end_date }} | 389 |
| Category | 405 |Budget Remaining | 406 |
|---|---|
| Clothing | 411 |
412 |
413 |
414 |
417 |
418 |
419 | |
420 |
| Entertainment | 424 |
425 |
426 |
427 |
430 |
431 |
432 | |
433 |
| Food | 437 |
438 |
439 |
440 |
443 |
444 |
445 | |
446 |
| Groceries | 450 |
451 |
452 |
453 |
456 |
457 |
458 | |
459 |
| Online Purchases | 463 |
464 |
465 |
466 |
469 |
470 |
471 | |
472 |
| Travel | 476 |
477 |
478 |
479 |
482 |
483 |
484 | |
485 |
| Category | 570 |Price | 571 |Date | 572 |Place | 573 |Description | 574 |Track | 575 |Remove | 576 |
|---|---|---|---|---|---|---|
| {{ expenditure.category.category }} | 584 |${{ expenditure.price }} | 585 |{{ expenditure.date_of_expenditure.strftime('%Y-%m-%d') }} | 586 |{{ expenditure.where_bought }} | 587 |{{ expenditure.description }} | 588 |{% if expenditure.tracking_num %} 589 | {% endif %} | 592 |593 | | 602 |