๐ Macagram Documentation
Complete guide to your self-hosted social platform. Everything you need to know.
๐ก API Reference
All REST endpoints, request/response formats, auth methods
๐ค Bot SDK
Build bots in Python, Node.js, curl. Webhooks & API keys
โจ Features
Posts, reactions, DMs, live streaming, games, themes
๐ OAuth Login
GitHub, Discord, Google, GitLab sign-in setup guide
๐ฅ Self-Hosting
Run Macagram on your own hardware. Drive setup, tunnels
๐ Privacy
Data storage, encryption, your rights
โจ Features Guide
๐ Posts & Feed
- Rich text:
**bold** *italic* `code` โ Markdown support
- @mentions: Type
@username to tag someone โ clickable profile link
- #hashtags:
#topic โ clickable, searchable across all posts
- Links: URLs auto-linkify. Link previews auto-fetch title, image, description
- Images: Upload images with posts. Click to open lightbox
- Specs sharing: Check "๐ Specs" to attach your device specs
- Post editing: Click โ๏ธ on your own posts to edit
- Delete: Click ๐๏ธ to delete your posts
- Bookmarks: Click ๐ to save posts for later
โค๏ธ Reactions
- Click ๐ on any post โ emoji picker with 10 emojis
- Click any emoji badge to react with that emoji
- Top 3 reactions shown as badges. Total count displayed
- Your reaction highlighted in indigo
๐ฌ Comments
- Click ๐ฌ count on any post to expand comments
- Write a comment and press Send
- Delete your own comments with ร
๐ฌ DMs (Direct Messages)
- Click ๐ฌ on any user's post to DM them instantly
- Use โ๏ธ New Message in DMs tab to DM any user
- Unread message count badge on DMs tab
๐ฌ Videos
- Upload videos (any format). Stored on your 500GB drive
- Featured video row at top of feed (latest 8)
- Delete your own videos
๐ฑ Shorts
- Upload short vertical videos. Max-height viewport display
๐ด Live Streaming
- Start Stream: Screen sharing (desktop) or camera (mobile)
- Watch: Join stream in real-time via WebRTC
- Peer-to-peer โ no server processing. Low latency
๐ฎ Mini Games
- Click ๐ฎ Game in post form to create Tic-Tac-Toe
- Anyone can play by clicking cells directly in the post
- First player is X, second is O. Play Again button on win/draw
๐จ Themes
- Click ๐/โ๏ธ/โผ in the header to switch Dark / Light / OLED
- Preference saved in localStorage
๐ Security
- Password: Change in Account tab
- Passkeys: Register Touch ID / fingerprint. WebAuthn standard
- 2FA (TOTP): Scan QR with Authenticator app. 6-digit codes
- Security Question: Set for password recovery
- Email: Add email for notifications + recovery
๐ Analytics
- Account tab shows: total posts, likes received, followers, DMs
- Real-time stats from your database
๐ค Bots & API
- One-Click Bot: Instant webhook URL. POST
{"content":"hi"} โ done
- API Keys: Create keys for full API access
- Bearer Auth:
Authorization: Bearer m_YOURKEY
- Bot SDK: Examples in curl, Python, Node.js
๐ค Profile Customization
- Upload banner image + profile picture
- Set display name, bio, location, website, pronouns, status
- Pick accent color (8 choices)
- Export all your data as JSON
๐ฑ QR Code Login
- Scan QR on your phone โ log in there โ desktop auto-logs in
๐ Global Search
- Search bar at top of Feed โ searches posts, users, comments
๐ OAuth Login Setup
GitHub
- Go to GitHub Developer Settings โ OAuth Apps โ New
- Callback URL:
https://YOUR-DOMAIN/api/auth/github/callback
- Set env:
GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET
Discord
- Go to Discord Developer Portal โ OAuth2
- Add Redirect:
https://YOUR-DOMAIN/api/auth/discord/callback
- Scopes:
identify email
Google
- Go to Google Cloud Console
- Create OAuth Client ID โ Web Application
- Redirect URI:
https://YOUR-DOMAIN/api/auth/google/callback
GitLab
- Go to GitLab Applications
- Redirect URI:
https://YOUR-DOMAIN/api/auth/gitlab/callback
- Scopes:
read_user
๐ฅ Self-Hosting Guide
Requirements
- Node.js 18+
- External drive recommended (stores DB + uploads)
- Cloudflare tunnel or ngrok for public access
Quick Start
cd ~/Desktop/login-app
npm install
NODE_ENV=production node server.js
Cloudflare Tunnel
cloudflared tunnel --url http://localhost:3000
Database
Stored on your external drive at /Volumes/drive. 1/users.db. SQLite, no setup needed.
Uploads
Images/videos stored at /Volumes/drive. 1/uploads/. No size limits (your drive, your rules).
Environment Variables
NODE_ENV=production โ Production mode
GITHUB_CLIENT_ID / SECRET โ GitHub OAuth
DISCORD_CLIENT_ID / SECRET โ Discord OAuth
GOOGLE_CLIENT_ID / SECRET โ Google OAuth
GITLAB_CLIENT_ID / SECRET โ GitLab OAuth
EMAIL_FROM โ Sender email address
APP_URL โ Public URL for email links