Thanks to visit codestin.com
Credit goes to Github.com

Skip to content
/ Nexa Public

Full stack AI-powered social media scheduler - Twitter & LinkedIn integration, AI chatbot, post scheduling, and automation.

Notifications You must be signed in to change notification settings

tsujit74/Nexa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

37 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Full Stack AI-Powered Social Media Platform

🌐 Live Demo | πŸ’» GitHub Repo


πŸ–ΌοΈ Screenshot

Dashboard Screenshot


🎯 Objective

Build a full stack platform that helps users:

  • Generate content using an AI chatbot.
  • Schedule posts via a calendar interface.
  • Automatically publish posts to social media (currently Twitter & LinkedIn, text-only).

This platform makes it easier for businesses or individuals to plan, create, and post content consistently.


πŸ› οΈ Features Implemented

1. Social Media Integration

  • Securely connect Twitter & LinkedIn accounts using OAuth.
  • Automate posting text content.
  • Instagram integration is planned (API limitations, posting images/videos not implemented yet).

2. AI Chatbot for Content Creation

  • Chatbot collects business info from the user.
  • Generates personalized text posts dynamically for scheduling.
  • Supports both dynamic (interactive) and static (simple) post types.

3. Content Calendar & Scheduling

  • Calendar view to display all scheduled posts.
  • Posts can be scheduled for the future or posted immediately.
  • Users can edit or delete posts before publishing.

4. Posting Automation

  • Scheduled posts are automatically sent to Twitter & LinkedIn.
  • Immediate posts are created in DB first, then published.
  • Post status updated as pending β†’ posted β†’ failed.

5. Tech Stack

  • Backend: Node.js + Express, MongoDB (Mongoose)
  • Frontend: Next.js + React + Tailwind CSS
  • Scheduling: node-cron (runs every minute to check posts)
  • AI Content: Local chatbot simulation (OpenAI can be integrated)
  • Hosting: Vercel (frontend), MongoDB Atlas (database)

πŸ“‚ Folder Structure

Frontend

frontend/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ dashboard/
β”‚   β”‚   β”‚   β”œβ”€β”€ [...catchAll]/
β”‚   β”‚   β”‚   └── page.tsx
β”‚   β”‚   β”œβ”€β”€ auth/
β”‚   β”‚   β”‚   └── page.tsx
β”‚   β”‚   β”œβ”€β”€ favicon.ico
β”‚   β”‚   β”œβ”€β”€ globals.css
β”‚   β”‚   β”œβ”€β”€ layout.tsx
β”‚   β”‚   └── page.tsx
β”‚   β”‚
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ auth/page.tsx
β”‚   β”‚   β”œβ”€β”€ dashboard/
β”‚   β”‚   β”‚   β”œβ”€β”€ AllPostList.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Chatbot.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ CreatePostForm.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ DashboardNotFound.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ FloatingChatbot.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ PostSchedulerDashboard.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ SocialAccount.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ AuthGuard.tsx
β”‚   β”‚   β”‚   └── PostStatusNav.tsx
β”‚   β”‚
β”‚   β”œβ”€β”€ context/
β”‚   β”‚   β”œβ”€β”€ AuthContext.tsx
β”‚   β”‚   β”œβ”€β”€ PostContext.tsx
β”‚   β”‚   └── ToastContext.tsx
β”‚   β”‚
β”‚   β”œβ”€β”€ hooks/
β”‚   β”‚   β”œβ”€β”€ useAuth.ts
β”‚   β”‚   β”œβ”€β”€ useChat.ts
β”‚   β”‚   β”œβ”€β”€ usePosts.ts
β”‚   β”‚   └── useSocialAccount.ts
β”‚   β”‚
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ api.ts
β”‚   β”‚   β”œβ”€β”€ auth.ts
β”‚   β”‚   β”œβ”€β”€ chat.ts
β”‚   β”‚   β”œβ”€β”€ posts.ts
β”‚   β”‚   └── social.ts

Backend

backend/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ controllers/
β”‚   β”‚   β”œβ”€β”€ authController.ts
β”‚   β”‚   β”œβ”€β”€ postController.ts
β”‚   β”‚
β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”œβ”€β”€ User.ts
β”‚   β”‚   └── Post.ts
β”‚   β”‚
β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”œβ”€β”€ authRoutes.ts
β”‚   β”‚   β”œβ”€β”€ postRoutes.ts
β”‚   β”‚
β”‚   β”œβ”€β”€ middleware/
β”‚   β”‚   └── authMiddleware.ts
β”‚   β”‚
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”œβ”€β”€ platformTwitter.ts
β”‚   β”‚   β”œβ”€β”€ platformLinkedIn.ts
β”‚   β”‚
β”‚   β”œβ”€β”€ config/
β”‚   β”‚   └── db.ts
β”‚   β”‚
β”‚   β”œβ”€β”€ server.ts
β”‚   └── types.d.ts

βš™οΈ Environment Variables

Create a .env.local (frontend) and .env (backend):

# Frontend
NEXT_PUBLIC_API_URL=http://localhost:4000/api

# Backend
MONGO_URI=<your_mongodb_connection_string>
JWT_SECRET=<your_jwt_secret>

SESSION_SECRET=mysecretkey

BACKEND_URL=http://localhost:4000
FRONTEND_URL=http://localhost:3000

# Twitter OAuth
TWITTER_API_KEY=<key>
TWITTER_API_SECRET=<secret>
TWITTER_ACCESS_TOKEN=<token>
TWITTER_ACCESS_SECRET=<secret>
TWITTER_CALLBACK_URL=<callback_uri>

# LinkedIn OAuth
LINKEDIN_CLIENT_ID=<client_id>
LINKEDIN_CLIENT_SECRET=<client_secret>
LINKEDIN_REDIRECT_URI=<redirect_uri>
LINKEDIN_CALLBACK_URL=<callback_uri>

πŸ‘‰ Instagram env vars not required (not integrated yet).


πŸš€ Setup & Running Locally

Good point πŸš€ β€” every professional README should include a Git Clone & Setup section at the top so anyone can run it locally.

Here’s how you can add it to your README (just before Setup & Running Locally):

## πŸ“₯ Clone the Repository

First, clone the repo and navigate into it:

```bash
git clone https://github.com/tsujit74/Nexa
```

Backend

cd backend
npm install
npm start

Frontend

cd frontend
npm install
npm run dev
  • Backend: http://localhost:4000
  • Frontend: http://localhost:3000

⚑ Quick Start Guide

  1. Signup/Login β†’ create a new account.

  2. Connect Accounts β†’ link Twitter & LinkedIn via OAuth.

  3. Chatbot β†’ enter details β†’ generate suggested post text.

  4. Create Post β†’ choose platform & schedule date/time.

  5. Dashboard β†’ view/edit posts on calendar.

  6. Posting:

    • Immediate β†’ posts instantly.
    • Scheduled β†’ posted automatically at correct time by node-cron.

⚠️ Notes

  • Posts are text-only for now.
  • Instagram support pending (API restrictions).
  • Scheduler runs every minute (optimized for demo; can use queues for scale).
  • Post lifecycle: pending β†’ posted β†’ failed.

πŸ“Œ Next Steps / TODO

  • Add Instagram posting (images & videos).
  • Support AI-generated images/videos.
  • Add post analytics (likes, impressions).
  • Use job queues for large-scale scheduling.

βœ… Deliverables

  • Full stack working application
  • Twitter & LinkedIn integration
  • AI chatbot (text-only)
  • Content calendar & scheduling
  • Immediate post support
  • Documentation & README

πŸ‘¨β€πŸ’» Developer Info

πŸ‘¨β€πŸ’» Author

Sujit Thakur β€” πŸ“Œ Full Stack Developer | Fresher
🌐 Portfolio | πŸ’» GitHub | βœ‰οΈ Email | πŸ“ž +91-7479713290


About

Full stack AI-powered social media scheduler - Twitter & LinkedIn integration, AI chatbot, post scheduling, and automation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages