- Docs
- Architecture
- Repository structure
Repository structure¶
1. Topology (parent + submodules)¶
TyteRide is organized as a parent orchestrator repo (tyteride) plus one repo per surface. The parent holds cross-surface documentation, deploy configuration, and gitlinks. It is never deployed by itself.
flowchart TD
Parent["tyteride (parent orchestrator)\nDocs, deploy, gitlinks (no deploy target)"]
Api["api/\ntyteride-api (Laravel 11, DDD)\nChecked out on host"]
Front["web/front/\ntyteride-front (Astro + React islands)\nChecked out on host"]
Dashboard["web/dashboard/\ntyteride-dashboard (React + TS + Vite)\nChecked out on host"]
Passenger["apps/passenger/\ntyteride-passenger (Expo)\nPOINTER ONLY (not fetched on host)"]
Driver["apps/driver/\ntyteride-driver (Expo)\nPOINTER ONLY (not fetched on host)"]
Docs["docs/\nCross-surface docs (authoritative)"]
Scripts["scripts/\nbootstrap.sh (selective submodule init)"]
Deploy["deploy/\nHost deployment config (reference)"]
Parent --> Api
Parent --> Front
Parent --> Dashboard
Parent --> Passenger
Parent --> Driver
Parent --> Docs
Parent --> Scripts
Parent --> Deploy
Key points:
- One repository per surface. Each surface versions independently with its own
vX.Y.Ztag. The parent carries no version tag and records gitlinks only. - Checked-out surfaces on this host:
api/,web/front/,web/dashboard/. - Pointer-only apps:
apps/passenger/andapps/driver/remain gitlinks and are not populated on this server.
2. Pointer-only policy (mobile apps)¶
apps/passengerandapps/driverare gitlinks in the parent repo. On this host they are never initialized or fetched.scripts/bootstrap.shinitializes onlyapi,web/front/, andweb/dashboard/.- The bootstrap flow also sets
submodule.<path>.update = nonefor both app submodules so a baregit submodule updateskips them. - Never run
git submodule update --init --recursiveorgit clone --recurse-submoduleson this host. - Mobile app development happens on the owner’s machine. The parent only sees gitlink bumps when the owner commits them.
To bump a pointer from the owner’s machine: commit and tag in the app repo, then in the parent run git add apps/passenger && git commit -m "chore: bump passenger to vX.Y.Z" (and similarly for apps/driver).
3. Versioning and tags¶
- Each surface uses
vMAJOR.MINOR.PATCHtags pushed in that surface’s repository. - Tags for
api/,web/front/, andweb/dashboard/correspond to deployed states on this host. - App tags live in their own repositories; the parent records the referenced commit via gitlinks.
- Never ship a surface from an untagged commit.
4. Branches and commits (workflow rules)¶
- Branches:
feat/<slice>,fix/<slice>,docs/<topic>,chore/<topic>. - Commits: imperative and scoped (for example,
feat(enrollment): approve pending member with seat-limit guard). - Prefer one slice per PR and state the failing test that motivated it.
- Do not commit secrets,
.envfiles, APKs, or build output.
5. Remote URLs¶
.gitmodulesuses HTTPS URLs plus theghcredential helper (gh auth setup-git) to avoid SSH alias setup.- If a multi-account or deploy-key setup is required, switch URLs to SSH aliases (for example,
git@github.com-tyteride:owner/repo.git) and document the alias in~/.ssh/config. Do not mix protocols across submodules. - The older Trippp SSH alias scheme (for example,
github.com-parent/github.com-submodule1..3) is not carried over.
6. Host deployment layout (reference)¶
Current host uses CyberPanel + OpenLiteSpeed (lshttpd), not nginx/php-fpm. Vhost configs live at /usr/local/lsws/conf/vhosts/{domain}/vhost.conf.
| Surface / service | Host location / endpoint | Notes |
|---|---|---|
| Front Views | /home/tyteride.drolez-apps.cloud/public_html |
https://tyteride.drolez-apps.cloud/ |
| Fleet Dashboard | /home/tyteride.drolez-apps.cloud/public_html/dashboard/ |
Static SPA under Front vhost |
| API | /home/api.tyteride.drolez-apps.cloud/public_html/public |
PHP 8.3 via lsphp/lsapi, site owner apity8249; Filament at /admin |
| Docs | /home/docs.tyteride.drolez-apps.cloud/public_html |
https://docs.tyteride.drolez-apps.cloud/, static MkDocs, owner docst5375 |
| Reverb | tyteride-reverb.service |
/usr/bin/php artisan reverb:start --host=127.0.0.1 --port=8080; OLS proxies /app/ and /apps/ to 127.0.0.1:8080; public WSS wss://api.tyteride.drolez-apps.cloud:443/app/ |
| DB / cache | MariaDB 10.6.22, Redis 127.0.0.1:6379 |
DB tyteride; API cache/queue use Redis |
| SSL | /etc/letsencrypt/live/{tyteride,api.tyteride,docs.tyteride}.drolez-apps.cloud/ |
Terminated by OpenLiteSpeed vhssl |
No TyteRide queue worker or scheduler systemd unit/cron runs on this host; only Reverb. For API deploy steps, see api/docs/operations/deployment.md; for env/secrets, see Environments and secrets.
7. Secrets¶
- Secrets live in host environment variables or uncommitted
.envfiles. - Use
.env.examplewith placeholder values only. - Rotate any credential that appeared in older Trippp docs before reuse; do not copy old
.envfiles.
8. Archive policy¶
- Old Trippp repositories are tagged
archive-finaland archived read-only on GitHub. - History remains browsable and is not imported into TyteRide.
- The preserved build specification is kept at
docs/product/b2b-rework-plan.md.
9. Git conventions (from method)¶
From docs/method.md (section “Git conventions”):
- Branches:
feat/<slice>,fix/<slice>,docs/<topic>,chore/<topic>. - Commits: imperative, scoped (for example,
feat(enrollment): approve pending member with seat-limit guard). - Prefer one slice per PR where possible; a PR should state the failing test that motivated it.
- Each surface has independent semantic version tags. The parent repo carries no version tag and records submodule gitlinks.
- Never commit secrets or
.envfiles.