forked from cartsnitch/cartsnitch
feat: add dedicated UAT seed user with known credentials
Add guaranteed UAT test user (uat@cartsnitch.com / CartSnitch-UAT-2026!) seeded via Better-Auth bcrypt path. Idempotent — re-running the seed skips the user if it already exists. - Add 002_better_auth_tables Alembic migration (sessions, accounts, verifications tables + email_verified/image on users) - Add bcrypt>=4.0,<6.0 to [seed] extra (CTO feedback: was bcrypt>=0.15,<1.0 which matches zero installable versions) - Fix account_id to use str(UAT_USER_ID) to match migration convention (CTO feedback: was using UAT_EMAIL which was inconsistent) - Document credentials in common/README.md under Test Users Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
# CartSnitch Common
|
||||
|
||||
Shared models, schemas, and utilities for CartSnitch services.
|
||||
|
||||
## Test Users
|
||||
|
||||
The following users are seeded by `cartsnitch-seed` and can be used for local development and UAT.
|
||||
|
||||
| Email | Password | Display Name | Notes |
|
||||
|---|---|---|---|
|
||||
| `uat@cartsnitch.com` | `CartSnitch-UAT-2026!` | UAT Tester | Primary UAT account. Use for regression testing in the CartSnitch frontend. Created by the seed runner via Better-Auth's bcrypt path — credentials work against the live auth service. Idempotent; re-running the seed skips this user if it already exists. |
|
||||
|
||||
### Running the Seed
|
||||
|
||||
```bash
|
||||
# Install with seed dependencies
|
||||
pip install -e "cartsnitch-common[seed]"
|
||||
|
||||
# Run (requires CARTSNITCH_DATABASE_URL_SYNC)
|
||||
CARTSNITCH_DATABASE_URL_SYNC=postgresql://user:pass@localhost:5432/cartsnitch \
|
||||
cartsnitch-seed
|
||||
```
|
||||
|
||||
### Architecture
|
||||
|
||||
- **Models** live in `src/cartsnitch_common/models/`
|
||||
- **Alembic migrations** run via the `api` service (`api/alembic/`)
|
||||
- **Seed runner** runs via `cartsnitch-seed` (installed as a package entry point)
|
||||
Reference in New Issue
Block a user