feat: Initial commit for Saqel Platform architecture, backend, Docker, and documentation

This commit is contained in:
Hamza-Ayed
2026-08-26 15:45:55 +03:00
commit d53b64500a
177 changed files with 19909 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
# ==============================================================================
# SAQEL PLATFORM - DOCKER ENVIRONMENT CONFIGURATION (PRODUCTION TEMPLATE)
# ==============================================================================
# App Configuration
APP_NAME=Saqel
APP_ENV=production
APP_DEBUG=false
APP_URL=https://api.saqel.com
APP_PORT=8080
# Database Configuration (MySQL 8)
DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=saqel
DB_USERNAME=saqel_user
DB_PASSWORD=YOUR_STRONG_DB_PASSWORD
MYSQL_ROOT_PASSWORD=YOUR_STRONG_ROOT_PASSWORD
# Redis Configuration (Cache, Sessions, Queues, Device Fingerprint Locking)
REDIS_CLIENT=phpredis
REDIS_HOST=redis
REDIS_PASSWORD=YOUR_REDIS_PASSWORD
REDIS_PORT=6379
# JWT & Security Configuration
JWT_SECRET=YOUR_RANDOM_256BIT_JWT_SECRET
JWT_TTL=43200
ENCRYPTION_KEY=YOUR_BASE64_AES_256_GCM_KEY
BLIND_INDEX_KEY=YOUR_HMAC_SHA256_SECRET_KEY
# OTP Service (منصة تنبيه - Tanbih WhatsApp / SMS API)
TANBIH_API_URL=https://api.tanbih.io/v1/send-otp
TANBIH_API_KEY=YOUR_TANBIH_API_KEY
TANBIH_SENDER_ID=Saqel
# Bunny Stream Video CDN & DRM
BUNNY_API_KEY=YOUR_BUNNY_STREAM_API_KEY
BUNNY_LIBRARY_ID=YOUR_BUNNY_LIBRARY_ID
BUNNY_TOKEN_AUTH_KEY=YOUR_BUNNY_SECURITY_TOKEN_KEY
BUNNY_CDN_HOSTNAME=video.saqel.com
# AI & Speech Services
GEMINI_API_KEY=YOUR_GOOGLE_GEMINI_API_KEY
GEMINI_MODEL=gemini-2.5-flash
GROQ_API_KEY=YOUR_GROQ_WHISPER_API_KEY
# Push Notifications (Firebase Cloud Messaging)
FIREBASE_CREDENTIALS_PATH=/var/www/storage/app/firebase-credentials.json
+26
View File
@@ -0,0 +1,26 @@
server {
listen 80;
server_name _;
root /var/www/public;
index index.php;
client_max_body_size 20m;
add_header X-Content-Type-Options nosniff always;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass app:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known) {
deny all;
}
}
+23
View File
@@ -0,0 +1,23 @@
FROM php:8.3-fpm-alpine
RUN apk add --no-cache nginx icu-dev libzip-dev zip oniguruma-dev libpng-dev freetype-dev libjpeg-turbo-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install pdo_mysql bcmath intl zip gd opcache pcntl
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
WORKDIR /var/www
COPY backend/composer.json backend/composer.lock ./
RUN composer install --no-dev --no-scripts --no-autoloader --prefer-dist --no-interaction
COPY backend .
RUN composer dump-autoload --optimize \
&& php artisan config:cache || true \
&& php artisan route:cache || true
RUN chown -R www-data:www-data storage bootstrap/cache
EXPOSE 9000
CMD ["php-fpm"]