This project is a small FastAPI-based backend system designed for learning and practicing backend skills It simulates a mini LinkedIn-style Activity Feed system.
- Python 3.11
- FastAPI
- SQLAlchemy + PostgreSQL
- Redis (with
redis.asyncio
) - Kafka (with
aiokafka
) - Docker & Docker Compose
git clone https://github.com/your-username/activity-feed-fastapi.git
cd activity-feed-fastapi
Create a .env
file in the root directory with the following variables:
# Database
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=activity_feed
DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost:5432/activity_feed
# Redis
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_TTL=60 # seconds
# Kafka
KAFKA_HOST=kafka
KAFKA_PORT=9092
docker-compose up -d
The API Swagger will be available at: http://localhost:8000/docs