How apparyllisorg/simplypluralapi works
Simply Plural API is the backend for the Simply Plural app. The main workflow is an authenticated client request entering the Express server, being routed through versioned API endpoints to account, social, and user-data operations, then returning a response; avatar requests additionally validate and store files. Separate capabilities cover reports/exports, scheduled reminders and front notifications, chat/messages, billing, and PluralKit synchronization. The tree and excerpts support routing, storage, event-queue, and integration links; most individual handlers were not sampled, so their internal data access is not inferred.
Main entry points: v1/routes.ts V1 routes · server.ts Express server · v2/routes.ts V2 routes · eventController.ts Event controller
Components 25
API runtime
- Express server
src/modules/server.ts - V1 routes
src/api/v1/routes.ts - V2 routes
src/api/v2/routes.ts - MongoDB
src/modules/mongo/index.ts
Accounts and access
- Authentication
src/api/v1/auth.ts - User accounts
src/api/v1/user.ts
Plural data
- Friend operations
src/api/v1/friendActions.ts - Members and groups
src/api/v1/member.ts - Front and history
src/api/v1/customFront.ts - Notes and comments
src/api/v1/note.ts - Polls and filters
src/api/v1/poll.ts - Reports and export
src/api/v1/user/generateReport.ts
Events and messaging
- Event controller
src/modules/events/eventController.ts - Reminder and front handlers
src/modules/events/frontChange.ts - Messages and chat
src/api/v1/messages.ts - Mail transport
src/modules/mail.ts
Integrations and files
- Avatar endpoints
src/api/v1/storage.ts - Content avatars
src/api/v2/storage/storage.content.ts - Storage controller
src/modules/storage/storageController.ts - S3 object store
src/modules/storage/storageTargetS3.ts - PluralKit API
- PluralKit sync
src/modules/integrations/pk/sync.ts - PluralKit dispatcher
src/modules/integrations/pk/controller.ts - Stripe billing
src/api/v1/subscriptions/subscriptions.core.ts
Other components
- App client
Connections 27
- App client → Express server: sends requests
- Express server → V1 routes: registers routes
- Express server → V2 routes: registers routes
- Express server → MongoDB: initializes
- V1 routes → Authentication: dispatches
- V1 routes → User accounts: dispatches
- V1 routes → Friend operations: dispatches
- V1 routes → Members and groups: dispatches
- V1 routes → Front and history: dispatches
- V1 routes → Notes and comments: dispatches
- V1 routes → Polls and filters: dispatches
- V1 routes → Reports and export: dispatches
- V1 routes → Avatar endpoints: dispatches
- V1 routes → Messages and chat: dispatches
- V2 routes → Friend operations: dispatches
- V2 routes → Content avatars: dispatches
- Avatar endpoints → Storage controller: stores files
- Content avatars → Storage controller: stores files
- Storage controller → S3 object store: writes and reads
- Express server → Event controller: starts controller
- Event controller → MongoDB: reads and queues
- Event controller → Reminder and front handlers: dispatches due events
- Express server → PluralKit dispatcher: starts dispatcher
- PluralKit sync → PluralKit dispatcher: queues requests
- PluralKit dispatcher → PluralKit API: sends requests
- Express server → Mail transport: starts transport
- Express server → Stripe billing: initializes billing