An intelligent content generation platform that creates personalized blogs using AI. Built with FastAPI, Celery, and modern Python practices.
blogwise-ai/
├── personal-blog/
│ ├── controllers/
│ │ ├── blog_controller.py # Blog-related endpoints
│ │ └── user_controller.py # User management endpoints
│ ├── dtos/
│ │ ├── blog_dto.py # Blog data transfer objects
│ │ ├── custom_response.py # Response models
│ │ └── user_dto.py # User data transfer objects
│ ├── entity_manager/
│ │ ├── logger.py # Logging configuration
│ │ └── manager.py # Database management
│ ├── middlewares/
│ │ └── auth.py # Authentication middleware
│ ├── repositories/
│ │ ├── blog_repository.py # Blog data access
│ │ └── user_repository.py # User data access
│ ├── services/
│ │ ├── blog_service.py # Blog business logic
│ │ └── user_service.py # User business logic
│ ├── utils/
│ │ └── utilities.py # Helper functions
│ ├── celery_worker.py # Celery configuration
│ ├── main.py # Application entry point
│ └── websocket_manager.py # WebSocket handling
├── tests/
├── docker-compose.yaml # Docker configuration
├── poetry.lock # Dependency lock file
├── pyproject.toml # Project configuration
└── README.md
- 🤖 AI Content Generation: Automated blog content creation
- 🔄 Real-time Updates: WebSocket integration for live updates
- 🔐 Authentication: Secure user management
- 📝 Blog Management: Complete CRUD operations
- 🚀 Async Processing: Background task handling with Celery
- 📊 Clean Architecture: Repository pattern implementation
- Framework: FastAPI
- Task Queue: Celery
- Authentication: JWT
- Real-time: WebSockets
- Package Manager: Poetry
- Containerization: Docker
- Clone the repository:
git clone https://github.com/yourusername/blogwise-ai.git
cd blogwise-ai
- Install dependencies:
poetry install
- Set up environment variables:
cp .env.example .env
# Configure your environment variables
- Run with Docker:
docker-compose up --build
Or run locally:
# Terminal 1: Start the FastAPI server
poetry run uvicorn personal-blog.main:app --reload
# Terminal 2: Start Celery worker
poetry run celery -A personal-blog.celery_worker worker --loglevel=info
Once running, access:
- Swagger UI:
http://localhost:8000/docs
- ReDoc:
http://localhost:8000/redoc
Key environment variables:
DATABASE_URL=postgresql://user:pass@localhost:5432/blogwise
REDIS_URL=redis://localhost:6379/0
SECRET_KEY=your-secret-key
Run the test suite:
poetry run pytest
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Run tests
- Commit your changes
- Push and create a Pull Request
- Controllers: Handle HTTP requests and responses
- DTOs: Define data transfer objects
- Entity Manager: Database connection and management
- Middlewares: Request/Response processing
- Repositories: Data access layer
- Services: Business logic
- Utils: Helper functions
- WebSocket Manager: Real-time communication
- JWT Authentication
- Role-based access control
- Request validation
- Rate limiting