Simple Server

자체 호스팅 PHP

horizOn Cloud API를 그대로 재현한 가벼운 PHP 백엔드를 직접 호스팅하세요.

설정 단계

  1. 1
    리포지토리 클론
    Bash
    Bash
    1git clone https://github.com/ProjectMakersDE/horizOn-simpleServer.git
    2cd horizOn-simpleServer
    3cp .env.example .env
  2. 2
    환경 설정
    Bash
    Bash
    1API_KEY=change-me-to-a-secure-key
    2DB_DRIVER=sqlite
    3DB_PATH=./data/horizon.db
    4RATE_LIMIT_ENABLED=true
    5RATE_LIMIT_PER_SECOND=10
  3. 3
    서버 시작
    Bash
    Bash
    1php -S localhost:8080 index.php
  4. 4
    설치 확인
    Bash
    Bash
    1curl http://localhost:8080/health

API 기능

사용자 생성
curl
Bash
1curl -X POST http://localhost:8080/api/v1/app/user-management/signup \
2 -H "Content-Type: application/json" \
3 -H "X-API-Key: YOUR_API_KEY" \
4 -d '{"displayName": "TestPlayer"}'
로그인
curl
Bash
1curl -X POST http://localhost:8080/api/v1/app/user-management/signin \
2 -H "Content-Type: application/json" \
3 -H "X-API-Key: YOUR_API_KEY" \
4 -d '{"anonymousToken": "TOKEN_FROM_SIGNUP"}'
점수 제출
curl
Bash
1curl -X POST http://localhost:8080/api/v1/app/leaderboard/submit \
2 -H "Content-Type: application/json" \
3 -H "X-API-Key: YOUR_API_KEY" \
4 -d '{"userId": "USER_UUID", "score": 12500}'
Leaderboard 조회
curl
Bash
1curl "http://localhost:8080/api/v1/app/leaderboard/top?limit=10" \
2 -H "X-API-Key: YOUR_API_KEY"
게임 데이터 저장
curl
Bash
1curl -X POST http://localhost:8080/api/v1/app/cloud-save/save \
2 -H "Content-Type: application/json" \
3 -H "X-API-Key: YOUR_API_KEY" \
4 -d '{"userId": "USER_UUID", "data": "{\"level\":5,\"coins\":1000}"}'
게임 데이터 불러오기
curl
Bash
1curl -X POST http://localhost:8080/api/v1/app/cloud-save/load \
2 -H "Content-Type: application/json" \
3 -H "X-API-Key: YOUR_API_KEY" \
4 -d '{"userId": "USER_UUID"}'
원격 구성
curl
Bash
1# Get all configs
2curl "http://localhost:8080/api/v1/app/remote-config/all" \
3 -H "X-API-Key: YOUR_API_KEY"
4​
5# Get single config
6curl "http://localhost:8080/api/v1/app/remote-config/game.max_level" \
7 -H "X-API-Key: YOUR_API_KEY"
현지화
curl
Bash
1# Get all localizations for a language
2curl "http://localhost:8080/api/v1/app/localization/all?lang=de" \
3 -H "X-API-Key: YOUR_API_KEY"
4​
5# Get a single localized string by key
6curl "http://localhost:8080/api/v1/app/localization/menu.play?lang=de" \
7 -H "X-API-Key: YOUR_API_KEY"
뉴스 시스템
curl
Bash
1curl "http://localhost:8080/api/v1/app/news?limit=10&languageCode=en" \
2 -H "X-API-Key: YOUR_API_KEY"
기프트 코드
curl
Bash
1# Validate
2curl -X POST http://localhost:8080/api/v1/app/gift-codes/validate \
3 -H "Content-Type: application/json" \
4 -H "X-API-Key: YOUR_API_KEY" \
5 -d '{"code": "PROMO2024", "userId": "USER_UUID"}'
6​
7# Redeem
8curl -X POST http://localhost:8080/api/v1/app/gift-codes/redeem \
9 -H "Content-Type: application/json" \
10 -H "X-API-Key: YOUR_API_KEY" \
11 -d '{"code": "PROMO2024", "userId": "USER_UUID"}'
사용자 피드백
curl
Bash
1curl -X POST http://localhost:8080/api/v1/app/user-feedback/submit \
2 -H "Content-Type: application/json" \
3 -H "X-API-Key: YOUR_API_KEY" \
4 -d '{"userId": "USER_UUID", "title": "Bug Report", "message": "Description here"}'
사용자 로그
curl
Bash
1curl -X POST http://localhost:8080/api/v1/app/user-logs/create \
2 -H "Content-Type: application/json" \
3 -H "X-API-Key: YOUR_API_KEY" \
4 -d '{"userId": "USER_UUID", "message": "Player completed tutorial", "type": "INFO"}'
크래시 리포트
curl
Bash
1# Register session
2curl -X POST http://localhost:8080/api/v1/app/crash-reports/session \
3 -H "Content-Type: application/json" \
4 -H "X-API-Key: YOUR_API_KEY" \
5 -d '{"sessionId": "session-123", "appVersion": "1.0.0", "platform": "Windows"}'
6​
7# Submit crash report
8curl -X POST http://localhost:8080/api/v1/app/crash-reports/create \
9 -H "Content-Type: application/json" \
10 -H "X-API-Key: YOUR_API_KEY" \
11 -d '{"type": "CRASH", "message": "NullReferenceException", "fingerprint": "nre-main-loop", "appVersion": "1.0.0", "sdkVersion": "1.0.0", "platform": "Windows", "os": "Windows 11", "deviceModel": "PC", "sessionId": "session-123"}'

배포

Apache 배포

Bash
Bash
1# Enable mod_rewrite
2sudo a2enmod rewrite
3sudo systemctl restart apache2
4​
5# Virtual host config
6<Directory /var/www/horizOn>
7 AllowOverride All
8</Directory>

Nginx 배포

Bash
Bash
1server {
2 listen 80;
3 server_name your-domain.com;
4 root /var/www/horizOn;
5 index index.php;
6​
7 include snippets/horizon.conf;
8}

MySQL 설정

Bash
Bash
1CREATE DATABASE horizon CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
2​
3# Update .env:
4# DB_DRIVER=mysql
5# DB_HOST=localhost
6# DB_PORT=3306
7# DB_NAME=horizon
8# DB_USER=your_user
9# DB_PASS=your_password

소스 코드

이 대시보드는 다음에 의해 애정을 담아 만들어졌습니다 Projectmakers

© 2026 projectmakers.de

unknown-v1.104.0 / unknown-v--