1
0
mirror of git://f0xx.org/ac/ac-ms-template synced 2026-07-29 06:19:39 +03:00
This commit is contained in:
Anton Afanasyeu
2026-06-23 12:29:30 +02:00
commit 1ca30210bd
31 changed files with 1446 additions and 0 deletions

46
skeleton/README.md Normal file
View File

@@ -0,0 +1,46 @@
# URL shortener (`s.f0xx.org`)
Standalone opt-in service — deploy and run **without** the android_cast monorepo.
| Item | Value |
|------|--------|
| **Git remote** | `git://f0xx.org/androidcast_project/url-shortener` |
| **Branch** | `next` |
| **Public URL** | `https://s.f0xx.org` |
| **Deploy** | [DEPLOY.md](DEPLOY.md) |
| **OpenAPI** | [openapi.yaml](openapi.yaml) |
| **Contributing** | [CONTRIBUTING.md](CONTRIBUTING.md) |
Normative SPEC/DR are in the android_cast monorepo (`docs/specs/20100611_3_url_shortener.md`).
## Quick start (BE)
```bash
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
```
## Tests
```bash
./scripts/run-php-tests.sh
```
## Layout
```text
public/index.php # front controller
src/ # ShortenService, redirect, QR, repos
config/config.example.php
sql/schema.mariadb.sql
scripts/seed_bearer.php
scripts/purge_url_shortener.php
scripts/demo_curl.sh
scripts/smoke_shorten.sh
```