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
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)
.
├─ client/ # React SPA (tab-based navigation, no router)
└─ server/ # Express API + SQLite initialization/seed
Node.js 18+ (recommended)
npm
Anthropic API key (required only for /api/ai/generate)
Install dependencies:
npm install
npm install --prefix client
npm install --prefix server
Configure environment variables:
Copy server/.env.example to server/.env
Optional: copy client/.env.example to client/.env
Start both apps:
Open:
Frontend: http://localhost:5173
API health: http://localhost:4000/api/health
Variable
Required
Default
Description
PORT
No
4000
API server port
ANTHROPIC_API_KEY
Yes (for AI route)
-
API key used by /api/ai/generate
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.
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
All API errors use this shape:
{
"error" : {
"code" : " VALIDATION_ERROR" ,
"message" : " Human-readable message" ,
"details" : null
}
}