SocialDesk is a social media management dashboard built on Next.js (App Router) with a separate Express backend. It lets users connect social accounts (Meta/Facebook, Instagram, Pinterest), schedule/manage posts, and view analytics. Auth is cookie-based with role-gated routes (admin vs. regular user).
frontend/- Next.js 16 (App Router) React application with Tailwind CSS.backend/- Node.js/Express API server handling OAuth, queues, and Supabase integration.
- Node.js: v18+ recommended
- Redis: Required for BullMQ background queues (scheduled posts & analytics ingestion)
- Supabase: PostgreSQL database
- Cloudinary: For media uploads
- Social platform developer accounts (Meta, Pinterest, YouTube) for OAuth API integrations
-
Navigate to the backend directory:
cd backend -
Install dependencies:
npm install
-
Set up environment variables: Copy
.env.exampleto.envand fill in the required values (Supabase credentials, JWT secret, OAuth keys).cp .env.example .env
Note: If you do not have a local Redis server running, ensure that
SCHEDULED_POSTS_QUEUE_ENABLED=falseandANALYTICS_QUEUE_ENABLED=falseare set in your.envto prevent background queues from spamming connection errors. -
Start the backend server (starts on
http://localhost:5000):npm run dev
-
Open a new terminal and navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Set up environment variables: Create a
.env.localfile in the frontend directory and copy theJWT_SECRETfrom your backend.envfile into it. This is required for the Next.js middleware (proxy.ts) to verify your authentication cookies.JWT_SECRET=your_backend_jwt_secret_here
-
Start the frontend development server (starts on
http://localhost:3000):npm run dev
Once both servers are running:
- Frontend: Open http://localhost:3000 in your browser. API requests are automatically proxied to the backend via Next.js rewrites.
- Backend API: The backend is accessible directly at http://localhost:5000/api.