
Postlin
An AI LinkedIn assistant that drafts posts and schedules them.
More detail
The problem
Most people know they should post on LinkedIn. Few do it every week. The hard part is not the idea, it is the time it takes to turn a rough thought into a finished post and then remember to publish it at the right moment.
I wanted one place where you drop in an idea, get a draft back, fix it up, and let the app post it for you later.
Who it's for
People who want to post on LinkedIn regularly but keep putting it off: developers, founders and anyone building a presence on their own. It also works for people who do not want to connect LinkedIn at all and just want help writing.
What I built
- Google sign-in and a short onboarding. You sign in with Google, add your Gemini API key and you are in. Connecting LinkedIn is optional.
- Bring your own AI key. Each person adds their own Gemini key. It is stored encrypted with AES-256-GCM, and you can pick which Gemini model to use.
- AI drafts through LangChain. Drafting goes through a small LangChain layer with a provider for Gemini, so another model can be added later without rewriting the app.
- Drafts with media. You can attach an image or video, upload your own, or have the app suggest an image prompt. Media goes to Cloudflare R2 through the S3 SDK, with a fallback when R2 is not set up.
- Scheduling. Pick a date and time and the post is queued. A background worker publishes it to LinkedIn when it is due, with retries if LinkedIn has a bad moment.
- Manual mode. Write and copy a post without connecting LinkedIn.
- A performance page and an analytics model for impressions, likes, comments and shares per post.
Stack
Next.js and TypeScript, React 19, Prisma with MongoDB, LangChain with Gemini, NextAuth, Resend for email, Cloudflare R2 for media, Tailwind CSS, Jest for tests and a GitHub Actions CI workflow. Redis and BullMQ are set up in the project for background jobs.
Key decisions and why
Each user brings their own Gemini key. Postlin never pays for anyone's AI usage, so there is no AI bill to pass on and no reason to limit how much people write. The tradeoff is a bit more friction at sign-up, so I kept the onboarding short and explained why the key is needed.
LangChain as the AI layer. I did not want Gemini baked into every route. With a provider interface in the middle, adding another model is a new provider file, not a rewrite.
A scheduler that cannot post twice. When a post is due, the worker first flips it from SCHEDULED to PUBLISHING in one database update. Only the worker that wins that update publishes it. If something fails, the post goes back to SCHEDULED with the error saved, and after three failed attempts it is marked FAILED instead of silently disappearing.
Wake up when the next post is due. The worker does not poll every few seconds. It looks up the next scheduled post and sets a timer for that exact moment, and it re-checks straight away when someone schedules or cancels a post. When nothing is queued it checks once a minute.
Never lose a post over an image. If the image upload to LinkedIn fails, the post still goes out as text instead of failing completely.
What happened after launch
Postlin did not get a full public launch. I got it to about 90% and paused it when client work got busy. Before that, about 30 people used it. I published around 10 real LinkedIn posts through it myself, and other users published more than 50 posts in total.
The landing page is live at postlin.mfaeezshabbir.me.
What I'd do next
If I pick Postlin back up, this is the list:
- Move the scheduler onto BullMQ. Redis and BullMQ are already in the project and the queue names are defined, but today the scheduler runs as a timer inside the Next.js server. Moving it to BullMQ delayed jobs would let it run as its own process.
- Add more AI providers. The LangChain layer was built for this. OpenAI and Hugging Face were on the list.
- An "optimize for LinkedIn" flow with styles like Story, Crisp, List and Case Study, streaming to the UI.
- Rate limits on uploads before opening it up to more people.
01 / The system
Where a scheduled post goes

02 / Results
- About 90% complete. Paused.
Next project
Mil-Ai-Assist