Home

Satoshi Showdown Server

Notice

Refer to [JSDocs API Documentation] for detailed API documentation.

Overview

Satoshi Showdown is a sophisticated web-based platform dedicated to organizing and running competitive events, leveraging Bitcoin transactions. It combines efficient event management with secure transaction handling, targeting gaming enthusiasts and event organizers interested in cryptocurrency-based solutions.

Table of Contents

  1. Introduction
  2. Features
  3. Project Structure
  4. Getting Started
  5. Usage
  6. API Documentation
  7. Development
  8. Contributing
  9. License
  10. Contact

Introduction

Satoshi Showdown is designed to facilitate the organization of gaming events with a unique twist - integration of Bitcoin transactions for entry fees and prizes. This innovative approach not only enhances the gaming experience but also introduces a new dimension to event management and cryptocurrency utilization.

Features

  • Bitcoin Transactions: Secure handling of Bitcoin transactions for event entry fees and prize distributions.
  • Event Management: Comprehensive tools for organizing and managing various types of competitive events.
  • User Interaction: Engaging user interface for participants to manage their profiles, events, and transactions.

Project Structure

Server Application

Located in the server directory, this application handles critical functionalities:

  • Controllers: Manages the application logic, responding to user requests.
  • Models: Represents data structures for user, event, and transaction information.
  • Services: Contains business logic and interacts with models.
  • Middlewares: Provides common functionalities like error handling and logging.
  • Utilities: Offers reusable code segments for various operations.

Configuration and Security

  • Configs: Stores configuration files and environment variables.
  • Certs: Contains security certificates for HTTPS connections.

Getting Started

Prerequisites

  • Node.js (v14 or later)
  • MongoDB

Installation

  1. Clone the repository: git clone git@github.com:sidebetxyz/satoshi-showdown.git
  2. Navigate to the project directory: cd satoshi-showdown-server
  3. Install dependencies: npm install
  4. Set up environment variables in .env file
  5. Start the server: npm start

Usage

  • Run the server: npm start
  • Access the API at http://localhost:[port]/api

API Documentation

Refer to [JSDocs API Documentation] for detailed API documentation.

Development

Coding Standards

We use ESLint and Prettier for maintaining coding standards. Please adhere to the configurations provided in the project.

Running Tests

To run tests, execute: npm test

Contributing

Contributions are welcome! Please read our Contributing Guidelines for more information on how to submit pull requests, report issues, and contribute to the codebase.

License

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

Contact

For any inquiries or contributions, please contact [project-maintainer-email] or join our community on [Discord/Slack].

server.js

Server configuration for Satoshi Showdown. This main server module is responsible for the initial setup and lifecycle management of the application. It involves setting up the HTTPS server, establishing database connections, implementing graceful shutdown procedures, and configuring the environment. The module ensures that the application is properly initialized, connected, and securely accessible.

Source:

Requires

  • module:dotenv:
  • module:utils/databaseUtil:
  • module:utils/httpsUtil:
  • module:utils/signalUtil:
  • module:utils/serverUtil:
  • module:utils/logUtil: