How sarahabuirmeileh/express-serveandshine works
Serve & Shine is a volunteer-opportunity platform for volunteers and organizations. Its principal workflow is an authenticated API request to discover or manage opportunities, with volunteer profiles and skills supporting matching and recommendations; participation, feedback, and ratings round out the engagement lifecycle. Organization administration and role-based permissions are a separate control plane. The graph includes the documented recommendation and feedback capabilities, but their detailed implementation and most route-to-controller wiring were not sampled, so those links are omitted. AWS storage and logging are shown where source excerpts support them.
Main entry points: app.ts Express app · voluntaryWork.ts Opportunity routes · authenticate.ts Authentication · authorize.ts Authorization
Components 30
API
- Express app
app.ts - Opportunity routes
src/routes/voluntaryWork.ts - Volunteer routes
src/routes/volunteer.ts - Organization routes
src/routes/organizationProfile.ts - Admin routes
src/routes/organizationAdmin.ts - Role routes
src/routes/role.ts - Permission routes
src/routes/permission.ts - Error handling
src/middleware/errorHandler/errorHandler.ts
Identity & Access
- Organization admins
src/controllers/organizationAdmin.ts - Role management
src/controllers/role.ts - Permission management
src/controllers/permission.ts - Authentication
src/middleware/auth/authenticate.ts - Authorization
src/middleware/auth/authorize.ts
Volunteer Platform
- Opportunity services
src/controllers/voluntaryWork.ts - Volunteer services
src/controllers/volunteer.ts - Organization profiles
src/controllers/OrganizationProfile .ts
Persistence
- MySQL connection
src/db/dataSource.ts - Volunteer records
src/db/entities/Volunteer.ts - Opportunity records
src/db/entities/VoluntaryWork.ts - Organization records
src/db/entities/OrganizationProfile.ts - Admin records
src/db/entities/OrganizationAdmin.ts - Roles
src/db/entities/Role.ts - Permissions
src/db/entities/Permission.ts - Event logs
src/db/entities/Logs.ts
AWS Integrations
- Database logger
src/controllers/dataBaseLogger.ts - CloudWatch logging
src/controllers/AWSServices/CloudWatchLogs.ts - S3 file services
src/controllers/AWSServices/S3.ts
Other components
- Volunteer / organization
- AWS S3
- AWS CloudWatch
Connections 23
- Volunteer / organization → Express app: sends requests
- Express app → Opportunity routes: mounts routes
- Express app → Volunteer routes: mounts routes
- Express app → Organization routes: mounts routes
- Express app → Admin routes: mounts routes
- Express app → Role routes: mounts routes
- Express app → Permission routes: mounts routes
- Express app → Authentication: guards routes
- Express app → Error handling: handles errors
- Express app → MySQL connection: initializes database
- Authentication → Admin records: looks up admin
- Authentication → Volunteer records: looks up volunteer
- Authorization → Admin records: checks ownership
- Authorization → Opportunity records: checks work access
- Opportunity routes → Opportunity services: calls services
- Opportunity routes → Organization profiles: looks up organization
- Opportunity routes → S3 file services: manages files
- S3 file services → Opportunity records: updates images
- S3 file services → AWS S3: uploads / deletes
- Authentication → Database logger: records failures
- Authorization → Database logger: records failures
- Database logger → Event logs: writes log entries
- CloudWatch logging → AWS CloudWatch: sends logs