A comprehensive internal IT helpdesk ticketing application built with Flask and MySQL.
- User authentication and authorization
- Ticket submission with file attachments
- Ticket management and tracking
- Internal notes and comments
- Email notifications
- Role-based access control
- Responsive web interface
- Python 3.8+
- MySQL 5.7+
- pip (Python package manager)
- Gunicorn (for production)
- Nginx (recommended for production)
- Clone the repository:
git clone https://github.com/rahmanekm/helpdesk.git
cd helpdesk- Create and activate a virtual environment:
python -m venv .venv
. .venv\Scripts\activate- Install dependencies:
pip install -r requirements.txtFor development purposes, you can use Flask's built-in development server:
flask runThe application will be available at http://localhost:5000
For production deployment, it's recommended to use Gunicorn with Nginx:
- Install Gunicorn:
pip install gunicorn- Run with Gunicorn:
gunicorn -w 4 -b 0.0.0.0:8000 wsgi:app- Configure Nginx as a reverse proxy (recommended for production):
server {
listen 80;
server_name your_domain.com;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}Create a .env file in the root directory with the following variables:
FLASK_APP=app.py
FLASK_ENV=production
SECRET_KEY=your-secret-key
DATABASE_URL=mysql://username:password@localhost/helpdesk
MAIL_SERVER=smtp.gmail.com
MAIL_PORT=587
MAIL_USE_TLS=True
MAIL_USERNAME=your_email@gmail.com
MAIL_PASSWORD=your_email_password