How congplatform/cong-platform works
CONG is a developing multi-tenant platform for NGOs, with a React web client and a shared Express API; the README also documents a separate mobile client using that API. The principal workflow is user authentication, account and collaboration-profile setup, then participation in the community through posts, interactions, search, and notifications. The web app also exposes public institutional pages. The API owns business rules and persistence, while Supabase provides authentication and PostgreSQL storage. Community routes and selected calls are evidenced in excerpts; other capability links reflect README documentation or indexed references, not a full inspection of unsampled code.
Main entry points: AuthProvider.tsx Auth state · api.ts API client · database.ts PostgreSQL pool · Routes.tsx Web routes
Components 24
Web experience
- Web routes
src/routes/Routes.tsx - Public pages
src/pages/about/About.tsx - Signed-in workspace
src/layouts/LoggedInLayout.tsx
Identity and onboarding
- Auth state
src/contexts/AuthProvider.tsx - Auth client services
src/services/oauthService.ts - Account and profiles
src/services/accountService.ts - Onboarding
backend/src/services/onboarding.service.ts - Organization representation
backend/src/services/representation.service.ts - Organization context
src/contexts/OrganizationProvider.tsx
Community
- Community workspace
src/pages/logged-in/community/Community.tsx - Community panels
src/components/community/CommunityResearchPanel.tsx - Community client
src/services/communityService.ts
API and domain services
- API client
src/services/api.ts - API entry
api/index.ts - Express app and routes
backend/src/app.ts - Auth controller
backend/src/controllers/auth.controller.ts - Auth rules
backend/src/services/auth.service.ts - Community routes
backend/src/routes/community.routes.ts - Community controller
backend/src/controllers/community.controller.ts - Community services
backend/src/services/community.service.ts
Persistence and integrations
- PostgreSQL pool
backend/src/config/database.ts - Supabase Auth
backend/src/config/supabase.ts
Other components
- Visitor / user
- Mobile client
Connections 28
- Visitor / user → Web routes: uses
README.md - Web routes → Public pages: routes to
src/routes/Routes.tsx - Web routes → Signed-in workspace: routes to
src/routes/Routes.tsx - Visitor / user → Mobile client: uses
README.md - Signed-in workspace → Auth state: reads session
src/layouts/LoggedInLayout.tsx - Auth state → Account and profiles: loads account
src/contexts/AuthProvider.tsx - Auth state → Organization representation: loads requests
src/contexts/AuthProvider.tsx - Auth state → API client: calls API
src/contexts/AuthProvider.tsx - Auth client services → API client: completes login
src/services/oauthService.ts - Auth client services → Supabase Auth: starts OAuth
src/services/oauthService.ts - API client → API entry: sends HTTPS
README.md - Mobile client → API entry: uses HTTPS API
README.md - API entry → Express app and routes: serves app
README.md - Express app and routes → Auth controller: routes auth
- Auth controller → Auth rules: calls
backend/src/controllers/auth.controller.ts - Auth rules → Supabase Auth: authenticates
backend/src/services/auth.service.ts - Auth rules → PostgreSQL pool: reads / writes
backend/src/services/auth.service.ts - Auth state → Onboarding: supports setup
- Auth state → Organization context: loads organization
- Community workspace → Community client: requests content
src/pages/logged-in/community/Community.tsx - Community panels → Community client: requests research
src/components/community/CommunityResearchPanel.tsx - Community client → API client: calls API
src/services/communityService.ts - API client → Community routes: sends community requests
- Community routes → Community controller: dispatches
backend/src/routes/community.routes.ts - Community controller → Community services: calls
backend/src/controllers/community.controller.ts - Community services → PostgreSQL pool: persists community data
- Onboarding → PostgreSQL pool: persists setup
- Organization representation → PostgreSQL pool: persists requests