mirror of
git://f0xx.org/android_cast
synced 2026-07-29 06:58:51 +03:00
BE sync
This commit is contained in:
@@ -8,37 +8,41 @@ Standalone opt-in service — **not** part of `examples/crash_reporter/backend/`
|
||||
| DR | [docs/DRs/20100611_3_url_shortener.md](../../docs/DRs/20100611_3_url_shortener.md) |
|
||||
| Deploy | [DEPLOY.md](DEPLOY.md) |
|
||||
|
||||
**Status:** scaffold (OpenAPI + SQL + nginx fragments + smoke scripts). PHP handlers TODO.
|
||||
**Status:** PHP API implemented (shorten, redirect, QR via `qrencode`).
|
||||
|
||||
**Git remote (PO confirmed):** `git://f0xx.org/androicast_project/url-shortener`
|
||||
**Public URL:** `https://s.f0xx.org`
|
||||
**FE TLS (PO confirmed):** `/etc/letsencrypt/live/s.f0xx.org/{fullchain.pem,privkey.pem}`
|
||||
**Git remote:** `git://f0xx.org/androicast_project/url-shortener`
|
||||
**Public URL:** `https://s.f0xx.org`
|
||||
|
||||
## Quick smoke (when deployed)
|
||||
## Quick start (BE)
|
||||
|
||||
```bash
|
||||
export BASE=https://s.f0xx.org
|
||||
export BEARER=demo-bearer-replace-me
|
||||
./scripts/demo_curl.sh
|
||||
mysql -u root -p < sql/schema.mariadb.sql
|
||||
./scripts/init-mariadb-grants.sh
|
||||
cp config/config.example.php config/config.php # password = crashes androidcast user
|
||||
php scripts/seed_bearer.php --label=prod
|
||||
apk add libqrencode-tools # QR PNG
|
||||
# sync tree → /var/www/.../apps/s/
|
||||
rc-service php-fpm81 restart
|
||||
export BEARER=… ./scripts/smoke_shorten.sh
|
||||
```
|
||||
|
||||
## Local dev (future)
|
||||
## Tests
|
||||
|
||||
```bash
|
||||
# MariaDB: apply sql/schema.mariadb.sql
|
||||
# php -S 127.0.0.1:8091 -t public
|
||||
./scripts/run-php-tests.sh
|
||||
```
|
||||
|
||||
## Layout
|
||||
|
||||
```text
|
||||
backend/url-shortener/
|
||||
openapi.yaml # API contract (source of truth with SPEC §6)
|
||||
deploy/ # FE + BE nginx fragments
|
||||
public/index.php # front controller
|
||||
src/ # ShortenService, redirect, QR, repos
|
||||
config/config.example.php
|
||||
sql/schema.mariadb.sql
|
||||
openapi.yaml
|
||||
scripts/seed_bearer.php
|
||||
scripts/purge_url_shortener.php
|
||||
scripts/demo_curl.sh
|
||||
scripts/smoke_shorten.sh
|
||||
scripts/init-mariadb-grants.sh
|
||||
config/config.example.php # DB url_shortener, user androidcast (same pwd as crashes)
|
||||
public/index.php # stub router until impl
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user