How flaggigbo/green-initiatives works
Berry Bank Green Hub is an environmental project-management and donation platform. The main user journey is to browse projects, view project details, and support projects; entities can create and manage projects, while admins approve them. The client uses React and Redux, and the Express API handles domain requests backed by MongoDB. Separate capabilities include authentication, comments, and bank-linked round-up donations. Some frontend and API implementation files were not excerpted, so uncertain client-to-server connections are shown as unverified rather than asserted.
Main entry points: index.ts API routes · storage.ts Data access · roundup.controller.ts Round-up handling · pages Project pages
Components 21
Client experience
- React app
client/src/app/App.tsx - Project pages
client/src/pages - Redux state
client/src/app/store.ts - Project client
client/src/features/projects/projectService.ts - Comment client
client/src/features/comments/commentService.ts - Round-up client
client/src/features/roundup/roundupService.ts
API and domain
- API routes
server/routes/index.ts - Project handling
server/controllers/project.controller.ts - Comment handling
server/controllers/comment.controller.ts - Common services
server/controllers/common.controller.ts
Identity and access
- User handling
server/controllers/user.controller.ts - Auth service
server/services/auth.service.ts
Donations and round-ups
- Round-up handling
server/controllers/roundup.controller.ts - Payment service
server/services/payment.service.ts - Round-up service
server/services/roundup.service.ts
Persistence
- Data access
server/mongo/storage.ts - Mongo models
server/models/index.ts - MongoDB
server/connect/mongodb.ts - Domain schemas
shared/schema-mongo.ts
Other components
- User
- Bank-link provider
Connections 29
- User → React app: uses
- React app → Project pages: routes to
- React app → Redux state: provides state
client/src/app/App.tsx - Project pages → Project client: requests projects
- Project pages → Comment client: requests comments
- Project pages → Round-up client: requests round-ups
- Project client → API routes: calls API
- Comment client → API routes: calls API
- Round-up client → API routes: calls API
- API routes → Project handling: dispatches
server/routes/index.ts - API routes → Comment handling: dispatches
server/routes/index.ts - API routes → User handling: dispatches
server/routes/index.ts - API routes → Round-up handling: dispatches
server/routes/index.ts - API routes → Common services: dispatches
server/routes/index.ts - User handling → Auth service: delegates to
server/controllers/user.controller.ts - User handling → Data access: reads and writes
server/controllers/user.controller.ts - Project handling → Data access: reads and writes
server/controllers/project.controller.ts - Comment handling → Data access: reads and writes
server/controllers/comment.controller.ts - Comment handling → Round-up handling: notifies
- Round-up handling → Payment service: requests payments
server/controllers/roundup.controller.ts - Round-up handling → Round-up service: flushes balances
server/controllers/roundup.controller.ts - Round-up handling → Data access: reads and writes
server/controllers/roundup.controller.ts - Payment service → Data access: reads and writes
server/services/payment.service.ts - Round-up service → Data access: reads and writes
server/services/roundup.service.ts - Payment service → Round-up service: delegates to
server/services/payment.service.ts - Round-up handling → Bank-link provider: links accounts
- Data access → Mongo models: uses models
server/mongo/storage.ts - Mongo models → Domain schemas: uses schemas
server/models/index.ts - Data access → MongoDB: persists data