# Regantis SMS development handoff — 2026-08-27

## 1. Scope completed

Phase 0 + Phase 1 implementation package prepared.

## 2. Files added

- Node/Express application foundation
- config/default.js + config/local.example.js
- MariaDB pool and migration runner
- Redis and BullMQ foundation
- health endpoints
- admin session/API authentication skeleton
- client API-key authentication skeleton
- initial SQL schema migrations
- systemd service template
- cPanel Apache vhost include template
- Redis ACL template
- deployment/preflight documentation

## 3. Files changed

None from a legacy implementation. This is a new standalone service.

## 4. Database migrations added/applied

Added:

- `001_identity_and_routing.sql`
- `002_messages.sql`

Not applied to the production server yet.

## 5. Server commands run

Local artifact validation only. No production server access was used.

## 6. Current endpoints

- `GET /`
- `GET /health/live`
- `GET /health/ready`
- `POST /admin/api/v1/auth/login`
- `GET /admin/api/v1/auth/me`
- `POST /admin/api/v1/auth/logout`
- `GET /api/v1/auth/check`

## 7. Current test results

- JavaScript syntax: PASS
- local no-dependency unit tests: PASS (2/2)
- production MariaDB/Redis integration tests: pending deployment
- dependency installation in the build sandbox: not completed because outbound npm installation timed out; install on the cPanel server using the deployment guide.

## 8. Known issues

- No production credentials are filled in.
- No provider/SIM/gateway CRUD UI yet (Phase 2).
- No WebSocket gateway server yet (Phase 3).
- No Android application yet (Phase 4).
- No SMS dispatch endpoint yet (Phase 5).

## 9. Decisions preserved

- `sms.regantis.technology` is standalone.
- No CRM integration now.
- MariaDB is authoritative; Redis is disposable execution state.
- Node is localhost-only behind Apache TLS.
- Dedicated persistent systemd service is preferred over Passenger for long-lived gateway WebSockets.
- API and gateway credentials are never stored plaintext.

## 10. Exact next task

Deploy Phase 0 + 1 using `INSTALL_PHASE_0_1.md`, prove public `/health/ready` = 200 and both admin/API authentication smoke tests. Then begin Phase 2 standalone admin UI/CRUD for the single test provider/account/SIM/gateway/route.
