Salkhia @ Cheap Call Girls In Kolkata | Book 8005736733 Extreme Naughty Call ...
Fortifin
1. ,
Forti-fin
IP PROJECT FILE: A BANKING APPLICATION
DEVELOPER
Yogesh Jajoria
XII NM2
(30)
Submitted To:
Mrs. Mamta Panwar
PGT CS
2. CERTIFICATE
This is to certify that Master Yogesh Jajoria of class 12 NM2 has
completed the Information Practices Project titled FortiFin.
Under the guidance of Mrs. Mamta Panwar during the
academic year: 2023-24
Through this project, the student has not only demonstrated
proficiency in the subject but has also exhibited exceptional
problem-solving skills, innovative thinking, and a profound
understanding of the software development process. This
outstanding achievement is a source of inspiration to fellow
students and a testament to the dedication and hard work
invested in this project.
Teacher’s Signature:
3. ACKNOWLEDGMENT
I would like to express my deep gratitude to Madam Mamta
Panwar as well as our principal Madam Kamna Beri, to give us
this glorious opportunity to not only work on this enticing project
but also to shoot a short film for the same. FortiFin would be
incomplete without them.
I would like to extent my gratitude to my team. Master Dhiman
and Master Bhatt for working with me and trusting me to lead
this amazing team forward.
This project was not only a learning experience but a journey. A
truly awe-inspiring chapter in the story of mine.
4. TABLE OF
CONTENTS
01 SOFTWARES USED
02 GRAPHICAL USER INTERFACES
03 TECHNICAL INFORMATION
04 DATABASE SCHEMATICS
05 DATA STORED
06 BIBLIOGRAPHY
5. 1
Software(s)
used
PYTHON
Python, an object-oriented programming language, known for it’s simple and easy to
understand syntax. Developed by Guido Von Rossum in the year 1991. This language due
to it’s easy to understand nature has found application in various sectors of technology
like Data Science, Automation and faster prototyping.
MYSQL
An open source, relational database
management system (RDBMS). An
extremely famous database used in
both professional and personal
setting(s). Due to it’s easy to setup
nature and scalability. Tools like
workbench further assist developers
save time on redundant tasks.
Figma
A free to use design software, used for
both wireframing and UI design.
Available both as a web application and
a desktop app. It found it’s use in various
aspects of this project, from logo design
and wireframing to assisting the
developers find an easy access place to
exchange design ideas.
6. 2
Graphical
user
interfaces
OVERVIEW
The graphical user interfaces were firstly
designed in Figma, reiterated multiple
times, with final drafts programmed in
python with help of the Tkinter (Tk)
module.
Tkinter
Part of the GUI community in python
standard library. Provides an easy to use
and deploy solution for making windows
for systems running python, including but
not limited to Mac, Windows and Linux.
“DESIGN IS SO SIMPLE,
THAT’S WHY IT’S SO
COMPLICATED.”
- P A U L R A N D
9. PROGRAMMING
db_conn.py
import mysql.connector as conn
pwd = 'mysql'
db_name = 'fortifin'
db = conn.connect(
host = 'localhost',
user = 'root',
password = f'{pwd}',
charset = 'utf8',
database= f'{db_name}'
)
auth.py
from lib.db_conn import *
try:
if db.is_connected():
print('[!] Connection established')
cur = db.cursor()
except:
print('[!] Connection failed')
def auth(uname, pword):
query = f'''select * from accounts where
customer_id in (select customer_id from customers where
email='{uname}') or
customer_id in (select customer_id from accounts where
account_id='{uname}') and
account_pwd = '{pword}';'''
cur.execute(query)
rows = cur.fetchall()
print(rows)
if len(rows) != 0:
for i in rows:
return i[0]
10. else:
print('Auth.py: No Account Found')
return 0
# if id == 0 or id == None:
# print('[-] Wrong username or password')
# else:
# print(f'Logging in at {id}')
comm_functions.py
'''
This file will be used to store
// functions that are used multiple times
// to avoid redundant functions
'''
import random
def placeholder(widget, text):
def focus():
widget.delete(0,'end')
widget.insert(0,'')
def not_focus():
if widget.get() == '':
widget.delete(0,'end')
widget.insert(0,text)
widget.insert(0,text)
widget.bind("<FocusIn>", lambda args:focus())
widget.bind("<FocusOut>", lambda args: not_focus())
# class AccountDataFetchingError(Exception):
# print(''' AccountDataFetchingError: Raised when problems occour
when fetching data from database.''')
def gen_id():
alpha=list('abcdefghijklmnopqrstuvwxyz0123456789')
x = []
for i in range(12):
x.append(random.choice(alpha))
return ''.join(str(i) for i in x)
17. )
button_image_11 = PhotoImage(
file=relative_to_assets("button_11.png"))
button_11 = Button(
image=button_image_11,
borderwidth=0,
highlightthickness=0,
command=lambda: manager(self.master_root,'about'),
relief="flat",
bg='#212121',
activebackground='#212121'
)
button_11.place(
x=32.0,
y=380.0,
width=183.0416259765625,
height=37.0
)
NotificationBar.py
from pathlib import Path
from tkinter import Tk, Canvas, Entry, Text, Button, PhotoImage,
Scrollbar, Frame, Label
import tkinter as tk
from lib.db_conn import *
import pandas as pd
'''
Developer Notes:
Why use global for variables like PhotoImage?
Answer:
The variable is garbage collected i.e. destroyed
This leads to a empty image box that's white
To avoid this problem, we use a variable with global scope
i.e long lived and not destroyed after execution
'''
OUTPUT_PATH = Path(__file__).parent
NOTIF_FRAME_ASSETS = OUTPUT_PATH /
Path(r"../assets/notification_assets")
def relative_to_assets(path: str) -> Path:
return NOTIF_FRAME_ASSETS / Path(path)
23. font=("Inter Bold", 12 * -1)
)
entry_1.insert(0,f'{args[0]}')
entry_1.config(state='disabled', disabledbackground='#202020',
disabledforeground='#D9D9D9')
entry_2.insert(0,f'{args[1]}')
entry_2.config(state='disabled', disabledbackground='#202020',
disabledforeground='#D9D9D9')
entry_3.insert(tk.END, args[2])
entry_3.config(state='disabled',fg='#D9D9D9')
canvas.pack()
#self.notifications.append(canvas)
#print(self.notifications)
Register.py
from lib.db_conn import *
import datetime
from lib.comm_functions import *
cur = db.cursor()
def register(fname,lname,email,pword,date):
try:
cust_id = gen_id()
query = f'''insert into customers(customer_id, first_name,
last_name, email, dob) values('{cust_id}',
'{fname}','{lname}','{email}','{date}');'''
print(query)
cur.execute(query)
query = f'''insert into accounts values('{gen_id()}',
'{cust_id}','{pword}','Savings',100.00,
"{datetime.datetime.now().strftime("%Y-%m-%d")}")'''
print(query)
cur.execute(query)
db.commit()
except:
print('Error: Failure in inserting data. Rolling Back')
db.rollback()
Transact.py
from lib.db_conn import *
24. from lib.comm_functions import *
import datetime
def validate_receiver(sender_id, receiver_id):
cur = db.cursor()
cur.execute(f'select * from accounts where account_id =
"{receiver_id}"')
if cur.fetchall() == [] or sender_id == receiver_id:
return False
else:
return True
def validate_balance(sender_id, amount):
cur = db.cursor()
cur.execute(f"select balance from accounts where account_id =
'{sender_id}';")
if cur.fetchall()[0][0] < amount:
return False
else:
return True
def transact(sender_id, receiver_id, amount):
cur = db.cursor()
cur.execute(f"update accounts set balance=balance-{amount} where
account_id='{sender_id}';")
cur.execute(f"update accounts set balance=balance+{amount} where
account_id='{receiver_id}';")
cur.execute(f"insert into transactions
values('{gen_id()}','{sender_id}','{receiver_id}',{amount},'{datetime.
datetime.now().strftime('%Y-%m-%d')}','')")
db.commit()
def main(sender_id, receiver_id, amount):
if validate_receiver(sender_id,receiver_id):
if validate_balance(sender_id, amount):
transact(sender_id, receiver_id, amount)
print('[+] Transaction Successful')
else:
print('Amount is larger than balance')
else:
print('Reciver Not Valid')
exit()
25. # main('cph17qeb3gjn','5b5xc5cy7le6',12)
Win_manager.py
from tkinter import *
#from lib.NavigationBar import NavBar
def clear_window(window):
for widget in window.winfo_children():
widget.destroy()
def manager(root,window):
with open('assetsdata.txt','r') as datafile:
account_id=datafile.read()
from views.Account import Account
from views.Transactions import Transactions
from views.Notifications import Notifications
from views.NetBanking import NetBanking
from views.AboutUs import AboutUs
if window == 'acc':
Account(root, account_id=account_id)
elif window == 'tran':
Transactions(account_id)
elif window == 'netb':
NetBanking(root, account_id=account_id)
elif window == 'notif':
Notifications(root, account_id=account_id)
elif window == 'about':
AboutUs(root)
Note: This file excludes the codes for the main graphical user interfaces in folder
‘views’. Due to the files being quite large. To explore this curiosity, these files can
be found at FortiFin github repository, linked below:
https://github.com/thatsyogeshjjr/FortiFin
26. 5
Handling
multiple windows
Spawning new Tk() instances can be quite ‘unsightly’ in an
application. To address this issue, for FortiFin we spawn a
main Tk() instance from login.py and continue to discard its
contents then draw over the same window to maintain a
more linear flow over the application.