https://github.com/ducks/discourse-frndr
Friend finding app built on Discourse - match people based on interests and compatibility.
https://github.com/ducks/discourse-frndr
Last synced: about 1 month ago
JSON representation
Friend finding app built on Discourse - match people based on interests and compatibility.
- Host: GitHub
- URL: https://github.com/ducks/discourse-frndr
- Owner: ducks
- License: mit
- Created: 2025-10-23T23:37:02.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-10-24T03:03:44.000Z (8 months ago)
- Last Synced: 2025-10-24T03:38:12.538Z (8 months ago)
- Language: Ruby
- Size: 451 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# discourse-frndr
Friend finding app built on Discourse - match people based on interests and compatibility.
## Overview
Frndr transforms Discourse into a friend-finding platform. Users fill out profile questions, tag their intro topics with activities, and discover compatible friends through a matching algorithm.
## Features
- **Compatibility Matching**: Algorithm compares user profile answers to calculate compatibility percentage
- **Discovery Page**: Card-based UI showing potential matches with compatibility scores
- **Activity Tags**: Users tag intro topics with activities (hiking, board games, etc.)
- **Profile Questions**: Uses Discourse's built-in user fields for profile data
## Installation
1. Clone this repository to your Discourse plugins directory:
```bash
cd ~/discourse/discourse/plugins
git clone https://github.com/ducks/discourse-frndr.git
```
2. Or symlink during development:
```bash
ln -s ~/dev/discourse-frndr ~/discourse/discourse/plugins/discourse-frndr
```
3. Restart Discourse:
```bash
cd ~/discourse/discourse
bin/rails restart
```
4. Enable the plugin in Admin > Settings > Plugins
## Configuration
### User Fields (Profile Questions)
Create user fields in Admin > Customize > User Fields:
1. Go to Admin > Customize > User Fields
2. Add fields with options like:
- "How social are you?" (1-3 scale: 1=Introvert, 2=Balanced, 3=Extrovert)
- "Preferred activity time?" (1=Mornings, 2=Afternoons, 3=Evenings)
- "Activity level?" (1=Low, 2=Moderate, 3=High)
### Activity Tags
Create tags for activities in Admin > Tags:
- `hiking`
- `board-games`
- `cooking`
- `music`
- etc.
### Intro Topics Category
Create a dedicated category for intro topics:
1. Admin > Categories > New Category
2. Name: "Introductions" or "Find Friends"
3. Restrict to one topic per user (configure in category settings)
## Usage
### For Users
1. Fill out profile questions in user preferences
2. Create an intro topic in the Introductions category
3. Tag it with your activities
4. Visit `/discover` to see compatible matches
### Discovery Page
Access at: `https://your-forum.com/discover`
The page shows:
- Avatar and username of potential matches
- Compatibility percentage
- Link to view their full profile
## Testing
### Quick Start with Test Data
1. **Create example user fields** (one-time setup):
```bash
cd ~/discourse/discourse
bin/rails runner plugins/discourse-frndr/scripts/create-test-user-fields.rb
```
This creates 5 user fields with realistic options:
- Activity Level (Very Active, Moderately Active, Casual, Laid Back)
- Social Preference (Large Groups, Small Groups, One-on-One, Any Size)
- Meeting Time (Weekday Mornings, Weekday Evenings, Weekends, Anytime)
- Communication Style (Very Direct, Balanced, Diplomatic, Very Tactful)
- Interests (multiselect: Outdoors, Technology, Arts & Crafts, etc.)
2. **Generate test users with random answers**:
```bash
bin/rails runner plugins/discourse-frndr/scripts/create-test-users.rb
```
Creates 30 users (Alice, Bob, Charlie, etc.) with randomly selected answers.
All users have password: `TestPass123!@#`
3. **Test the matching**:
- Visit `/discover` as any test user
- Or test in Rails console:
```ruby
alice = User.find_by(username: "alice")
matches = Frndr::Matcher.find_matches_for(alice)
matches.first # => { user: #, compatibility: 75 }
```
### Manual Testing
```bash
cd ~/discourse/discourse
bin/rails console
```
```ruby
# Test compatibility between two users
alice = User.find_by(username: "alice")
bob = User.find_by(username: "bob")
Frndr::Matcher.calculate_compatibility(alice, bob)
# => Returns percentage (0-100)
# Check what fields they have set
alice.user_fields # => { "1" => "Very Active", "2" => "Small Groups", ... }
bob.user_fields # => { "1" => "Casual", "2" => "Small Groups", ... }
```
## Architecture
See [ARCHITECTURE.md](./ARCHITECTURE.md) for detailed technical documentation.
## Development
### Project Structure
```
discourse-frndr/
├── plugin.rb # Main plugin file
├── lib/
│ └── frndr/
│ ├── engine.rb # Rails engine
│ └── matcher.rb # Matching algorithm
├── app/
│ └── controllers/
│ └── frndr/
│ └── discover_controller.rb
├── assets/
│ ├── javascripts/discourse/
│ │ ├── routes/
│ │ │ └── discover.js
│ │ └── templates/
│ │ └── discover.hbs
│ └── stylesheets/
│ └── frndr.scss
└── scripts/
└── create-test-users.sh
```
### Running Tests
```bash
cd ~/discourse/discourse
bin/rake plugin:spec[discourse-frndr]
```
## Roadmap
- [ ] One intro topic per user validation
- [ ] Filter matches by activity tags
- [ ] Location-based matching
- [ ] Weighted questions (importance levels)
- [ ] "Pass" and "Like" actions
- [ ] Direct messaging integration
- [ ] Activity-based notifications
## License
MIT