How iot-ahmad/psyai works
PsyAI is a mental-health consultation platform with user authentication, specialist discovery, appointment booking and payment, plus specialist and administrative portals. The server exposes these workflows through Express routes; controllers handle domain operations and persist through Prisma. Specialist tools include appointment/session management and article publishing. The tree also shows a browser frontend, but its runtime connections to the API are not evidenced by the sampled excerpts or SOURCE INDEX. No README was provided, so additional product capabilities are limited to those visible in the source and tree.
Main entry points: index.js Express routes · db.js Prisma client · authController.js Authentication · whatsappService.js WhatsApp messaging
Components 21
Web experience
- Web pages
index.html - Browser behavior
script.js - Article store
articles-store.js
API and workflows
- Express routes
server/src/index.js - Authentication
server/src/controllers/authController.js - Specialist discovery
server/src/controllers/specialistsController.js - Booking management
server/src/controllers/bookingsController.js - Payment routes
server/src/controllers/paymentsController.js - Administration
server/src/controllers/adminController.js - Specialist portal
server/src/controllers/specialistPortalController.js - Access control
server/src/middlewares/auth.js - Request security
server/src/middlewares/security.js - Input validation
server/src/middlewares/validate.js
Shared services
- Card processing
server/src/services/paymentService.js - WhatsApp messaging
server/src/services/whatsappService.js - Security utilities
server/src/services/securityService.js - Audit logging
server/src/services/auditService.js
Persistence
- Prisma client
server/src/config/db.js - Application database
server/prisma/schema.prisma
Other components
- Platform user
- Meta WhatsApp
Connections 27
- Express routes → Authentication: routes to
server/src/index.js - Express routes → Specialist discovery: routes to
server/src/index.js - Express routes → Booking management: routes to
server/src/index.js - Express routes → Payment routes: routes to
server/src/index.js - Express routes → Administration: routes to
server/src/index.js - Express routes → Specialist portal: routes to
server/src/index.js - Express routes → Access control: applies
server/src/index.js - Express routes → Request security: configures
server/src/index.js - Express routes → Input validation: applies
server/src/index.js - Authentication → Prisma client: reads and writes
server/src/controllers/authController.js - Specialist discovery → Prisma client: queries
server/src/controllers/specialistsController.js - Booking management → Prisma client: reads and writes
server/src/controllers/bookingsController.js - Administration → Prisma client: reads and writes
server/src/controllers/adminController.js - Specialist portal → Prisma client: reads and writes
server/src/controllers/specialistPortalController.js - Payment routes → Card processing: delegates to
server/src/controllers/paymentsController.js - Card processing → Prisma client: reads and writes
server/src/services/paymentService.js - Authentication → WhatsApp messaging: requests OTP
server/src/controllers/authController.js - Authentication → Security utilities: uses
server/src/controllers/authController.js - Authentication → Audit logging: records events
server/src/controllers/authController.js - Specialist portal → WhatsApp messaging: sends notices
server/src/controllers/specialistPortalController.js - Specialist portal → Audit logging: records events
server/src/controllers/specialistPortalController.js - WhatsApp messaging → Prisma client: stores OTPs
server/src/services/whatsappService.js - WhatsApp messaging → Security utilities: verifies OTP hash
server/src/services/whatsappService.js - WhatsApp messaging → Meta WhatsApp: sends messages
server/src/services/whatsappService.js - Audit logging → Prisma client: writes logs
server/src/services/auditService.js - Audit logging → Security utilities: hashes IP
server/src/services/auditService.js - Prisma client → Application database: accesses