Overview
Mirage provides granular privacy controls for your profile, allowing you to manage visibility, customize your presence, and control who can interact with you.User Profile Management
Your user profile contains both public and private information. Understanding what’s visible helps you maintain appropriate privacy.Public Profile Information
These fields are always visible to other users:- Username
- Avatar URL
- Description/Bio
- Account creation date
- Custom CSS (applied to your profile page)
- Background image
- Profile statistics (followers, following, posts, upvotes, downvotes)
Private Information
These fields are never exposed via API:- Email address
- Password (stored as hashed value)
- Authentication token
Updating Profile Settings
Send update request
Update any combination of profile fields by sending a POST to
/api/user/settings.Updatable Fields
Available Profile Fields
Available Profile Fields
| Field | Type | Description | Constraints |
|---|---|---|---|
email | string | Your email address (private) | Must be unique |
avatar_url | string | URL to your profile picture | Public |
description | string | Profile bio/description | Public |
password | string | New password | Stored as hash |
custom_css | string | Custom CSS for your profile | Public |
background_image | string | Profile background URL | Public |
You can update one or multiple fields in a single request. Only include the fields you want to change.
Password Security
Passwords are protected with industry-standard hashing.Changing Your Password
Password Hashing Implementation
Password Hashing Implementation
Mirage uses Werkzeug’s For room passwords, SHA-256 hashing is used:
generate_password_hash for secure password storage:Profile Customization
Mirage allows extensive profile customization while respecting user privacy.Custom CSS
Add personalized styling to your profile page.Background Images
Set a custom background image for your profile.Room Privacy
Private Rooms
Create password-protected rooms for private conversations.Private Room Benefits
- Not listed in public room directory
- Password required to join
- Only members can see messages
- No limit on number of private rooms
Public Room Visibility
- Listed in
/api/roomsendpoint - Anyone can join without password
- Messages visible to all members
- Limited to 5 total public rooms
Room Membership Privacy
Room membership is semi-private:- Room members can see all other members in the room (
/api/room_members/<room_id>) - Non-members cannot see the member list
- Your list of joined rooms is only visible to you (
/api/user_rooms)
Social Privacy Controls
Follow Relationships
Follow relationships are public and visible to everyone.Both followers and following lists are public. Consider this when following other users.
Post Privacy
All posts are public by default.- Posts appear on your profile at
/api/get_posts/<username> - Anyone can view your posts without authentication
- Post statistics (upvotes, downvotes) are publicly visible
Post Content Limits
Post Content Limits
Posts are limited to 512 characters to encourage concise communication:
Voting Privacy
Your individual votes are private, but aggregate statistics are public.- You cannot vote on your own posts (
app/routes/posts.py:97-99) - The system tracks which posts you’ve voted on to prevent duplicate votes
- Only the total upvote/downvote counts are publicly visible
Message Privacy
Messages have automatic privacy through expiration.Message Lifespan
Messages are automatically deleted after 30 minutes (1800 seconds):Message Storage
Messages are stored in-memory with a maximum of 100 messages:Authentication Token Security
Your authentication token is your key to accessing Mirage. Keep it secure.Token Best Practices
Never Share Tokens
Tokens grant full access to your account. Never share them in code, logs, or with other users.
Store Securely
Store tokens in environment variables or secure credential managers, never in source code.
Rotate Regularly
Log out and log back in periodically to get a new token if your app supports it.
Monitor Usage
Watch for unexpected API calls that might indicate token compromise.
Token Validation
Every protected endpoint validates your token:Email Privacy
Email addresses are strictly private and never exposed publicly.Email Uniqueness
Emails must be unique across all users:If you try to change your email to one already in use, you’ll receive an error. This prevents email conflicts.
Email Use Cases
Your email is used for:- Account identification (internal)
- Password resets (if implemented)
- Account recovery (if implemented)
Database Privacy
Understanding the database schema helps you understand privacy boundaries.User Table Schema
User Table Schema
Content Moderation and Safety
Mirage implements HTML sanitization for user-generated content.Safe Markdown Rendering
User content is sanitized to prevent XSS attacks:Allowed HTML Tags
Only specific HTML tags are permitted (app/config.py:12-16):
Privacy Best Practices
Minimize Personal Information
Minimize Personal Information
Only include information in your profile that you’re comfortable sharing publicly. Remember that usernames, avatars, and descriptions are always public.
Use Strong Passwords
Use Strong Passwords
Both for your account and private rooms. Passwords are your first line of defense.
Be Mindful of Public Posts
Be Mindful of Public Posts
All posts are public and visible on your profile. Don’t post sensitive or private information.
Leverage Private Rooms
Leverage Private Rooms
For sensitive discussions, always use private, password-protected rooms rather than public ones.
Regular Security Checks
Regular Security Checks
Periodically review your profile settings, room memberships, and follow relationships to ensure everything is as you expect.
Next Steps
Creating Rooms
Learn about private vs public room options
Content Moderation
Understand content filtering and safety features