-
Install Dependencies
npm install
-
Configure Environment
cp .env.example .env
Edit
.envand add your OAuth credentials. -
Start Development Server
npm run dev
This starts both frontend (port 5173) and backend (port 3001).
- Visit https://www.linkedin.com/developers/
- Create a new app
- In "Auth" tab, add redirect URI:
http://localhost:3001/auth/linkedin/callback - Request these permissions:
r_liteprofile(orprofile)r_emailaddress(oremail)w_member_social
- Copy Client ID and Client Secret to
.env
- Visit https://developer.twitter.com/en/portal/dashboard
- Create a new app
- Enable OAuth 2.0
- Set callback URL:
http://localhost:3001/auth/twitter/callback - Request scopes:
tweet.read,tweet.write,users.read,offline.access - Copy API Key and API Secret to
.envasTWITTER_CONSUMER_KEYandTWITTER_CONSUMER_SECRET
- Visit https://developers.facebook.com/
- Create a new app
- Add "Facebook Login" product
- In Settings > Basic, add platform: Website
- Set Site URL:
http://localhost:3001 - In Facebook Login > Settings, add redirect URI:
http://localhost:3001/auth/facebook/callback - Request permissions:
pages_manage_posts,pages_read_engagement,instagram_basic,instagram_content_publish - Copy App ID and App Secret to
.env
- Uses the same Facebook app
- Requires Instagram Business Account
- Connect Instagram account to Facebook Page
- Set redirect URI:
http://localhost:3001/auth/instagram/callback - Use same App ID and App Secret as Facebook
- Visit https://developers.tiktok.com/
- Create a new app
- Set redirect URI:
http://localhost:3001/auth/tiktok/callback - Request permissions:
user.info.basic,video.upload - Copy Client Key and Client Secret to
.env
You can test the UI without OAuth by:
- The frontend will show "Not connected" for all platforms
- You can still create posts and validate them
- Posting will fail without authentication (expected)
- Change
PORTin.envfor backend - Change Vite port in
vite.config.tsfor frontend
- Ensure
data/directory exists and is writable - Delete
data/postpilot.dbto reset database
- Verify redirect URIs match exactly in platform settings
- Check that credentials are correct in
.env - Ensure frontend URL matches
FRONTEND_URLin.env
- Set
NODE_ENV=production - Update
FRONTEND_URLto your production domain - Use strong
SESSION_SECRET - Set up HTTPS
- Update all OAuth callback URLs to production URLs
- Build:
npm run build && npm run build:server - Start:
npm start