this is the centralised backend for all of rotur.
Environment Variables (loaded from root ../.env with optional local overrides):
USERS_FILE_PATH - where in the file system the users.json is LOCAL_POSTS_PATH - where to store claw posts, eg: posts.json FOLLOWERS_FILE_PATH - where to store the follower data for claw, eg: ./clawusers.json ITEMS_FILE_PATH - where to store item data for rotur, eg: ./items.json KEYS_FILE_PATH - where to store key data for rotur, eg: ./keys.json EVENTS_HISTORY_PATH - where to put account events, eg: ./events_history.json DAILY_CLAIMS_FILE_PATH - where to store daily claim data, eg: ./rotur_daily.json SYSTEMS_FILE_PATH - where in the file system info about rotur systems is, eg: ./systems.json WEBSOCKET_SERVER_URL - claw events go here EVENT_SERVER_URL - websocket events go here SUBSCRIPTION_CHECK_INTERVAL - 3600 BANNED_WORDS_URL - a list of banned words for claw posts and other user data, eg: "http://www.bannedwordlist.com/lists/swearWords.txt" DISCORD_WEBHOOK_URL - where to log claw posts to KEY_OWNERSHIP_CACHE_TTL - 600 ADMIN_TOKEN - a token used for authenticating locally between other rotur apis
All endpoints are served on port 5602 (example: http://localhost:5602). Unless otherwise noted, query parameters are passed via ?param=value. JSON bodies are used for POST/PATCH where described.
GET /postCreate a post (query:auth,content, optionalattachment,os,profile_only=1)GET /replyReply to a postGET /deleteDelete a postGET /rateRate (like?) a postGET /repostRepost a postGET /pin_postPin a post to profileGET /unpin_postUnpin a postGET /search_postsSearch posts (query-based)GET /top_postsGet top liked posts within time/limit
GET /feedPublic feed (params:limit,offset)GET /following_feedFeed of followed users
GET /followFollow a userGET /unfollowUnfollow a userGET /followersList followers of a userGET /followingList following for a userGET /notificationsGet notifications for authenticated user
GET /profileGet profile by usernameGET /get_userGet user by auth key or username (legacy/new alias:/get_user_new)POST /create_userRegister a new user (JSON body)PATCH /usersUpdate a user key/value (JSON body:auth,key,value)DELETE /users/:usernameDelete (admin?) user by usernameDELETE /usersDelete user using auth key (JSON?)POST /me/updateUpdate current user (alias of update)DELETE /me/deleteDelete current user (key-based)GET /meGet current user (auth)POST /me/refresh_tokenRefresh an auth tokenPOST /me/transferTransfer creditsPOST /me/gambleGamble credits
GET /search_usersSearch users
GET /systemsList systemsGET /reload_systemsReload system definitions (admin)
GET /generate_validatorGenerate validator tokenGET /validateValidate a token
GET /statusGeneral status (startup uptime etc.)GET /status/updateSet status (auth)GET /status/clearClear statusGET /status/getGet status for user
GET /stats/economyEconomy statsGET /stats/usersUser statsGET /stats/richRich listGET /stats/auraAura statsGET /stats/systemsSystem statsGET /stats/followersFollowers statsGET /supportersSupporters listGET /claim_dailyClaim daily reward
GET /items/transfer/:nameTransfer ownershipGET /items/buy/:nameBuy itemGET /items/stop_selling/:nameStop sellingGET /items/set_price/:nameSet price (seller/admin?)GET /items/createCreate itemGET /items/get/:nameGet item infoGET /items/delete/:nameDelete itemGET /items/list/:usernameList a user's itemsGET /items/update/:nameUpdate item metaGET /items/sell/:namePut item for saleGET /items/sellingList currently selling itemsGET /items/admin_add/:idAdmin add user to item
GET /keys/createCreate keyGET /keys/mineList my keysGET /keys/check/:usernameCheck if user owns keyGET /keys/revoke/:idRevoke keyGET /keys/delete/:idDelete keyGET /keys/update/:idUpdate key metadataGET /keys/name/:idSet key nameGET /keys/get/:idGet key infoGET /keys/admin_add/:idAdmin add user to keyGET /keys/admin_remove/:idAdmin remove user from keyGET /keys/buy/:idBuy keyGET /keys/cancel/:idCancel key purchaseGET /keys/debug_subscriptionsDebug subscription status
POST /friends/request/:usernameSend friend requestPOST /friends/accept/:usernameAccept requestPOST /friends/reject/:usernameReject requestPOST /friends/remove/:usernameRemove friendGET /friendsList friends & pending
POST /marriage/propose/:usernamePropose marriagePOST /marriage/acceptAccept marriage proposalPOST /marriage/rejectReject marriage proposalPOST /marriage/cancelCancel marriage proposalPOST /marriage/divorceDivorce spouseGET /marriage/statusGet marriage status
GET /link/codeRequest a link codePOST /link/codeLink code to accountGET /link/statusGet link statusGET /link/userGet linked user info
POST /devfund/escrow_transferStart escrow transferPOST /devfund/escrow_releaseRelease escrow
GET /admin/get_user_byGet user by fieldPOST /admin/update_userAdmin update user (typed operations)POST /admin/delete_userAdmin delete user
POST /accept_tosAccept terms of service