Giter Site home page Giter Site logo

petermartens98 / flask-sqlite-banking-web-application Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 9 KB

This is a Flask banking app with login and dashboard pages, using POST requests to submit data to the server. It displays user balance and transaction history in a table, with deposit and withdraw buttons, and uses flash messages, CSS, and jQuery DataTables. The SQLite database has 'users' and 'transactions' tables.

Python 44.31% CSS 19.49% HTML 36.20%

flask-sqlite-banking-web-application's Introduction

Flask-Banking-Application

Project Description

This is a Flask web application that functions as a banking app with two pages: a login page and a dashboard page for logged-in users.

The login page has two forms, one for logging in and one for creating a new account. The login form has fields for a username and password, while the create account form has fields for a first name, last name, email, username, password, and confirm password. Both forms use POST requests to submit data to the server.

The dashboard page displays the user's balance and transaction history in a table. It has buttons for depositing and withdrawing funds, and a log out button that sends a GET request to the server. The transaction forms are hidden by default and are shown when the deposit or withdraw button is clicked using JavaScript. The forms use POST requests to submit data to the server.

The application also uses the Flask flash message system to display success and error messages to the user. The messages are displayed at the top of the page and are styled differently based on their category (success, info, warning, or danger). The application also uses CSS to style the pages and jQuery DataTables to display the transaction table.

This app uses a SQLite database that allows users to create an account, log in, and view their account information. The database has two tables: 'users' and 'transactions'. The 'users' table contains information about each user, including their user ID, name, email, username, password, balance, and account creation date. The 'transactions' table contains information about each transaction, including the transaction ID, user ID, transaction type (e.g., deposit, withdrawal), transaction amount, memo, and transaction time.

The application has several routes:

'/' (index): displays the home page and creates the 'users' and 'transactions' tables if they don't already exist.

'/create_account': creates a new user account with the given information.

'/login': logs in the user with the given username and password.

'/logout': logs out the current user.

'/dashboard/': displays the dashboard for the given user, including their account balance and transaction history.

'/deposit': allows the user to deposit money into their account.

'/withdraw': allows the user to withdraw money from their account.

The application also includes some helper functions for validating input and generating unique IDs.

Example Pages:

User Login

image

User Account Dashboard

image

flask-sqlite-banking-web-application's People

Contributors

petermartens98 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

flask-sqlite-banking-web-application's Issues

Link To Live App

The app looks interesting. It would be nice if you added a link to the live app.

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.