A web-based document approval system built with Flask that allows employees to upload documents and get them approved by their superiors in a hierarchical manner.
- User authentication with admin and regular user roles
- Document upload and management
- Hierarchical approval workflow
- PDF document approval with digital signatures and remarks
- Admin dashboard for user management
- Modern and intuitive UI
- Python 3.8 or higher
- pip (Python package installer)
- Clone the repository:
git clone <repository-url>
cd document-approval-system- Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install the required packages:
pip install -r requirements.txt-
The application uses SQLite as the database, which will be automatically created when you first run the application.
-
The default admin credentials are:
- Username: admin
- Password: admin123
It's recommended to change these credentials after the first login.
- Start the Flask development server:
python app.py- Open your web browser and navigate to:
http://localhost:5000
- Log in with the admin credentials
- Use the admin dashboard to:
- Add new users
- Set user hierarchy levels
- Manage existing users
- Log in with your credentials
- Use the dashboard to:
- Upload PDF documents
- Select approvers from users with higher hierarchy levels
- View and manage your uploaded documents
- Approve documents pending your approval
- Add remarks and signatures to approvals
- Change the default admin password immediately after first login
- The application uses secure password hashing
- File uploads are restricted to PDF files only
- Maximum file size is limited to 16MB
document-approval-system/
├── app.py # Main application file
├── requirements.txt # Python dependencies
├── README.md # This file
├── uploads/ # Directory for uploaded documents
└── templates/ # HTML templates
├── base.html # Base template
├── login.html # Login page
├── dashboard.html # User dashboard
└── admin_dashboard.html # Admin dashboard
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.