forked from jamesp/sasa-membership
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:
+43
-13
@@ -4,25 +4,34 @@
|
||||
|
||||
This project aims to develop a comprehensive membership management system for the Swansea Airport Stakeholders' Alliance. The system will handle member registration, payment processing, membership tracking, and administrative functions for a medium-sized alliance.
|
||||
|
||||
## Current Implementation Status
|
||||
|
||||
The app now includes a FastAPI backend, React/Vite frontend, Docker Compose development gateway, Alembic migrations, Square payment integration, SMTP2GO email integration, event/RSVP endpoints, configurable profile questions, privacy/terms pages, feature flags, and a fast test gate in `restart.sh`.
|
||||
|
||||
## Core Features
|
||||
|
||||
### Public Member Features
|
||||
- **Self-Service Registration**: Members can sign up online and select their membership tier
|
||||
- **Payment Processing**: Integration with Square payment system for secure online payments, and a dummy payment system for initial testing
|
||||
- **Membership Portal**: Secure login to view membership status, payment history, and upcoming meetings
|
||||
- **Renewal Reminders**: Automated email notifications for membership renewal deadlines
|
||||
- **Profile Questions**: Members can answer configurable profile questions, including conditional and volunteering-related questions
|
||||
- **Event Management**: View upcoming events and RSVP to participate
|
||||
- **Volunteering**: View assigned volunteer roles, schedule availability for roles, and access certificates/training records
|
||||
- **Account Management**: Members can update profile details, change passwords, request password resets, and review privacy/terms pages
|
||||
- **Renewal Reminders**: Planned automated email notifications for membership renewal deadlines
|
||||
- **Volunteering**: Volunteer-related profile fields are implemented; richer role, schedule, and certificate screens are planned
|
||||
|
||||
### Administrative Features
|
||||
- **Member Database Management**: Query and modify member records
|
||||
- **Manual Payment Entry**: Record cash payments to activate memberships
|
||||
- **Membership Tier Management**: Configure different membership levels and associated fees
|
||||
- **Meeting Management**: Post notices and updates about upcoming alliance meetings
|
||||
- **Reporting**: Generate reports on membership statistics and payment status
|
||||
- **Files**: A repositry for files which members can access based on their tier - such as meeting minutes and manuals. Admins can upload files to this area.
|
||||
- **Profile Question Management**: Create, edit, deactivate, order, and configure dependencies for member profile questions
|
||||
- **Meeting/Event Management**: Create, edit, and manage events, track RSVPs and attendance
|
||||
- **Email Management**: Edit database-backed email templates with escaped previews, send test emails, and monitor SMTP2GO bounces
|
||||
- **Feature Flags**: View backend feature flags and reload them from the super-admin interface
|
||||
- **Reporting**: Planned reports on membership statistics and payment status
|
||||
- **Files**: Planned repository for member files based on tier, such as meeting minutes and manuals
|
||||
- **Event Management**: Create, edit, and manage events, track RSVPs and attendance
|
||||
- **Volunteering**: Assign configurable volunteer roles to members (e.g., Fire, Radio, General), manage volunteer schedules, and record certificates/training. Note: A member may not necessarily be a volunteer, but all volunteers are members.
|
||||
- **Volunteering**: Models exist for configurable volunteer roles, assignments, schedules, and certificates/training. Note: A member may not necessarily be a volunteer, but all volunteers are members.
|
||||
|
||||
|
||||
## Technical Stack
|
||||
@@ -32,7 +41,8 @@ This project aims to develop a comprehensive membership management system for th
|
||||
- **Authentication**: JWT-based authentication system
|
||||
- **Payment Integration**: Square API for payment processing
|
||||
- **Email Service**: SMTP2GO API for automated reminders and notifications
|
||||
- **Frontend**: Modern web interface (to be determined - potentially React/Vue.js)
|
||||
- **Frontend**: React 18, TypeScript, Vite, and Tailwind CSS
|
||||
- **Testing**: Vitest for frontend unit tests and pytest for backend unit tests
|
||||
|
||||
## Membership Tiers
|
||||
|
||||
@@ -73,21 +83,41 @@ Each tier will have associated annual fees and benefits.
|
||||
- `memberships`: Membership records with tier and status
|
||||
- `payments`: Payment transactions
|
||||
- `tiers`: Membership tier definitions
|
||||
- `profile_questions`: Configurable profile/onboarding questions
|
||||
- `user_profile_answers`: Per-member profile answers
|
||||
- `events`: Event information and details
|
||||
- `event_rsvps`: Event registration and attendance tracking
|
||||
- `volunteer_roles`: Configurable volunteer role definitions (e.g., Fire, Radio, General)
|
||||
- `volunteer_assignments`: Member-to-role assignments
|
||||
- `volunteer_schedules`: Volunteer shift scheduling and availability
|
||||
- `certificates`: Training certificates and qualifications
|
||||
- `email_templates`: Editable SMTP2GO email templates
|
||||
- `email_bounces`: Bounce/complaint/unsubscribe tracking
|
||||
- `password_reset_tokens`: One-time reset tokens
|
||||
- `notifications`: Email notification logs
|
||||
|
||||
## Testing and Restart Workflow
|
||||
|
||||
`./restart.sh` rebuilds Docker images with cache, runs the fast frontend and backend unit tests, shuts down the current stack, and starts it again only if tests pass.
|
||||
|
||||
```bash
|
||||
./restart.sh
|
||||
```
|
||||
|
||||
Individual test commands:
|
||||
|
||||
```bash
|
||||
docker compose run --rm frontend npm test
|
||||
docker compose run --rm backend pytest -q
|
||||
```
|
||||
|
||||
## Development Phases
|
||||
|
||||
1. **Phase 1**: Core API development (authentication, user management)
|
||||
2. **Phase 2**: Payment integration and membership management
|
||||
3. **Phase 3**: Admin interface development
|
||||
4. **Phase 4**: Member portal, email system, event management, and volunteering features
|
||||
5. **Phase 5**: Testing, deployment, and documentation
|
||||
1. **Phase 1**: Core API development (authentication, user management) - implemented
|
||||
2. **Phase 2**: Payment integration and membership management - implemented
|
||||
3. **Phase 3**: Admin interface development - implemented for users, tiers, payments, emails, bounces, profile questions, and feature flags
|
||||
4. **Phase 4**: Member portal, email system, event management, and volunteering features - partially implemented; richer volunteer screens and renewal reminders remain
|
||||
5. **Phase 5**: Testing, deployment, and documentation - active; fast unit tests and documentation are in place
|
||||
|
||||
## Deployment Considerations
|
||||
|
||||
@@ -152,4 +182,4 @@ Each tier will have associated annual fees and benefits.
|
||||
- Payment processing success rate
|
||||
- User engagement with portal
|
||||
- Administrative efficiency improvements
|
||||
- System uptime and performance
|
||||
- System uptime and performance
|
||||
|
||||
Reference in New Issue
Block a user