API Inventory¶
269 endpoints registered in routes/routes.js (grep -cE "router\.(get|post|put|delete)\(" routes/routes.js → 269; 264 unique paths after sort -u).
Every endpoint is mounted at root (no path prefix). All inside apiRoutes.prototype.init = function() { ... }.
Cluster by topic (sample — not exhaustive)¶
Auth / user¶
| Verb | Path |
|---|---|
| POST | /webauthenticate (login) |
| GET | /me |
| POST | /checkPasswordResetToken |
| POST | /updatePassword |
| POST | /checkUserPassword |
AI-driven content generation (~25 endpoints starting with Ai_, AI, generate*, companyprofile)¶
| Verb | Path | Purpose |
|---|---|---|
| POST | /AISA |
unknown — AI Subject Aware? |
| POST | /ai_image |
AI image generation |
| POST | /Ai_quotes |
AI-generated quotes |
| POST | /Ai_2030Agenda |
content based on UN 2030 agenda |
| POST | /Ai_historicalFacts |
historical-facts content |
| POST | /Ai_interestingFacts |
interesting-facts content |
| POST | /AiTweets |
AI tweet text |
| POST | /companyprofile |
company profile generation |
| POST | /generateTweets |
tweets |
| POST | /generatepov |
POV-style content |
| POST | /addOrUpdatePostTrainingData |
training-data CRUD |
Common CRUD wrappers¶
| Verb | Path | Purpose |
|---|---|---|
| POST | /commonDelete |
generic soft-delete |
| POST | /commonPagecount |
row count for pagination |
| POST | /getfilename |
look up a file |
| POST | /commonIsDeleted |
generic isDeleted toggle |
Library / category / industry¶
| Verb | Path | Purpose |
|---|---|---|
| GET | /searchAllLibrary |
full-library search |
| GET | /getImageTemplate |
image templates |
| GET | /getIndustryLibrary |
library by industry |
| GET | /getIndustryCategory |
category by industry |
| GET | /getCategoryLibraryWithCount |
category + count |
| GET | /getIndustries |
all industries |
| POST | /getCategoryList |
category list |
| GET | /getCategoryLibrary |
category library |
| GET | /getSetting:mId (note /:mId colon-no-slash typo) |
setting by member id |
Templates & designs¶
| Verb | Path | Purpose |
|---|---|---|
| POST | /savecpostcontent |
save content post |
| POST | /approvedGenerate_media |
media generation post approval |
| GET | /getVariants |
template variants |
| POST | /getUserDesignList |
user's designs |
| POST | /getCarousalDesignList |
carousel designs |
| POST | /getEditcarousalDesign |
edit carousel design |
| POST | /uploadCarousaltemp |
upload carousel template |
| POST | /getUsercontemplates |
content templates |
| POST | /getUserallDesignList |
all designs |
Stock images¶
| Verb | Path | Purpose |
|---|---|---|
| POST | /getpexelsimages |
Pexels search |
(likely also /getpixabayimages, /getunsplashimages further in the file — verify) |
Many more¶
The file has ~269 endpoints total. The above are a sample of the first ~40 of the file. A full enumeration is left for a follow-up audit pass (see verify-markers.md).
Naming conventions (and their breakage)¶
- Mostly camelCase (
getUserDesignList,addOrUpdatePostTrainingData) - Some snake_case (
ai_image,Ai_2030Agenda) - Some kebab-ish (
getCategoryLibraryWithCount) - Several
/word:paraminstead of/word/:param(inherited typo pattern from sibling repos) - Some have leading capital letters (
AISA,AiTweets,Ai_quotes— inconsistent capitalisation)
The inconsistency is visible to the FE (Someli-Designer) which hardcodes these paths. Don't fix unilaterally; coordinate.
Response envelope¶
Mostly { status, data, code, message } (getSuccessResponse / getErrorResponse helpers — likely in helper/index.js). Not all handlers use the helpers; some hand-build envelopes.
Pagination¶
Per-handler. No shared middleware. Common shape: ?page=&pageSize=.
Authentication¶
Some endpoints are wrapped in a methods.ensureToken middleware (Bearer JWT); some apply auth (encrypted token); some are unauthenticated (e.g., /webauthenticate). The mix needs a per-endpoint audit. See authentication.md.
Bots delegated via require()¶
routes/routes.js require's getmodels, getmodelcopies from content_generation_bot.js (line: const { getmodels, getmodelcopies } = require("../content_generation_bot.js");). Some endpoints delegate AI work to these functions. This is the only inter-file require pattern observed — most code is inline.
Cross-reference¶
For the FE's view of which endpoints are actually called, see ../Someli-Designer/api-consumption.md.