A comprehensive IT support ticketing system with AI-powered assistance, built with Flask and designed for easy deployment and configuration.
- Ticket Management: Create, view, update, and track IT support tickets
- AI Assistant: Intelligent chatbot that provides policy-based guidance
- Multi-LLM Support: Easily switch between OpenAI, OpenRouter, or other providers
- Policy-Based Responses: AI cites official IT policies and procedures
- Real-time Updates: Live status updates and notifications
- Search & Filtering: Find tickets by status, priority, or content
- Responsive Design: Works on desktop, tablet, and mobile devices
- Password reset guidance with approval workflows
- Software installation request processing
- Network troubleshooting step-by-step instructions
- Security policy explanations
- Automatic ticket creation suggestions
- Transparent reasoning with policy citations
- Easy LLM provider configuration via
.envfile - Comprehensive logging and audit trails
- Ticket statistics and reporting
- Policy document management
- No-code configuration for most settings
- Python 3.8+
- Flask 3.0+
- SQLite (included with Python)
- Internet connection for AI features
- Modern web browser
git clone <repository-url>
cd ChimeraHackathon# Windows
python -m venv venv
venv\Scripts\activate
# Linux/Mac
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtCopy the example environment file and configure your settings:
# Create .env file in backend directory
cd backend
copy .env.example .env # Windows
cp .env.example .env # Linux/MacEdit the .env file:
# Choose your LLM provider: openrouter, openai, gemini
LLM_PROVIDER=openrouter
# Add your API key for the chosen provider
OPENROUTER_API_KEY=your_openrouter_key_here
OPENAI_API_KEY=your_openai_key_here
GEMINI_API_KEY=your_gemini_key_herecd backend
python app.pyThe application will start at http://localhost:5000
To switch between AI providers, simply edit the .env file:
For OpenRouter (Free tier available):
LLM_PROVIDER=openrouter
OPENROUTER_API_KEY=sk-or-v1-your-key-hereFor OpenAI:
LLM_PROVIDER=openai
OPENAI_API_KEY=sk-your-openai-key-hereFor Gemini:
LLM_PROVIDER=gemini
GEMINI_API_KEY=your-gemini-key-hereNo code changes required! Just restart the application.
- Create a new
.txtfile inbackend/policies/ - Add your policy content in plain text
- Restart the application
- The AI agent will automatically include the new policy in its knowledge base
- Logo/Branding: Edit
backend/templates/base.html - Colors/Styling: Modify
backend/static/style.css - Additional Pages: Create new templates in
backend/templates/
-
Creating a Ticket:
- Click "New Ticket" from the dashboard
- Fill in your name and describe the issue
- Select appropriate priority level
- Submit the ticket
-
Using the AI Assistant:
- Click "AI Assistant" from the menu
- Type your IT question in plain English
- Follow the step-by-step guidance provided
- Create a ticket if suggested by the AI
-
Tracking Tickets:
- View all tickets in the "Tickets" section
- Click on any ticket to see detailed information
- Track status changes and resolution progress
-
Managing Tickets:
- View all tickets with filtering and search
- Update ticket status (New β In Progress β Resolved β Closed)
- Assign tickets to team members
- Add resolution notes
-
Monitoring System:
- Dashboard shows real-time statistics
- Search tickets by employee, content, or status
- View AI interaction logs for transparency
-
LLM Configuration:
- Edit
.envfile to change AI provider - No coding required for basic configuration
- Restart application to apply changes
- Edit
-
Policy Management:
- Add new policy files to
backend/policies/ - Edit existing policies as needed
- AI automatically uses updated policies
- Add new policy files to
ChimeraHackathon/
βββ backend/
β βββ app.py # Main Flask application
β βββ database.py # Database operations
β βββ ticket.py # Ticket management logic
β βββ llm_client.py # AI agent integration
β βββ .env # Configuration file
β βββ policies/ # IT policy documents
β β βββ password_reset.txt
β β βββ software_install.txt
β β βββ network_issues.txt
β βββ templates/ # HTML templates
β β βββ base.html
β β βββ index.html
β β βββ agent.html
β β βββ tickets.html
β β βββ create_ticket.html
β βββ static/ # CSS, JavaScript, images
β βββ style.css
β βββ script.js
βββ requirements.txt # Python dependencies
βββ README.md # This file
βββ venv/ # Virtual environment
-
Flask Web Server (
app.py):- Routes for web pages and API endpoints
- Handles HTTP requests and responses
- Coordinates between frontend and backend
-
Database Layer (
database.py):- SQLite database for ticket storage
- CRUD operations with proper error handling
- Automatic logging of all changes
-
Business Logic (
ticket.py):- Ticket lifecycle management
- Validation and business rules
- Statistics and reporting
-
AI Integration (
llm_client.py):- Multi-provider LLM support
- Policy document loading and searching
- Response generation with citations
-
Frontend (Templates + Static files):
- Responsive web interface
- Real-time updates with JavaScript
- Modern UI with Bootstrap
POST /api/tickets- Create new ticketGET /api/tickets- Get all tickets (with filters)PUT /api/tickets/<id>- Update ticketGET /api/tickets/<id>- Get specific ticket
POST /api/agent/ask- Ask AI assistant a question
GET /api/stats- Get system statistics
Application won't start:
- Check that you're in the
backenddirectory - Ensure virtual environment is activated
- Verify all dependencies are installed
AI agent not working:
- Check your API key in
.envfile - Verify the LLM provider is set correctly
- Check internet connection
- Look at console logs for error messages
Database errors:
- Delete
it_support.dbto reset database - Check file permissions in the directory
- Ensure SQLite is available (included with Python)
Templates not loading:
- Verify you're running from
backenddirectory - Check that
templatesfolder exists - Restart the application
- Check the logs: Look at the console output when running the app
- Create a test ticket: Use the system to create a simple ticket
- Test AI separately: Try the AI assistant with a simple question
- Check configuration: Verify your
.envfile settings
cd backend
export FLASK_ENV=development # Linux/Mac
set FLASK_ENV=development # Windows
python app.py- New API endpoints: Add routes to
app.py - Database changes: Modify
database.pyschema - New templates: Create HTML files in
templates/ - Styling: Edit
static/style.css - Client-side logic: Modify
static/script.js
Basic testing can be done by:
- Creating test tickets through the web interface
- Asking the AI assistant various questions
- Testing different ticket statuses and updates
- Verifying policy citations are working
For production use:
- Use a production WSGI server (Gunicorn, uWSGI)
- Set up a reverse proxy (Nginx, Apache)
- Use environment variables for sensitive configuration
- Set up proper logging and monitoring
- Regular backups of the SQLite database
- SSL/HTTPS for secure communication
To contribute to this project:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is provided as-is for educational and demonstration purposes.
For support or questions:
- Check this README for common solutions
- Create a ticket using the system itself
- Ask the AI assistant for help with IT questions
- Contact the development team
Built with β€οΈ for the IT support community