How sapirshenkor/freedi-app works
Freedi is a deliberative-democracy platform for organizing questions, proposals, discussion, evaluation, and group decisions. Participants enter through the web app, authenticate, and use statement and mass-consensus flows; Firebase-backed state supports real-time collaboration, while serverless functions process voting, evaluations, results, and related events. The graph also preserves documented capabilities such as chat, consensus visualization, notifications, and AI assistance. Several connections are documented only at product level because their implementation files were not sampled.
Main entry points: massConsensusRoutes.tsx Consensus routes · index.ts Event functions · useAuthentication.ts Authentication · StatementMain.tsx Statement workspace
Components 26
Web application
- App entry
src/main.tsx - Public routes
src/routes/publicRoutes.ts - Consensus routes
src/routes/massConsensusRoutes.tsx
Deliberation workflows
- Statement workspace
src/view/pages/statement/StatementMain.tsx - Consensus introduction
src/view/pages/massConsensus/introduction/Introduction.tsx - Question framing
src/view/pages/massConsensus/massConsesusQuestion/MassConsesusQuestion.tsx - Proposal evaluation
src/view/pages/massConsensus/randomSuggestions/RandomSuggestions.tsx - My proposals
src/view/pages/massConsensus/mySuggestions/MassConsensusMySuggestions.tsx - Results summary
src/view/pages/massConsensus/resultsSummary/ResultsSummary.tsx - Integrated chat
src/view/pages/statement/components/chat/Chat.tsx - Consensus visualization
src/view/components/maps/polarizationIndex/PolarizationIndex.tsx - Notifications
src/services/notificationService.ts
Data and identity
- Authentication
src/controllers/hooks/useAuthentication.ts - Public sign-in
src/controllers/auth/publicAuthHandler.ts - Firebase services
src/controllers/db/config.ts - Client state
src/redux/store.ts - Statement state
src/redux/statements/statementsSlice.ts - Live statements
src/controllers/db/statements/listenToStatements.ts
Serverless processing
- AI assistance
functions/src/services/ai-service.ts - Event functions
functions/src/index.ts - Evaluation processing
functions/src/fn_evaluation.ts - Vote processing
functions/src/fn_vote.ts - Result processing
functions/src/fn_results.ts - Statement processing
functions/src/fn_statements.ts
Other components
- Participant
- Firestore
Connections 28
- Participant → App entry: opens
src/main.tsx - App entry → Public routes: renders routes
src/main.tsx - Public routes → Consensus routes: routes consensus
- Participant → Public sign-in: may sign in
- App entry → Authentication: checks session
- Authentication → Firebase services: observes auth
src/controllers/hooks/useAuthentication.ts - Authentication → Client state: sets creator
src/controllers/hooks/useAuthentication.ts - Authentication → Firestore: writes user
src/controllers/hooks/useAuthentication.ts - Public sign-in → Firestore: saves user
src/controllers/auth/publicAuthHandler.ts - Consensus routes → Consensus introduction: routes to
src/routes/massConsensusRoutes.tsx - Consensus routes → Question framing: routes to
src/routes/massConsensusRoutes.tsx - Consensus routes → Proposal evaluation: routes to
src/routes/massConsensusRoutes.tsx - Consensus routes → My proposals: routes to
src/routes/massConsensusRoutes.tsx - Consensus routes → Results summary: routes to
src/routes/massConsensusRoutes.tsx - Statement workspace → Integrated chat: includes discussion
- Statement workspace → Consensus visualization: shows agreement
- Statement workspace → Notifications: notifies participants
- Live statements → Firestore: listens to
src/controllers/db/statements/listenToStatements.ts - Live statements → Statement state: dispatches updates
src/controllers/db/statements/listenToStatements.ts - Statement state → Client state: updates state
src/redux/store.ts - Participant → Statement workspace: collaborates
- Participant → Consensus introduction: starts deliberation
- Proposal evaluation → AI assistance: uses assistance
- Firestore → Event functions: triggers events
functions/src/index.ts - Event functions → Evaluation processing: dispatches evaluations
functions/src/index.ts - Event functions → Vote processing: dispatches votes
functions/src/index.ts - Event functions → Result processing: dispatches results
functions/src/index.ts - Event functions → Statement processing: dispatches statements
functions/src/index.ts