Skip to content

arkham2424/Social-media-management-platform-with-OpenClaw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Social Media Manager

A full-stack social media management app with:

  • AI-assisted post generation (Anthropic Claude)
  • Post composer with status-aware validation
  • Calendar scheduler
  • Analytics dashboard (summary, timeseries, per-post breakdown)
  • Post feed with edit/delete and filters

Tech stack

Layer Tech
Frontend React 19, Vite, Tailwind CSS
Backend Node.js, Express 5
Database SQLite (better-sqlite3)
AI Anthropic Messages API (claude-sonnet-4-20250514)

Repository structure

.
├─ client/   # React SPA (tab-based navigation, no router)
└─ server/   # Express API + SQLite initialization/seed

Prerequisites

  • Node.js 18+ (recommended)
  • npm
  • Anthropic API key (required only for /api/ai/generate)

Quick start

  1. Install dependencies:
    npm install
    npm install --prefix client
    npm install --prefix server
  2. Configure environment variables:
    • Copy server/.env.example to server/.env
    • Optional: copy client/.env.example to client/.env
  3. Start both apps:
    npm run dev
  4. Open:
    • Frontend: http://localhost:5173
    • API health: http://localhost:4000/api/health

Environment variables

server/.env

Variable Required Default Description
PORT No 4000 API server port
ANTHROPIC_API_KEY Yes (for AI route) - API key used by /api/ai/generate

client/.env

Variable Required Default Description
VITE_API_BASE_URL No http://localhost:4000/api Base URL used by frontend API client

Scripts (run from repo root)

Command Description
npm run dev Run server + client concurrently
npm run dev:server Run only API server
npm run dev:client Run only frontend
npm run build:client Build frontend for production
npm run lint:client Lint frontend

There are currently no automated test scripts in root, client, or server.

API overview

Base URL: http://localhost:4000/api

Method Route Purpose
GET /health Health check
GET /seed/overview Seeded row counts (posts, drafts, analytics)
POST /ai/generate Generate 3 AI post variations
POST /posts Create post
GET /posts List posts (page, pageSize, optional platform, status)
GET /posts/:id Get single post
PUT /posts/:id Update post
DELETE /posts/:id Delete post
GET /schedule Calendar items (start, end, optional platform, status)
GET /analytics/summary Aggregate metrics + best post
GET /analytics/timeseries Date-wise engagement totals
GET /analytics/posts Per-post metrics list with sorting/pagination

Data and validation conventions

  • Supported platforms: x, linkedin, instagram
  • Tones: professional, casual, viral
  • Post statuses: draft, scheduled, posted
  • Character limits: x (280), linkedin (3000), instagram (2200)
  • DB fields use snake_case; API responses are normalized to camelCase
  • Status rules:
    • scheduled requires scheduledAt
    • draft cannot include scheduledAt
    • posted auto-populates postedAt if omitted

Error response contract

All API errors use this shape:

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Human-readable message",
    "details": null
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages