4.5 KiB
4.5 KiB
Project Structure
membership/
├── .env # Environment configuration (ready to use)
├── .env.example # Template for environment variables
├── .gitignore # Git ignore rules
├── docker-compose.yml # Docker services configuration
├── INSTRUCTIONS.md # Original project requirements
├── README.md # Complete documentation
├── QUICKSTART.md # Quick start guide
│
├── backend/ # FastAPI application
│ ├── Dockerfile # Backend container configuration
│ ├── requirements.txt # Python dependencies
│ └── app/
│ ├── __init__.py
│ ├── main.py # Application entry point
│ │
│ ├── api/ # API endpoints
│ │ ├── __init__.py
│ │ ├── dependencies.py # Auth dependencies
│ │ └── v1/
│ │ ├── __init__.py
│ │ ├── auth.py # Registration, login
│ │ ├── users.py # User management
│ │ ├── tiers.py # Membership tiers
│ │ ├── memberships.py # Membership management
│ │ └── payments.py # Payment processing
│ │
│ ├── core/ # Core functionality
│ │ ├── __init__.py
│ │ ├── config.py # Configuration settings
│ │ ├── database.py # Database connection
│ │ └── security.py # Auth & password hashing
│ │
│ ├── models/ # Database models
│ │ ├── __init__.py
│ │ └── models.py # SQLAlchemy models
│ │
│ ├── schemas/ # Pydantic schemas
│ │ ├── __init__.py
│ │ └── schemas.py # Request/response schemas
│ │
│ ├── services/ # Business logic (placeholder)
│ └── utils/ # Utilities (placeholder)
│
├── database/ # Database initialization
│ └── init.sql # Default data & admin user
│
└── frontend/ # Frontend (placeholder for future)
Key Files
Configuration
.env- Environment variables (database, API keys, etc.)docker-compose.yml- Services: MySQL + FastAPI backend
Backend Application
backend/app/main.py- FastAPI app initialization, CORS, routesbackend/app/core/config.py- Settings managementbackend/app/core/security.py- JWT tokens, password hashingbackend/app/models/models.py- Database tables (User, Membership, Payment, etc.)backend/app/schemas/schemas.py- API request/response models
API Endpoints (v1)
auth.py- Register, loginusers.py- User profile, admin user managementtiers.py- Membership tier CRUDmemberships.py- Membership managementpayments.py- Payment processing & history
Database Models
Fully implemented:
- User - Authentication, profile, roles (member/admin/super_admin)
- MembershipTier - Configurable tiers with fees and benefits
- Membership - User memberships with status tracking
- Payment - Payment records with multiple methods
- Event - Event management (model ready, endpoints TODO)
- EventRSVP - Event registration (model ready, endpoints TODO)
- VolunteerRole - Volunteer roles (model ready, endpoints TODO)
- VolunteerAssignment - Role assignments (model ready, endpoints TODO)
- VolunteerSchedule - Shift scheduling (model ready, endpoints TODO)
- Certificate - Training certificates (model ready, endpoints TODO)
- File - File repository (model ready, endpoints TODO)
- Notification - Email tracking (model ready, endpoints TODO)
Quick Start
# Start everything
docker-compose up -d
# View logs
docker-compose logs -f
# Access API docs
# http://localhost:8000/docs
Default Credentials
Admin: admin@swanseaairport.org / admin123
Database: Configured via environment variables (see .env file)
What's Next
- Test the API endpoints
- Add Square payment integration
- Implement email notifications
- Create event management endpoints
- Add volunteer management endpoints
- Build frontend interface