A simple Tkinter-based document sharing platform connected to a MySQL database. This project demonstrates backend development using Python and MySQL.
Users can register, log in, view available documents, request documents, and download them locally. Administrators have additional permissions to add and delete documents.
- Register/Login: Users can create an account and log in.
- View Documents: View the list of available documents after logging in.
- Request Documents: Request and download documents locally.
- Admin Login: Admin can log in using admin credentials.
- Add Documents: Add new documents to the platform.
- Delete Documents: Delete documents using their document ID.
Before you begin, make sure you have the following installed:
- Python — Check with
python --version - MySQL — Required to host the databases
- Git — Required to clone the repository
Open a terminal or command prompt and run:
git clone https://github.com/vignesh-krish-dev/doc-sharing-platform.git
cd doc-sharing-platformInstall the required PyMySQL library:
pip install pymysqlOpen MySQL and create the following databases:
admin
userdb
Create the required tables in each database.
CREATE TABLE docs (
id INT AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(255) NOT NULL,
description TEXT
);CREATE TABLE user (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(255) UNIQUE NOT NULL,
password VARCHAR(255) NOT NULL,
email VARCHAR(255)
);Open the following Python files in the project:
index.py
adminlogin.py
admin dash.py
userdash.py
ud2.py
ud3.py
Update the MySQL connection details in each file with your own credentials.
Example:
connection = pymysql.connect(
host="localhost",
user="your_mysql_username",
password="your_mysql_password",
database="userdb" # Use "admin" for the admin database
)Start the user interface with:
python index.pyTo access the admin dashboard:
python adminlogin.pyOther application modules can be run using:
python userdash.py
python "admin dash.py"
python ud2.py
python ud3.py- Register a new account.
- Log in using your credentials.
- View available documents.
- Request or download documents.
- Log in with admin credentials.
- Add new documents.
- Delete existing documents using the document ID.
If you encounter issues:
- Make sure MySQL is running.
- Verify that the
adminanduserdbdatabases exist. - Ensure the required tables have been created.
- Double-check MySQL credentials in all Python files.
- Make sure the required Python libraries are installed.
- Ensure you are running the commands from the project directory.