A modern full-stack ticket management system that integrates with FreshService API. Built with FastAPI (backend) and React (frontend), featuring server-side filtering, pagination, and intelligent ticket management capabilities.
- Ticket Management: View, filter, and manage support tickets from FreshService
- Smart Filtering: Filter tickets by group with server-side optimization
- Pagination: Efficient pagination with "Load More" functionality
- Real-time Updates: Dynamic ticket updates and filtering
- AI Analysis Panel: Analyze tickets with AI-powered insights
- Responsive UI: Modern glass-morphism design with smooth interactions
- Search Functionality: Quick search across tickets by ID, subject, or status
Before you begin, ensure you have the following installed:
git clone https://github.com/SantiagoSC1999/FreshAI-Service.git
cd FreshAI-Servicecd backend
python -m venv venvOn Windows (PowerShell):
.\venv\Scripts\Activate.ps1On Windows (Command Prompt):
venv\Scripts\activate.batOn macOS/Linux:
source venv/bin/activatepip install -r requirements.txtCreate a .env file in the backend folder:
cp .env.example .envEdit .env and add your FreshService credentials:
FRESHSERVICE_API_KEY=your_api_key_here
FRESHSERVICE_DOMAIN=your_domain_hereExample:
FRESHSERVICE_API_KEY=abc123def456
FRESHSERVICE_DOMAIN=allianceπ‘ Where to get these values?
- API Key: Go to FreshService Admin β API Tokens
- Domain: The subdomain in your FreshService URL (e.g.,
https://alliance.freshservice.comβalliance)
python main.pyYou should see:
β
Tickets routes registered
π Starting server...
INFO: Uvicorn running on http://0.0.0.0:8000
Backend is now running at http://localhost:8000
cd ../clientnpm installCreate a .env file in the client folder (if not already present):
VITE_API_URL=http://localhost:8000/apinpm run devYou should see:
VITE v7.2.4 ready in X.XXX ms
β Local: http://localhost:5173/
Frontend is now running at http://localhost:5173
- Open your browser and navigate to http://localhost:5173
- The dashboard will load with your FreshService tickets
- Use the filters to manage tickets by group and status
- Click "Load More" to paginate through tickets
FreshAI-Service/
β
βββ backend/ # Python FastAPI Backend
β βββ api/
β β βββ routes/
β β β βββ tickets.py # Ticket endpoints
β β βββ freshservice_client.py # FreshService API client
β βββ config.py # Configuration
β βββ main.py # Entry point
β βββ requirements.txt # Python dependencies
β
βββ client/ # React Frontend
β βββ src/
β β βββ components/ # React components
β β βββ pages/ # Page components
β β βββ hooks/ # Custom React hooks
β β βββ services/ # API client service
β β βββ store/ # Zustand state management
β β βββ styles/ # Global styles
β βββ package.json # Node dependencies
β βββ vite.config.ts # Vite configuration
β
βββ README.md # This file
Get Paginated Tickets
GET /api/tickets?page=1&per_page=30&group_id=26000250424
Get Single Ticket
GET /api/tickets/{id}
Get Ticket Conversations
GET /api/tickets/{id}/conversations
Search Tickets
GET /api/tickets/search?query=keyword
# Start development server (from backend folder)
python main.py
# Run tests
python -m pytest tests/# Start development server (from client folder)
npm run dev
# Build for production
npm run build
# Run linting
npm run lint
# Preview production build
npm run preview| Variable | Description | Example |
|---|---|---|
FRESHSERVICE_API_KEY |
Your FreshService API key | abc123def456 |
FRESHSERVICE_DOMAIN |
Your FreshService domain | alliance |
| Variable | Description | Default |
|---|---|---|
VITE_API_URL |
Backend API URL | http://localhost:8000/api |
- FastAPI - Modern web framework
- Uvicorn - ASGI server
- Requests - HTTP library
- Python-dotenv - Environment variables
- React 19.2 - UI library
- Vite 7.2 - Build tool
- TypeScript 5.9 - Type safety
- Axios - HTTP client
- Zustand - State management
- React Router - Routing
Error: "vite is not recognized"
cd client
npm install
npm run devError: "FreshService credentials not configured"
- Verify
.envfile exists inbackendfolder - Check
FRESHSERVICE_API_KEYandFRESHSERVICE_DOMAINare set correctly
Error: "Port 8000 already in use"
# On Windows
netstat -ano | findstr :8000
taskkill /PID <PID> /F
# On macOS/Linux
lsof -ti:8000 | xargs kill -9Error: "Cannot find module"
npm install
npm run build # Check for TypeScript errorsPort 5173 already in use
# On Windows
netstat -ano | findstr :5173
taskkill /PID <PID> /F
# On macOS/Linux
lsof -ti:5173 | xargs kill -9cd client
npm run buildThis creates a dist folder with optimized production files.
For production, use a production-grade ASGI server:
pip install gunicorn
gunicorn main:app --workers 4 --worker-class uvicorn.workers.UvicornWorker# Check status
git status
# Stage changes
git add .
# Commit
git commit -m "Description of changes"
# Push to GitHub
git push origin main- Never commit
.envfiles (already in.gitignore) - Keep API keys and sensitive data private
- Use environment variables for all credentials
- Rotate API keys regularly
- Create a new branch for your feature
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
Santiago SΓ‘nchez - GitHub
For issues or questions, please open an issue on GitHub Issues.
To pull the latest updates:
git pull origin main
cd backend && pip install -r requirements.txt
cd ../client && npm installLast Updated: December 2, 2025
Happy coding! π