How josephkingsleyy/survey-geek-backend works
This appears to be a survey platform backend: authenticated users can create and publish surveys, answer questions, and use wallet/payment features; the repository also exposes account, support, notification, media, and interest-category APIs. The sampled controllers establish the API-to-service calls shown below. The README is only a NestJS starter template, and most services and cron implementations were not sampled, so their internal calls and persistence wiring are intentionally omitted.
Main entry points: auth.service.ts Auth service · main.ts HTTP bootstrap · survey.controller.ts Survey API · question.controller.ts Question API
Components 28
Application runtime
- HTTP bootstrap
src/main.ts - App module
src/app.module.ts - Prisma data access
src/prisma/prisma.service.ts
Survey workflow
- Survey API
src/survey/survey.controller.ts - Survey service
src/survey/survey.service.ts - Question API
src/question/question.controller.ts - Question service
src/question/question.service.ts - Response API
src/response/response.controller.ts - Response service
src/response/response.service.ts - Interest API
src/survey-interest/survey-interest.controller.ts - Interest service
src/survey-interest/survey-interest.service.ts
Accounts and engagement
- Authentication
src/auth/auth.controller.ts - Auth service
src/auth/auth.service.ts - Ticket API
src/ticket/ticket.controller.ts - Ticket service
src/ticket/ticket.service.ts - Notification API
src/notification/notification.controller.ts - Notification service
src/notification/notification.service.ts - Notification socket
src/notification/notification.gateway.ts
Payments and payouts
- Payment API
src/payment/payment.controller.ts - Payment service
src/payment/payment.service.ts - Withdrawal API
src/withdrawal/withdrawal.controller.ts - Withdrawal service
src/withdrawal/withdrawal.service.ts - Billing jobs
src/crons/billing-cron.service.ts
External integrations
- Media API
src/cloudinary/cloudinary.controller.ts - Media service
src/cloudinary/cloudinary.service.ts - Cloudinary
- Email delivery
src/common/utils/mail-service.ts
Other components
- API client
Connections 25
- API client → HTTP bootstrap: sends requests
- HTTP bootstrap → App module: starts application
- API client → Authentication: authenticates
- API client → Survey API: manages surveys
- API client → Question API: manages questions
- API client → Response API: submits answers
- API client → Interest API: chooses interests
- API client → Payment API: manages wallet
- API client → Withdrawal API: requests payout
- API client → Ticket API: opens tickets
- API client → Notification API: views notifications
- API client → Media API: uploads media
- Authentication → Auth service: delegates auth
- Auth service → Prisma data access: reads and writes users
- Auth service → Email delivery: sends verification mail
- Survey API → Survey service: delegates survey operations
- Question API → Question service: delegates question operations
- Response API → Response service: submits responses
- Interest API → Interest service: manages interests
- Payment API → Payment service: delegates wallet operations
- Withdrawal API → Withdrawal service: handles payout action
- Ticket API → Ticket service: delegates ticket operations
- Notification API → Notification service: delegates notification actions
- Media API → Media service: uploads and manages media
- Media service → Cloudinary: uploads media