Automated Action 771ee5214f Implement LinkedIn-based church management system with FastAPI
- Complete FastAPI application with authentication and JWT tokens
- SQLite database with SQLAlchemy ORM and Alembic migrations
- User management with profile features and search functionality
- LinkedIn-style networking with connection requests and acceptance
- Social features: posts, likes, comments, announcements, prayer requests
- Event management with registration system and capacity limits
- RESTful API endpoints for all features with proper authorization
- Comprehensive documentation and setup instructions

Key Features:
- JWT-based authentication with bcrypt password hashing
- User profiles with bio, position, contact information
- Connection system for church member networking
- Community feed with post interactions
- Event creation, registration, and attendance tracking
- Admin role-based permissions
- Health check endpoint and API documentation

Environment Variables Required:
- SECRET_KEY: JWT secret key for token generation
2025-07-01 12:28:10 +00:00

53 lines
1.4 KiB
Python

from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from app.api import auth, users, posts, events, connections
import os
app = FastAPI(
title="LinkedIn-Based Church Management System",
description="A church management system with LinkedIn-style networking features",
version="1.0.0",
openapi_url="/openapi.json",
)
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
# Include routers
app.include_router(auth.router, prefix="/auth", tags=["Authentication"])
app.include_router(users.router, prefix="/users", tags=["Users"])
app.include_router(posts.router, prefix="/posts", tags=["Posts"])
app.include_router(events.router, prefix="/events", tags=["Events"])
app.include_router(connections.router, prefix="/connections", tags=["Connections"])
@app.get("/")
async def root():
return {
"title": "LinkedIn-Based Church Management System",
"documentation": "/docs",
"health": "/health",
}
@app.get("/health")
async def health_check():
return {
"status": "healthy",
"service": "LinkedIn-Based Church Management System",
"version": "1.0.0",
}
if __name__ == "__main__":
import uvicorn
uvicorn.run(
"main:app", host="0.0.0.0", port=int(os.getenv("PORT", 8000)), reload=True
)