TicketHive

TicketHive - Event Ticket Management API

.NET PostgreSQL Architecture VNPay API Documentation License

A robust platform for event ticket management with secure authentication, user management, and seamless event operations.

📑 Table of Contents

Features

API Documentation

Swagger UI: http://localhost:5043/swagger/index.html

1. Access Swagger UI

Link: http://localhost:5043/swagger/index.html

2. Log in to obtain a token

Login interface. Enter username and password → receive JWT token.

Login

3. Enter the token in Swagger

Click “Authorize” → enter Bearer <token> → confirm.

Bearer Token Input

4. Use the APIs

You can now call protected endpoints.

Technology Stack

📁 Project Structure

TicketHive/
├── src/
│   ├── TicketHive.Api/              # Web API layer
│   ├── TicketHive.Application/      # Business logic
│   ├── TicketHive.Domain/           # Domain entities
│   └── TicketHive.Infrastructure/   # Data access
├── tests/
│   └── TicketHive.Tests/            # Unit & integration tests
├── docs/                            # API documentation
└── docker-compose.yml               # Docker configuration

Getting Started

Prerequisites

Installation

  1. Clone the repository
    git clone https://github.com/hnagnurtme/TicketHive.git
    cd TicketHive
    
  2. Restore dependencies
    dotnet restore
    
  3. Configure database

    Update src/TicketHive.Api/appsettings.json:

    {
      "ConnectionStrings": {
        "DefaultConnection": "your-connection-string"
      }
    }
    
  4. Apply migrations
    dotnet ef database update --project src/TicketHive.Infrastructure
    
  5. Run the application
    dotnet run --project src/TicketHive.Api
    

    The API will be available at:

    • HTTPS: https://localhost:7043
    • HTTP: http://localhost:5043

Using Docker

docker-compose up -d

API Usage

All protected endpoints require a Bearer token:

Authorization: Bearer <your-jwt-token>

Example Request:

curl -X GET "https://localhost:7043/api/events" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."

Testing

Run all tests:

dotnet test

Generate coverage report:

./Test.sh

Contributing

Contributions are welcome! Please follow these steps:

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

See CONTRIBUTING.md for detailed guidelines.

License

This project is licensed under the MIT License - see the LICENSE file for details.


**[Documentation](https://hnagnurtme.github.io/TicketHive/)** • **[Report Bug](https://github.com/hnagnurtme/TicketHive/issues)** • **[Request Feature](https://github.com/hnagnurtme/TicketHive/issues)** Made with ❤️ by [hnagnurtme](https://github.com/hnagnurtme)