Skip to content

Latest commit

Β 

History

History
178 lines (129 loc) Β· 3.71 KB

File metadata and controls

178 lines (129 loc) Β· 3.71 KB

FIFA Player Statistics SOAP API

A modern SOAP-based web service for managing football player statistics and awards. Built with Node.js and SQLite.

✨ Features

  • πŸ” Secure Authentication

    • JWT token-based authentication
    • Role-based access control
    • Token expiration and rotation
  • πŸ‘₯ Player Management

    • Complete CRUD operations
    • Bulk player creation
    • Detailed player profiles
  • πŸ“Š Statistics & Awards

    • Season-wise statistics tracking
    • Player achievements and awards
    • Historical data management
  • πŸ›‘οΈ Security & Performance

    • HTTPS support
    • Rate limiting
    • Input validation
    • Error handling
  • πŸ“š Documentation

    • Complete WSDL documentation
    • API examples
    • Comprehensive error guides

πŸš€ Quick Start

Prerequisites

  • Node.js (v14+)
  • npm (v6+)
  • SQLite3

Setup

  1. Clone & Install
# Clone repository
git clone https://github.com/yourusername/fifa-player-stats-soap.git
cd fifa-player-stats-soap

# Install dependencies
npm install
  1. Configure
# Copy environment file
cp .env.example .env

# Edit .env with your settings
# Default values:
# HTTP_PORT=3000
# HTTPS_PORT=3001
# JWT_SECRET=your-secret-key-123
  1. SSL Setup (Optional)
# Generate certificates
mkdir certs
cd certs
openssl req -nodes -new -x509 -keyout server.key -out server.cert
  1. Run
# Development
npm run dev

# Production
npm start

πŸ”‘ Authentication

Default admin credentials:

  • Username: admin
  • Password: password123

Generate a token:

curl -X POST \
  http://localhost:3000/soap/player \
  -H 'Content-Type: text/xml' \
  -d '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://example.com/player-service">
   <soap:Body>
      <tns:generateTokenRequest>
         <username>admin</username>
         <password>password123</password>
      </tns:generateTokenRequest>
   </soap:Body>
</soap:Envelope>'

πŸ“– Documentation

πŸ§ͺ testing api server

πŸ› οΈ Development

Project Structure

fifa-player-stats-soap/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ services/      # SOAP service definitions
β”‚   β”œβ”€β”€ middleware/    # Authentication & validation
β”‚   β”œβ”€β”€ routes/        # API routes
β”‚   └── db/           # Database setup & models
β”œβ”€β”€ certs/            # SSL certificates
β”œβ”€β”€ tests/            # Test suites
└── package.json

Available Scripts

npm run dev      # Start development server
npm start        # Start production server
npm test         # Run tests
npm run lint     # Run linter

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

πŸ“ License

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

πŸ™ Acknowledgments

  • Node.js SOAP library
  • SQLite3
  • JWT implementation
  • Express.js framework

Available Operations

  1. generateToken - Generate authentication token
  2. createPlayer - Create a new player
  3. getPlayer - Get player details by ID
  4. listPlayers - List all players
  5. updatePlayer - Update player details
  6. deletePlayer - Delete a player
  7. updatePlayerStats - Update player statistics
  8. bulkCreatePlayers - Create multiple players at once
  9. deleteAllPlayerStats - Delete all data from the system (players, statistics, and awards)

⚠️ Warning: The deleteAllPlayerStats operation deletes ALL data from the system and cannot be undone. Use with caution.