Skip to content

Giannis-Stivaktakis/xeri_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Xeri Multiplayer REST API

A REST-style backend API implementation of the card game Xeri, built using PHP and MySQL.

This project simulates a multiplayer environment using HTTP requests via curl and manages full game state, authentication, scoring logic, and database persistence.

It was developed as a backend engineering project to demonstrate clean architecture, state management, and REST API design principles.


Features

  • Player creation
  • Player join
  • Token-based authentication
  • Game creation & joining
  • Turn-based move validation
  • Game state tracking
  • Score calculation engine
  • MySQL database persistence
  • Structured JSON API responses
  • Modular folder architecture

Architecture Overview

The project follows a modular backend structure with separation of concerns:

  • auth/ → Authentication endpoints
  • players/ → Player management
  • games/ → Game lifecycle & actions
  • logic/ → Score calculation engine
  • helpers/ → Utility & response helpers
  • config/ → Environment configuration
  • database.php → PDO database connection
  • xeri.sql → Database schema

Key Design Principles

  • Separation of business logic from routing
  • Stateless HTTP communication
  • Token-based session validation
  • Persistent multiplayer state via database
  • Clean response formatting (JSON)

Database

  • Player records
  • Authentication tokens
  • Active games
  • Game state
  • Move tracking
  • Score tracking

Clone the Repository

git clone https://github.com/YOUR_USERNAME/xeri_api.git

About

Multiplayer REST-style backend API for the Greek card game Xeri

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages