A full-stack digital marketing application designed to help users schedule, manage, and publish content across multiple social media platforms simultaneously, including LinkedIn and X/Twitter.
This project demonstrates modern .NET development, React, Clean Architecture, and complex third-party API integrations such as OAuth 2.0, media uploads, and background processing.
- Backend: .NET 10, C# 12
- Frontend: React.js, Tailwind CSS, Vite
- Database: PostgreSQL
- ORM: Entity Framework Core
- Background Processing: Hangfire with PostgreSQL storage
- Cloud Storage: Cloudinary for media assets
- AI Integration: Azure OpenAI / Gemini for AI-assisted post generation
The application was engineered with scalability, security, and reliability in mind, following Clean Architecture principles.
The codebase is decoupled to support testability and maintainability:
- Domain: Core entities such as
User,Post, andSocialAccount. - Application: Business rules and interfaces such as
IPostService,ISocialMediaProvider, andIEncryptionService. - Infrastructure: EF Core
DbContext, migrations, and external API implementations. - API: Presentation layer, Hangfire configuration, rate limiting, and dependency injection setup.
- Zero plain-text tokens: OAuth access and refresh tokens are encrypted at rest and decrypted only at runtime using AES encryption.
- OAuth 2.0 and PKCE: Complete authorization flows were implemented, including PKCE challenge handling for the X API.
- Secure configuration: API keys and secrets are excluded from source control with
.gitignore; local development can use .NET User Secrets.
- Hangfire powers asynchronous background processing.
- Users can schedule posts for future dates.
- The background worker retrieves due posts, decrypts the required platform tokens, and publishes content asynchronously.
- Hangfire retries background jobs automatically for transient failures.
- Publication state is tracked per platform so a multi-platform post can recover platform-by-platform.
- Inbound protection: ASP.NET Core rate limiting protects expensive endpoints such as AI generation.
- Outbound throttling: Background jobs delay between HTTP requests to reduce 429 responses and avoid spam restrictions.
- LinkedIn: Implements the UGC image upload flow for native media publishing.
- X/Twitter: Supports media upload flow for attaching images to posts.
- .NET 10 SDK
- Node.js and npm
- PostgreSQL running locally or via Docker
- API keys for X Developer Portal, LinkedIn Developer Portal, and Cloudinary
-
Navigate to the API directory:
cd SocialMediaManager.API -
Configure secrets. Do not place real keys in
appsettings.json.dotnet user-secrets init dotnet user-secrets set "ConnectionStrings:DefaultConnection" "Host=localhost;Database=SocialDb;Username=postgres;Password=yourpassword" dotnet user-secrets set "OAuth:X:ClientId" "<YOUR_X_CLIENT_ID>" dotnet user-secrets set "OAuth:X:ClientSecret" "<YOUR_X_CLIENT_SECRET>" dotnet user-secrets set "OAuth:LinkedIn:ClientId" "<YOUR_LINKEDIN_CLIENT_ID>" dotnet user-secrets set "OAuth:LinkedIn:ClientSecret" "<YOUR_LINKEDIN_CLIENT_SECRET>"
-
Apply database migrations:
dotnet ef database update --project ../SocialMediaManager.Infrastructure
-
Run the API:
dotnet run
-
Navigate to the frontend directory:
cd ../SocialMediaManager.UI -
Install dependencies:
npm install
-
Start the Vite development server:
npm run dev
Connect and manage your LinkedIn and X/Twitter accounts securely. The application displays your account usernames and allows easy disconnection when needed.
Compose posts with optional AI-generated captions using OpenAI or Gemini. Add images, select target platforms, and schedule publication directly from the interface.
View all scheduled posts with per-platform publication status. Track which posts have been published or are pending, with real-time status updates from the background job processor.
- Strict API scopes: Requested the correct X scopes, including
tweet.read,tweet.write, andusers.read, to avoid authorization errors. - Complex JSON schemas: Used dynamic dictionary-based payloads to match LinkedIn UGC API requirements.
- React StrictMode OAuth handling: Added a
useRefguard to prevent duplicate OAuth code exchanges during development.


