Skip to content

ishumatil/ticket_management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Blue Ticket - Full Stack Event Management Platform

A complete event ticketing and management platform with a modern Angular frontend and a robust Spring Boot backend API.

πŸ“‹ Project Overview

This is a full-stack application that provides:

  • Frontend: Modern Angular 19 UI with responsive design for users and administrators
  • Backend: RESTful API built with Spring Boot 3.1 for event and ticket management

🌐 Live Backend Deployment

The Backend API is deployed and publicly accessible:

Service URL
API Base https://ticket-management-system-k1cg.onrender.com/api
Swagger UI https://ticket-management-system-k1cg.onrender.com/swagger-ui/index.html
API Docs https://ticket-management-system-k1cg.onrender.com/v3/api-docs

Deployment Details:

  • Platform: Render (Cloud Platform)
  • Container: Docker
  • Status: 🟒 Live and Running
  • Database: H2 (In-Memory)

Note: This is a free tier deployment. The API sleeps after 15 minutes of inactivity. First request after sleep may take 30-60 seconds to respond.

Quick Test:

curl https://ticket-management-system-k1cg.onrender.com/api/events

πŸ—οΈ Architecture

ticket_management/
β”œβ”€β”€ frontend/          # Angular 19 UI application
β”‚   β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ angular.json
β”‚   └── package.json
β”œβ”€β”€ backend/           # Spring Boot REST API
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ main/java/
β”‚   β”‚   └── test/java/
β”‚   β”œβ”€β”€ pom.xml
β”‚   └── README.md
└── README.md          # This file

πŸš€ Quick Start

Prerequisites

For Frontend:

  • Node.js (v18 or higher)
  • npm (v9 or higher)
  • Angular CLI (v19 or higher)

For Backend:

  • Java JDK 17 or higher
  • Maven 3.6+

Running the Application

1. Start the Backend Server

cd backend
mvn spring-boot:run

The backend API will be available at: http://localhost:8080

API Documentation (Swagger UI): http://localhost:8080/swagger-ui/index.html

2. Start the Frontend Application

cd frontend
npm install
npm start

The frontend will be available at: http://localhost:4200

πŸ“¦ Frontend - Angular Application

Features

User Features

  • Browse events by categories (Music, Arts, Sports, etc.)
  • View detailed event information
  • Responsive design for all devices
  • Search and filter events

Admin Features

  • Dashboard with analytics and statistics
  • Event management (Create, Read, Update, Delete)
  • Visual charts for revenue and categories
  • Event status tracking

Tech Stack

  • Framework: Angular 19 (Standalone Components)
  • Language: TypeScript
  • Styling: SCSS
  • SSR: Angular Universal

Routes

Route Description
/user User home page
/user/event/:id Event details
/admin/dashboard Admin dashboard
/admin/events Event management

For detailed frontend documentation, see the original README in the frontend/ directory.

πŸ”§ Backend - Spring Boot API

Features

  • RESTful API for event and ticket management
  • JPA/Hibernate for data persistence
  • H2 in-memory database (development)
  • Spring Security configuration
  • Swagger/OpenAPI documentation
  • Comprehensive test coverage

Tech Stack

  • Framework: Spring Boot 3.1.0
  • Language: Java 17
  • Database: H2 (in-memory)
  • Security: Spring Security
  • API Docs: SpringDoc OpenAPI
  • Testing: JUnit 5, Mockito

API Endpoints

Event Management

Method Endpoint Description
GET /api/events Get all events
GET /api/events/{id} Get event by ID
POST /api/events Create a new event
PUT /api/events/{id} Update an event
DELETE /api/events/{id} Delete an event

Ticket Management

Method Endpoint Description
GET /api/tickets/event/{eventId} Get tickets for an event
GET /api/tickets/{id} Get ticket by ID
POST /api/tickets/reserve/{ticketId} Reserve a ticket

For detailed backend documentation, see backend/README.md

πŸ”— Frontend-Backend Integration

API Configuration

Update the Angular environment file to connect to the backend:

frontend/src/environments/environment.ts

export const environment = {
  production: false,
  apiUrl: 'http://localhost:8080/api'
};

CORS Configuration

The backend is configured to allow CORS requests from the Angular frontend running on localhost:4200.

πŸ—„οΈ Database

Development (H2 In-Memory)

Production

For production, configure a persistent database (PostgreSQL/MySQL) in backend/src/main/resources/application.properties

πŸ§ͺ Testing

Backend Tests

cd backend
mvn test

Test Coverage: 36 tests across all layers (Repository, Service, Controller)

Frontend Tests

cd frontend
npm test

πŸ“š Documentation

API Documentation

Development Guides

πŸ” Security

Current Configuration

  • Development Mode: All endpoints are publicly accessible
  • CSRF: Disabled for development
  • Authentication: Not implemented (planned for future)

Production Recommendations

  • Implement JWT-based authentication
  • Add role-based access control (RBAC)
  • Enable HTTPS
  • Configure proper CORS policies
  • Use environment-specific configurations

πŸš€ Deployment

Backend Deployment

Build JAR

cd backend
mvn clean package

Run Production Build

java -jar target/ticket_management-1.0-SNAPSHOT.jar

Frontend Deployment

Build for Production

cd frontend
npm run build

The production files will be in frontend/dist/event-management/

πŸ“ Environment Variables

Backend

Create application-prod.properties for production:

server.port=8080
spring.datasource.url=jdbc:postgresql://localhost:5432/ticketdb
spring.datasource.username=your_username
spring.datasource.password=your_password
spring.jpa.hibernate.ddl-auto=update

Frontend

Update environment files in frontend/src/environments/

πŸ› οΈ Development Workflow

  1. Start Backend: cd backend && mvn spring-boot:run
  2. Start Frontend: cd frontend && npm start
  3. Access Application: http://localhost:4200
  4. Test Backend API: http://localhost:8080/swagger-ui/index.html
  5. Run Tests:
    • Backend: mvn test
    • Frontend: npm test

🎯 Example API Usage

Create an Event

curl -X POST http://localhost:8080/api/events \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Rock Concert 2026",
    "date": "2026-06-15",
    "location": "Madison Square Garden"
  }'

Get All Events

curl http://localhost:8080/api/events

Reserve a Ticket

curl -X POST http://localhost:8080/api/tickets/reserve/1

πŸ”„ Future Enhancements

Planned Features

  • User authentication and authorization (JWT)
  • Payment gateway integration (Stripe/PayPal)
  • Email notifications
  • User profile management
  • Booking history and management
  • QR code generation for tickets
  • Real-time updates using WebSockets
  • Advanced analytics and reporting
  • Social media integration
  • Mobile app (React Native/Flutter)

Technical Improvements

  • Implement Redis caching
  • Add database migrations (Flyway/Liquibase)
  • Set up CI/CD pipeline
  • Add Docker containerization
  • Implement rate limiting
  • Add monitoring and logging (ELK Stack)
  • Performance optimization

πŸ› Known Issues

  • Dynamic route prerendering requires additional configuration
  • H2 database is for development only - configure persistent database for production
  • CORS is currently permissive - restrict in production

πŸ“Š Project Statistics

  • Frontend: Angular 19, TypeScript
  • Backend: Spring Boot 3.1, Java 17
  • Test Coverage: 36 backend tests (100% pass rate)
  • API Endpoints: 8 RESTful endpoints
  • Components: 6 Angular components

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License.

πŸ‘₯ Team

  • Frontend: Angular 19 with standalone components
  • Backend: Spring Boot 3.1 with comprehensive testing

πŸ“§ Support

For support and queries:

πŸ™ Acknowledgments

  • Angular Team for the amazing framework
  • Spring Boot Team for the excellent backend framework
  • All open-source contributors

Built with ❀️ using Angular 19 and Spring Boot 3.1

πŸ”— Useful Links

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published