
Features: - User registration and authentication with JWT tokens - Multi-level admin access (Admin and Super Admin) - Gym management with membership plans - Subscription management with payment integration - Stripe and Paystack payment gateway support - Role-based access control - SQLite database with Alembic migrations - Comprehensive API endpoints with FastAPI - Database models for users, gyms, memberships, subscriptions, and transactions - Admin endpoints for user management and financial reporting - Health check and documentation endpoints Core Components: - FastAPI application with CORS support - SQLAlchemy ORM with relationship mapping - JWT-based authentication with bcrypt password hashing - Payment service abstraction for multiple gateways - Pydantic schemas for request/response validation - Alembic database migration system - Admin dashboard functionality - Environment variable configuration
26 lines
765 B
Python
26 lines
765 B
Python
from fastapi import APIRouter
|
|
|
|
from app.api.v1.endpoints import (
|
|
auth,
|
|
users,
|
|
gyms,
|
|
memberships,
|
|
subscriptions,
|
|
payments,
|
|
admin,
|
|
)
|
|
|
|
api_router = APIRouter()
|
|
|
|
api_router.include_router(auth.router, prefix="/auth", tags=["authentication"])
|
|
api_router.include_router(users.router, prefix="/users", tags=["users"])
|
|
api_router.include_router(gyms.router, prefix="/gyms", tags=["gyms"])
|
|
api_router.include_router(
|
|
memberships.router, prefix="/memberships", tags=["memberships"]
|
|
)
|
|
api_router.include_router(
|
|
subscriptions.router, prefix="/subscriptions", tags=["subscriptions"]
|
|
)
|
|
api_router.include_router(payments.router, prefix="/payments", tags=["payments"])
|
|
api_router.include_router(admin.router, prefix="/admin", tags=["admin"])
|