Skip to content

ErNeRooo/AirsoftBattlefieldManagementSystemAPI

Repository files navigation

Airsoft Battlefield Management System API

About

Airsoft Battlefield Management System API is a backend REST API designed for real-time communication and battlefield management during airsoft matches.

The system enables live coordination between players and teams, providing features such as real-time location sharing, battle state synchronization, tactical communication, and player statistics tracking.

This API serves as the backend for the Airsoft Map Mobile application.

Mobile app repository:
👉 AirsoftBmsApp


Tech Stack

  • C#
  • ASP.NET Core Web API
  • Entity Framework Core
  • MS SQL Server
  • SignalR
  • AutoMapper
  • JWT Authentication
  • xUnit

Features

Real-Time Communication

  • Real-time player location updates using SignalR
  • Live battle state synchronization (started / paused / finished)
  • Instant team and room updates for all connected clients

Battle & Room Management

  • Create and manage rooms for matches
  • Control battle flow and state transitions
  • Assign players to teams and rooms
  • Manage team officers and room administrators

Tactical System

  • Send and receive orders between players
  • Mark enemy positions on the battlefield map
  • Synchronize tactical events in real time across clients

Player Management

  • Player creation and profile management
  • Join/leave rooms and teams
  • Kick players from rooms or teams (admin/officer actions)
  • Handle role-based permissions within matches

Player Statistics

  • Track in-game statistics such as:
    • Kills
    • Deaths

Authentication & Authorization

  • JWT-based authentication
  • Role-based access control (players, officers, admins)
  • Permission checks based on room and team ownership

Architecture

The project is built using ASP.NET Core and follows a layered service-based architecture:

  • REST API controllers handle HTTP requests
  • Business logic is implemented in service classes
  • Entity Framework Core is used directly for data access
  • Helper services are used for:
    • Authorization rules
    • Claims extraction
    • DbContext-related operations
  • SignalR hubs handle real-time communication between clients

This design focuses on clear separation of concerns while keeping the architecture lightweight and practical.


Database

  • Microsoft SQL Server is used as the primary database
  • Entity Framework Core manages:
    • Database schema
    • Migrations
    • Data querying and persistence

Real-Time System

SignalR is used to provide low-latency updates for:

  • Player movements
  • Battle state changes
  • Team updates
  • Tactical events (orders, pings)

Testing

The project includes unit tests written with xUnit to ensure reliability of core business logic.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors