Back to CV

Software Requirements Specification

SlotsOne — Interactive Slot Machine Demo  |  v1.0  |  Last updated: 2026-02-28

This document specifies the functional and non-functional requirements for the SlotsOne project.

1. Introduction

1.1 Purpose

Define verifiable requirements for the SlotsOne application so that development, QA, and stakeholders share a single source of truth. Each requirement is traceable to at least one test case.

1.2 Scope

SlotsOne is a browser-based slot machine with a React/PixiJS frontend and an Express/TypeScript backend (Remote Game Server). It includes user authentication, game session management, spin mechanics, and a responsive UI. The system is deployed via Docker Compose with Caddy for TLS.

1.3 Intended Audience

QA engineers, developers, hiring managers reviewing this portfolio, and anyone evaluating the project's completeness and test coverage.

1.4 Glossary

RGS
Remote Game Server — the backend that processes spins and manages state
JWT
JSON Web Token — used for stateless authentication (RS256)
BDD
Behaviour-Driven Development — Given/When/Then acceptance criteria
Payline
A line across the reels that determines winning combinations
Scatter
A special symbol that triggers bonus features regardless of payline position
RTP
Return To Player — the theoretical percentage of wagered money returned over time
Idempotency
Ensuring repeated identical requests produce the same result without side effects

2. Product Overview

2.1 System Context

+------------------+ HTTPS +------------------+ | | ----------------------> | | | Browser | REST API (JSON) | Express RGS | | (React + Pixi) | <---------------------- | (TypeScript) | | | | | +------------------+ +--------+---------+ | | SQL v +------------------+ | PostgreSQL 16 | | (users, tokens) | +------------------+

2.2 User Classes

Visitor
Views the CV landing page and navigates to demo artifacts (test cases, Swagger docs, etc.)
Player
Registers/logs in and plays the slot machine demo with virtual currency
Recruiter
Reviews the CV, inspects code quality artifacts, and downloads the PDF resume

2.3 Constraints

The application uses virtual currency only (no real-money gambling). Sessions and balances are stored in-memory and reset on server restart. User accounts and refresh tokens persist in PostgreSQL.

2.4 Assumptions

Users have a modern browser (Chrome, Firefox, Safari, or Edge, latest two major versions). The server runs on a single instance behind a Caddy reverse proxy with automatic HTTPS.

ID Module Priority Requirement

6. External Interface Requirements

6.1 API Contracts

All endpoints live under /api/v1/. Request and response bodies are validated with Zod schemas. The full OpenAPI 3.0 specification is served at /api-docs.

6.2 Database

PostgreSQL 16+ stores users and refresh_tokens tables. Game sessions, balances, and spin history are kept in-memory (ephemeral). Connection is configured via the DATABASE_URL environment variable.

6.3 Browser Support

Latest two major versions of Chrome, Firefox, Safari, and Edge. WebGL is required for the PixiJS canvas renderer.

7. Traceability Matrix

Maps requirements to test cases. Click a test case ID to view it in the Test Cases page.

Requirement Title Test Cases