Add member profile questions, admin tooling, legal pages, and fast tests
- Add configurable profile questions with conditional visibility, admin-only fields, user answers, and seeded onboarding/volunteer questions
- Add admin UI for managing profile questions and member profile answers
- Add volunteer level/profile data support across backend schemas, models, API, and migration
- Update dashboard/profile UI, super admin menu, membership service types, and related styling
- Add privacy policy, terms of service, cookie notice, and footer links
- Add frontend Vitest coverage for profile question logic
- Add backend pytest coverage for profile answer normalization and validation
- Update restart.sh to build, run frontend/backend unit tests, and restart only after tests pass
- Refresh README, quickstart, project structure, instructions, and Square docs to match current app features
- Protect feature flag reload behind super-admin access
- Restrict admin-triggered password resets so admins can only reset member accounts
- Replace email template HTML preview rendering with escaped text preview
- Update docs for feature flag reload access, password reset scope, and email template preview safety
-- test user questions are also made by AI and not very useful. but i didn't know what to put there so its good enough for a test
This commit is contained in:
+15
-13
@@ -36,7 +36,7 @@
|
||||
- [x] Created `SQUARE_PAYMENT_SETUP.md` - Comprehensive setup guide
|
||||
- [x] Created `SQUARE_IMPLEMENTATION.md` - Implementation details
|
||||
- [x] Created `SQUARE_QUICKSTART.md` - Quick start guide
|
||||
- [x] Created `deploy-square.sh` - Deployment helper script
|
||||
- [x] Updated `restart.sh` - Build, fast tests, and restart helper
|
||||
|
||||
### Code Quality
|
||||
- [x] No Python syntax errors
|
||||
@@ -64,13 +64,15 @@ Before deploying, complete these steps:
|
||||
- [ ] Set SQUARE_ENVIRONMENT=sandbox
|
||||
|
||||
### 3. Deployment
|
||||
- [ ] Run `./deploy-square.sh` OR
|
||||
- [ ] Run `docker-compose down`
|
||||
- [ ] Run `docker-compose up -d --build`
|
||||
- [ ] Verify containers are running: `docker-compose ps`
|
||||
- [ ] Run `./restart.sh` OR
|
||||
- [ ] Run `docker compose build`
|
||||
- [ ] Run `docker compose run --rm frontend npm test`
|
||||
- [ ] Run `docker compose run --rm backend pytest -q`
|
||||
- [ ] Run `docker compose up -d`
|
||||
- [ ] Verify containers are running: `docker compose ps`
|
||||
|
||||
### 4. Testing
|
||||
- [ ] Access frontend at http://localhost:3000
|
||||
- [ ] Access frontend at http://localhost:8050 or HTTPS at https://localhost:8443
|
||||
- [ ] Login/register a user
|
||||
- [ ] Navigate to membership setup
|
||||
- [ ] Select a membership tier
|
||||
@@ -104,7 +106,7 @@ After deployment, run these commands to verify:
|
||||
|
||||
```bash
|
||||
# Check backend is running
|
||||
curl http://localhost:8000/api/v1/payments/config/square
|
||||
curl http://localhost:8050/api/v1/payments/config/square
|
||||
|
||||
# Expected output (with your actual IDs):
|
||||
# {
|
||||
@@ -114,10 +116,10 @@ curl http://localhost:8000/api/v1/payments/config/square
|
||||
# }
|
||||
|
||||
# Check frontend is running
|
||||
curl http://localhost:3000
|
||||
curl http://localhost:8050
|
||||
|
||||
# Check logs
|
||||
docker-compose logs backend | grep -i square
|
||||
docker compose logs backend | grep -i square
|
||||
```
|
||||
|
||||
## 📊 Testing Matrix
|
||||
@@ -135,13 +137,13 @@ docker-compose logs backend | grep -i square
|
||||
|
||||
```bash
|
||||
# Check Square SDK installed
|
||||
docker-compose exec backend pip list | grep square
|
||||
docker compose exec backend pip list | grep square
|
||||
|
||||
# Check configuration loaded
|
||||
docker-compose exec backend python -c "from app.core.config import settings; print(settings.SQUARE_ENVIRONMENT)"
|
||||
docker compose exec backend python -c "from app.core.config import settings; print(settings.SQUARE_ENVIRONMENT)"
|
||||
|
||||
# Check database has payments
|
||||
docker-compose exec mysql mysql -u "${DATABASE_USER}" -p -e "SELECT * FROM ${DATABASE_NAME}.payments LIMIT 5;"
|
||||
docker exec -it membership_mysql mysql -u "${DATABASE_USER}" -p -e "SELECT * FROM ${DATABASE_NAME}.payments LIMIT 5;"
|
||||
|
||||
# Check frontend files
|
||||
ls -la frontend/src/components/SquarePayment.tsx
|
||||
@@ -151,7 +153,7 @@ ls -la frontend/src/components/SquarePayment.tsx
|
||||
|
||||
| Issue | Solution |
|
||||
|-------|----------|
|
||||
| "Module not found: squareup" | Rebuild backend: `docker-compose build backend` |
|
||||
| "Module not found: squareup" | Rebuild backend: `docker compose build backend` |
|
||||
| "SQUARE_APPLICATION_ID not found" | Add to `.env` and restart containers |
|
||||
| Square SDK not loading | Check browser console, verify script tag in index.html |
|
||||
| Payment fails with 401 | Check SQUARE_ACCESS_TOKEN is correct |
|
||||
|
||||
Reference in New Issue
Block a user