Skip to content

A simple issue-tracking platform for receiving user reports and managing task statuses with additional utility features.

Notifications You must be signed in to change notification settings

maplehugs/ticket_system_in_java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CentroDeTickets - Ticket System

A web-based ticket management system built with Java, designed to help organizations efficiently manage user issues and support requests with integrated messaging and real-time communication.

Note

This project was created 2 years ago and is being uploaded to demonstrate real coding experience. The code is from an earlier stage of my development (not polished), but it's functional and well-documented. I've deleted previous GitHub repositories that lacked documentation and READMEs because I'd rather show one legitimate project with proof of hands-on experience than multiple poorly documented ones. I've continued learning and built better things since then.

Overview

CentroDeTickets is a comprehensive ticket tracking platform that allows users to:

  • Submit tickets - Report problems or issues with detailed information
  • Track ticket status - Monitor progress and updates on submitted tickets
  • Chat in real-time - Communicate with support staff through integrated messaging
  • Attach media - Include images and files to provide more context
  • View analytics - Track ticket statistics and performance metrics

Features

Core Functionality

  • Ticket Management

    • Create tickets with title, description, category, and priority
    • Assign tickets to specific support staff
    • Track ticket status (Open, In Progress, Resolved, Closed)
    • Categorize tickets by department/area and location (sede)
  • Messaging & Chat

    • Real-time message exchange within each ticket
    • Support for rich text messages with multiple participants
    • Media attachment support (images and files)
    • Message timestamps and sender identification
  • User Management

    • User registration and authentication
    • Role-based access (Users, Support Staff, Admins)
    • User profile management
    • Email verification
    • Password reset functionality
  • Admin Features

    • Dashboard with ticket statistics
    • Manage ticket categories
    • View all tickets system-wide
    • Assign and reassign tickets
    • Set ticket priority levels
    • Generate reports and analytics

Technical Features

  • Email Integration - Automated email notifications for ticket updates
  • File Uploads - Media management for ticket attachments
  • Database Integration - MySQL backend with connection pooling
  • Security - SHA-256 password hashing with salting
  • URL Rewriting - Clean, SEO-friendly URLs

Tech Stack

  • Backend: Java 21 with Jakarta Servlets
  • Frontend: JSP (Java Server Pages) with HTML/CSS/JavaScript
  • Build Tool: Apache Maven
  • Database: MySQL
  • Testing: JUnit 5
  • Email: Java Mail API (javax.mail)
  • JSON Processing: Gson
  • Additional: URL Rewrite Filter for clean URLs

Project Structure

src/
├── main/
│   ├── java/org/australens/backend/
│   │   ├── ClassesToMakeGeneralStuffWork/     # Core models (Ticket, Comments)
│   │   ├── LoadTicketsRelated/                # Servlets for loading ticket data
│   │   ├── UpdateTicketsRelated/              # Servlets for updating tickets
│   │   ├── ServerCreationRelated/             # Ticket and category creation
│   │   ├── ServerProfilesRelated/             # User auth (Login, Register)
│   │   ├── ServerEmailRelated/                # Email functionality
│   │   ├── ServerReMaping/                    # URL routing
│   │   ├── ServerUtils/                       # Utility classes
│   │   ├── mysql/                             # Database connections
│   │   └── TestingPackage/                    # Testing utilities
│   ├── resources/                             # Images and assets
│   └── webapp/                                # Web interface
│       ├── *.jsp                              # Web pages
│       ├── WEB-INF/                           # Configuration files
│       └── resources/                         # Images, uploads, messages

Getting Started

Prerequisites

  • Java 21 or higher
  • Maven 3.6+
  • MySQL 5.7+
  • Jakarta Servlet API 6.1.0

Installation

  1. Clone or download the repository

    git clone <repository-url>
    cd ticket_system_in_java
  2. Configure environment variables

    • Create a .env file in the root directory of the project
    • The application uses the dotenv library to load environment variables
    • See the Environment Configuration section below for required variables
  3. Set up the database

    • Create the MySQL database with the provided schema:
    mysql -u root -p < database/schema.sql
    • Or manually import database/schema.sql through your MySQL client
    • This will create all required tables with proper relationships

Important

The database must be created and the schema imported before running the application for the first time.

  1. Build the project

    mvn clean install
  2. Deploy

    • Deploy the generated WAR file to your servlet container (e.g., Apache Tomcat)
    • Or run locally with Maven:
    mvn tomcat7:run
  3. Access the application

    • Navigate to http://localhost:8080/CentroDeTickets

Environment Configuration (.env file)

Create a .env file in the root directory of the project with the following configuration:

# Database Configuration
DB_URL=jdbc:mysql://localhost:3306/australticketcenter
DB_USER=root
DB_PASSWORD=admin
DB_NAME=australticketcenter

# Email Configuration (Gmail)
GMAIL_USERNAME=your_email@gmail.com
GMAIL_APP_PASSWORD=your_app_password

# Web Configuration
WEB_URL=http://localhost:8080/CentroDeTickets

# Admin Emails (comma-separated)
ADMIN_EMAILS=admin@example.com, support@example.com

Important Notes:

  • The .env file should NOT be committed to version control. Add it to .gitignore
  • DB_URL uses a full JDBC connection string, not separate host/port
  • For Gmail, you MUST use an App Password, not your regular Gmail password
    • This requires 2-factor authentication to be enabled on your Gmail account
  • The WEB_URL should match your actual deployment URL
  • ADMIN_EMAILS can contain multiple email addresses se

Warning

Never commit the .env file to version control. It contains sensitive credentials (database passwords, Gmail app passwords, etc.). Always add it to .gitignore.

Caution

If you have a database backup file (like final_backup.sql), do NOT commit it to version control if it contains real user data or sensitive information. Keep backups locally or in a secure location.parated by commas

  • The database must exist before running the application

Usage

For Regular Users

  1. Register - Create an account on the registration page
  2. Create Ticket - Click "New Ticket" and fill in details
  3. Submit - Include description, category, contact info, and optional images
  4. Track - View ticket status on your dashboard
  5. Communicate - Use the chat feature to message support staff

For Support Staff

  1. Login - Access with staff credentials
  2. View Tickets - See assigned or all tickets
  3. Respond - Send messages within tickets to assist users
  4. Update Status - Change ticket status and priority
  5. Assign - Reassign tickets to appropriate staff

For Administrators

  1. Dashboard - View all system statistics
  2. Manage Categories - Create and manage ticket categories
  3. Manage Users - View and control user accounts
  4. Settings - Configure system preferences
  5. Reports - Generate analytics and reports

API Endpoints

Ticket Operations

  • POST /ticket/create - Create new ticket
  • GET /load-all-tickets - Load all tickets
  • GET /load-tickets-user - Load user's tickets
  • POST /update-status - Update ticket status
  • POST /update-priority - Update ticket priority

Messaging

  • POST /create-message - Add message to ticket
  • GET /load-messages-ticket - Load ticket messages
  • POST /upload-media - Upload media to message

User Management

  • POST /login - User login
  • POST /register - User registration

Security Features

Tip

For development/testing, you can use any Gmail account with 2-factor authentication enabled. Generate an App Password specifically for this application rather than using your main Gmail password. This can be revoked anytime without affecting your actual Gmail account.

  • Password Security: SHA-256 hashing with salt
  • Email Verification: Verify user email addresses
  • Session Management: Secure user sessions
  • Input Validation: Server-side validation
  • URL Rewriting: Clean URL structure to prevent exposure of paths

Database Schema

The database schema is defined in database/schema.sql and includes the following tables:

  • users - User accounts with email, password (hashed), phone, and role
  • area - Department/area classifications for tickets
  • sedes - Office locations
  • categorias - Ticket categories
  • prioridades - Priority levels for tickets

Note

This is an active learning project. If you find areas for improvement or have suggestions for better practices, they are absolutely welcome. The goal is to continuously improve the codebase as the developer's skills grow.

  • tickets - Main ticket records with status, priority, creator, and assigned staff
  • comentarios - Messages/comments within tickets
  • media - File attachments for comments

All tables use UTF8MB4 encoding and have proper foreign key relationships and indexes for performance.

Contributing

Feel free to submit issues and enhancement requests!

Note

This repository showcases real project development experience. The codebase demonstrates practical implementation of ticketing systems, user authentication, real-time messaging, and database design. While there's always room for improvement, this represents a solid foundation in full-stack Java web development.

License

[Add your license information here]

Support

For support or questions, contact the development team or create an issue in the repository.


Project Name: CentroDeTickets
Version: 1.0-SNAPSHOT
Last Updated: February 2026 A simple issue-tracking platform for receiving user reports and managing task statuses with additional utility features.

About

A simple issue-tracking platform for receiving user reports and managing task statuses with additional utility features.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages