|
| 1 | +# ThoughtSwap |
| 2 | + |
| 3 | +## Project Overview |
| 4 | + |
| 5 | +Thought Swap is a discussion facilitation app where a facilitator sends prompts to participants, who submit anonymous responses that are later redistributed for small-group discussion. |
| 6 | + |
| 7 | +**Github repository:** https://github.com/Lab-Lab-Lab/ThoughtSwap |
| 8 | + |
| 9 | +**Key technologies:** |
| 10 | +- Django (backend) |
| 11 | +- Django Channels (WebSocket communication) |
| 12 | +- HTML, JavaScript (frontend templates) |
| 13 | + |
| 14 | +**Core features:** |
| 15 | +- Prompt creation, management, and reuse |
| 16 | +- Anonymous response submission |
| 17 | +- Response “swap” feature for small-group discussion |
| 18 | +- Facilitator dashboard with course and session controls |
| 19 | + |
| 20 | +## What Has Been Accomplished |
| 21 | + |
| 22 | +- Set up Django backend and database models |
| 23 | + - Course, Enrollment, Prompt, Session, PromptUse, Thought |
| 24 | +- Integrated WebSocket support (channels) for real-time updates to both the facilitator and participant |
| 25 | +- Facilitators can switch their course from three states: Active, Draft, and Inactive |
| 26 | +- Facilitators can create prompts ahead of time |
| 27 | +- Facilitators can send prompts to participants to respond to |
| 28 | +- Facilitators can disperse responses using the “swap” feature |
| 29 | +- Participants can join a new course via a room code |
| 30 | +- Participants can view the current prompt |
| 31 | +- Participants can respond to the current prompt |
| 32 | +- Participants can receive a thought to discuss |
| 33 | + |
| 34 | +## Key Decisions Made (with Explanations) |
| 35 | + |
| 36 | +- **What is PromptUse** |
| 37 | + The `PromptUse` model acts as a connection between a prompt and a session. It allows the same prompt to be reused across multiple sessions while keeping track of responses specific to each session. This design improves flexibility by avoiding duplicate prompt entries and enables better tracking of when and where prompts were used. |
| 38 | + |
| 39 | +- **Why there are different HTML templates** |
| 40 | + I separated the HTML templates into `facilitator_session.html`, `participant_session.html`, and `teacher_dashboard.html` to clearly divide the interfaces by user role. Each role has very different needs: |
| 41 | + |
| 42 | +- **Intended functionality of restrictions around swapping** |
| 43 | + When swapping responses, the system should ensure that: |
| 44 | + - Each participant receives a response from someone else (not their own) |
| 45 | + - There must be at least two active student who have responded |
| 46 | + - If there are more students than responses, responses are randomly duplicated |
| 47 | + |
| 48 | + |
| 49 | +## Known Issues or Bugs |
| 50 | + |
| 51 | +- Swapping thoughts needs to be more robust |
| 52 | +- Late joiners need to be fully addressed |
| 53 | +- Saftey and robustness of user contributions has not been fully tested |
| 54 | + |
| 55 | +## Next Steps |
| 56 | + |
| 57 | +- Front-end styling + UX |
| 58 | +- Facilitator's ability to create a new course |
| 59 | +- Facilitator's ability to create a new session |
| 60 | +- “Demo mode,” where the facilitator and/or participants need not create a lasting account |
| 61 | +- Functionality for late joiners |
| 62 | +- When swapping: if one author is more prolific for a certain prompt, before assigning all their thoughts to others, first ensure that each author's thoughts are assigned (and specifically to authors (users who have submitted for this prompt)) |
| 63 | +- Somehow allow for the participants indicate their thoguhts about the ditributed thought |
| 64 | +- Start having semantic analysis |
| 65 | +- Find some way to track how the discussion went (Form for after the discussion?) |
| 66 | +- Participant view for the facilitator |
| 67 | +- Offer rich text editor in prompt composition and thought composition |
| 68 | + |
| 69 | +## Important Files / Code to Know |
| 70 | + |
| 71 | +- `facilitator_session.html` |
| 72 | + This is the main interface for facilitators. It allows them to: |
| 73 | + - Write and send prompts |
| 74 | + - Swap anonymous participant responses |
| 75 | + - Access the prompt bank |
| 76 | + - View active and past prompts |
| 77 | + It also includes WebSocket logic to handle live updates from the server. |
| 78 | + |
| 79 | +- `participant_session.html` |
| 80 | + This is the participant view during a session. Participants can: |
| 81 | + - See the current prompt |
| 82 | + - Submit their responses |
| 83 | + - Receive a swapped response to discuss |
| 84 | + It connects to the WebSocket server to listen for prompt updates and swapped thoughts. |
| 85 | + |
| 86 | +- `teacher_dashboard.html` |
| 87 | + This is the dashboard where teachers manage their courses and sessions. |
| 88 | + - Shows all enrolled courses |
| 89 | + - Lets the teacher switch session states (Active, Inactive, Draft) |
| 90 | + - Displays and manages the prompt bank, including adding new prompts |
| 91 | + |
| 92 | +- `models.py` |
| 93 | + Contains all the Django data models, including: |
| 94 | + - Course, Enrollment, Prompt, Session, PromptUse, Thought |
| 95 | + |
| 96 | +- `views.py` |
| 97 | + Contains the Django views that: |
| 98 | + - Handle requests and render the pages |
| 99 | + - Manage course state changes |
| 100 | + - Provide data to the templates |
| 101 | + |
| 102 | +- `consumers.py` |
| 103 | + Contains the Django Channels consumers that: |
| 104 | + - Handle WebSocket connections |
| 105 | + - Receive and send real-time events like new prompts, new thoughts, swaps, and prompt bank data |
| 106 | + |
0 commit comments