https://github.com/ehtisham-sadiq/social-content-api
API for the Linkedin-CMS project, a modern LinkedIn content management and scheduling platform.
https://github.com/ehtisham-sadiq/social-content-api
alembic apidog fastapi jwt-authentication pos sqlalchemy
Last synced: about 1 month ago
JSON representation
API for the Linkedin-CMS project, a modern LinkedIn content management and scheduling platform.
- Host: GitHub
- URL: https://github.com/ehtisham-sadiq/social-content-api
- Owner: ehtisham-sadiq
- Created: 2025-05-21T03:19:15.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-21T03:24:32.000Z (about 1 year ago)
- Last Synced: 2025-07-05T04:06:23.217Z (12 months ago)
- Topics: alembic, apidog, fastapi, jwt-authentication, pos, sqlalchemy
- Language: Python
- Homepage:
- Size: 32.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# social-content-api (Linkedin-CMS Backend)
This is the backend API for the Linkedin-CMS project, a modern LinkedIn content management and scheduling platform. Built with FastAPI, SQLAlchemy, Alembic, and PostgreSQL.
## Features
- User authentication (JWT)
- LinkedIn OAuth integration
- Post creation, editing, scheduling, and analytics
- Bulk upload and scheduling
- Template management
- Redis caching and rate limiting
- RESTful API with OpenAPI docs
## Getting Started
### Prerequisites
- Python 3.10+
- PostgreSQL
- (Optional) Redis for caching/rate limiting
### Installation
1. Install dependencies:
```sh
pip install -r requirements.txt
```
2. Set up your `.env` file in the `backend` directory (see below for required variables).
3. Run Alembic migrations to set up the database:
```sh
alembic upgrade head
```
4. Start the FastAPI server:
```sh
uvicorn main:app --reload
```
5. Open [http://localhost:8000/docs](http://localhost:8000/docs) for API documentation.
## Environment Variables
Create a `.env` file in the backend directory with the following variables:
```
DATABASE_URL=postgresql://postgres:postgres@localhost/linkedin_content_manager
SECRET_KEY=your_secret_key
CORS_ORIGINS=http://localhost:3000
LINKEDIN_CLIENT_ID=your_linkedin_client_id
LINKEDIN_CLIENT_SECRET=your_linkedin_client_secret
LINKEDIN_REDIRECT_URI=http://localhost:8000/api/linkedin/callback
REDIS_URL=redis://localhost:6379/0
REDIS_ENABLED=False
```
## Project Structure
- `app/` - Main FastAPI app, routers, models, schemas, logic
- `alembic/` - Database migrations
- `middleware/` - Custom middleware (rate limiting, logging)
- `requirements.txt` - Python dependencies
## Running with Docker
You can use the provided `docker-compose.yml` for local development:
```sh
docker-compose up --build
```
## License
MIT