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
- C#
- ASP.NET Core Web API
- Entity Framework Core
- MS SQL Server
- SignalR
- AutoMapper
- JWT Authentication
- xUnit
- Real-time player location updates using SignalR
- Live battle state synchronization (started / paused / finished)
- Instant team and room updates for all connected clients
- Create and manage rooms for matches
- Control battle flow and state transitions
- Assign players to teams and rooms
- Manage team officers and room administrators
- Send and receive orders between players
- Mark enemy positions on the battlefield map
- Synchronize tactical events in real time across clients
- 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
- Track in-game statistics such as:
- Kills
- Deaths
- JWT-based authentication
- Role-based access control (players, officers, admins)
- Permission checks based on room and team ownership
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.
- Microsoft SQL Server is used as the primary database
- Entity Framework Core manages:
- Database schema
- Migrations
- Data querying and persistence
SignalR is used to provide low-latency updates for:
- Player movements
- Battle state changes
- Team updates
- Tactical events (orders, pings)
The project includes unit tests written with xUnit to ensure reliability of core business logic.