0% found this document useful (0 votes)
25 views11 pages

Index Page

Uploaded by

mampirahulbiswas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views11 pages

Index Page

Uploaded by

mampirahulbiswas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Index Page

1. Certificate

2. CO Address

3. Aim

4. Abstract

5. Introduction

6. Resources Used

7. Brief Description

8. Program Code

9. Output
10. Advantages and Disadvantages

11. Conclusion

12. Future Scope

13. References
Aim
To develop a Frug Destruction System that allows users
to manage and eliminate unwanted digital content
through a secure payment code mechanism.

Abstract
This project aims to create a Frug Destruction System
that efficiently allows users to handle unwanted files or
digital content through a payment-based approach. The
system integrates payment verification to ensure secure
transactions before executing deletion commands, thus
protecting users from unauthorized access and ensuring
accountability.

Introduction
In the digital age, managing data has become
increasingly important. Users often find themselves
dealing with unwanted files, which can clutter their
storage and compromise security. This project presents
a solution: the Frug Destruction System, which uses a
payment code to authorize file deletion. This not only
adds a layer of security but also allows users to have
control over what they wish to keep or remove.
Resources Used

1. Programming Language: Python

2. Libraries: Flask (for web interface),


SQLAlchemy

(for database management), and Stripe


API (for
payment processing)
3. Database: SQLite

4. Development Tools: Visual Studio


Code, Git for

version control

5. Hosting Platform: Heroku (for


deployment)

Brief Description

The Frug Destruction System operates as a web


application where users can upload files they wish to
delete. Upon submission, the user is prompted to make
a payment through a secure gateway (Stripe). Once the
payment is confirmed, the system permanently deletes
the files. This process ensures that users are committed
to their decision to remove files while also
safeguarding against accidental deletions.

Program Code

Python

Copy code

from flask import Flask, request, jsonify

from flask_sqlalchemy import SQLAlchemy

import stripe

app = Flask(__name__)

app.config['SQLALCHEMY_DATABASE_URI'] =

'sqlite:///frug.db'

db = SQLAlchemy(app)

# Stripe API key

stripe.api_key = 'your_secret_key'
class FileToDelete(db.Model):

id = db.Column(db.Integer,

primary_key=True)

filename = db.Column(db.String(100),

nullable=False)

@app.route('/upload', methods=['POST'])

def upload_file():

file = request.files['file']

new_file =

FileToDelete(filename=file.filename)

db.session.add(new_file)

db.session.commit()
return jsonify({'message': 'File uploaded

successfully!'})

@app.route('/pay', methods=['POST'])

def process_payment():

amount = request.json['amount'] # Amount

in cents

try:

charge = stripe.Charge.create(

amount=amount,

currency='usd',

description='Payment for file

deletion',

source=request.json['token']
)

return jsonify({'message': 'Payment

successful!', 'charge_id': charge.id})

except Exception as e:

return jsonify({'error': str(e)}), 400

@app.route('/delete/<int:file_id>',

methods=['DELETE'])

def delete_file(file_id):

file_to_delete =

FileToDelete.query.get_or_404(file_id)

db.session.delete(file_to_delete)

db.session.commit()

return jsonify({'message': 'File deleted

successfully!'})

if __name__ == '__main__':

app.run(debug=True)
Output

The output of the program includes a web interface


where users can upload files, make payments, and
receive confirmation of file deletion. Sample outputs
include:

 Successful file upload messages

 Payment confirmation messages

 Confirmation of file deletion

Advantages and Disadvantages

Advantages

1. Security: Adds a payment


verification layer to
prevent unauthorized deletions.

2. User Control: Empowers users to


manage their digital content actively.
3. Accountability: Provides a clear
transaction record for file deletion
requests.

Disadvantages

1. Cost: Users need to pay for file


deletions, which may deter some from
using the service.

2. Complexity: May require technical


knowledge to set up and use effectively.

3. Dependence on Third-Party
Services: Relies on payment gateways
which may face outages.

Conclusion

The Frug Destruction System effectively combines file


management and secure payment processing, offering a
unique solution to users who wish to control their
digital footprint. The system's design emphasizes
security and accountability, addressing common
concerns related to file deletion.

Future Scope

Future enhancements could include:

1. Multi-file deletion: Allow users to


delete multiple files at once.
2. User authentication: Implement
user accounts for better tracking and
management.

3. Integration with cloud storage:


Enable direct deletion of files from cloud
platforms.

4. Mobile application: Develop a


mobile version of the system for ease of
access.

References
1. Flask Documentation:
https://flask.palletsprojects.com/

2. SQLAlchemy Documentation:
https://docs.sqlalchemy.org/

3. Stripe API Documentation:


https://stripe.com/docs/api

You might also like