Where modernity embraces tradition.
A real-time, cloud-native chat application that lives entirely in your terminal.
Banter is a feature-rich Text User Interface (TUI) chat application that bridges the nostalgic aesthetics of classic BBS/IRC systems with modern cloud architecture. Unlike traditional console applications that rely on simple scrolling text, Banter provides a sophisticated windowed interfaceβcomplete with mouse support, interactive dialogs, and dynamic menusβall within your command line.
Powered by Google Cloud Firestore for real-time synchronization and Terminal.Gui for an immersive terminal experience, Banter delivers instant messaging with enterprise-grade features in a lightweight, keyboard-friendly package.
- Instant Messaging: Messages sync across all clients in real-time via Firestore
- Group & Individual Chats: Create private conversations or group chatrooms
- Message Pinning: Pin important messages for easy reference
- Search & Filter: Search through chat history and chatrooms instantly
- Full Windowing System: Multiple resizable windows with mouse support
- Keyboard Navigation: Efficient hotkey system for power users
- Responsive Design: Adaptive layouts that work in various terminal sizes
- Custom Color Schemes: Eye-friendly color schemes optimized for extended use
- Profanity Filter: Built-in content filtering with robust leetspeak detection
- Admin Controls: Chatroom admins can manage messages and participants
- Content Censorship: Automatically censors inappropriate language
- Secure Authentication: Login and registration system with validation
- User Profiles: Display names and usernames
- Session Management: Persistent sessions with automatic cleanup
- Create Chatrooms: Invite multiple users to group conversations
- Admin Privileges: Designated admins can rename, delete, or clear chatrooms
- Leave/Remove: Users can leave chatrooms; admins can remove participants
- Dynamic Updates: Chatroom lists update in real-time
Banter follows a clean, event-driven architecture with clear separation of concerns:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Terminal.Gui (View Layer) β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β
β β Window1 β β Window2 β β Window3 β β Other β β
β β(Chatroom)β β (Chat) β β (Info) β β Windows β β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SessionHandler (State) β
β β’ Event-driven state management β
β β’ Real-time Firestore listeners β
β β’ User session tracking β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Utilities (Business Logic) β
β ββββββββββββββββββββ ββββββββββββββββββββ β
β β FirebaseHelper β β ProfanityChecker β β
β β β’ CRUD operationsβ β β’ Content filter β β
β β β’ Real-time sync β β β’ Leetspeak det. β β
β ββββββββββββββββββββ ββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Google Cloud Firestore β
β β’ NoSQL Database β’ Real-time Updates β’ Scalable β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Singleton Pattern: All windows and managers use thread-safe lazy singletons
- Observer Pattern: Event-driven updates via
SessionHandlerevents - Repository Pattern:
FirebaseHelperabstracts all database operations
| Component | Technology | Purpose |
|---|---|---|
| Language | C# / .NET 10.0 | Core application logic |
| UI Framework | Terminal.Gui | Terminal windowing toolkit |
| Backend | Google Cloud Firestore | Real-time NoSQL database |
| Local Cache | LiteDB | Embedded database for sessions |
| Authentication | Firebase Admin SDK | Secure credential management |
Banter/
βββ π Program.cs # Application entry point & initialization
β
βββ π Utilities/ # Business Logic Layer
β βββ FirebaseHelper.cs # Firestore CRUD operations
β βββ FirestoreManager.cs # Singleton Firestore connection
β βββ SessionHandler.cs # User session & state management
β βββ ProfanityChecker.cs # Content moderation & filtering
β βββ Validator.cs # Input validation (email, etc.)
β βββ Models.cs # Data models (User, Chatroom, Message)
β βββ Interfaces.cs # IViewable interface
β βββ CustomColorScheme.cs # UI color schemes
β βββ WindowHelper.cs # Window management utilities
β
βββ π Windows/ # Presentation Layer
β βββ AbstractWindow.cs # Base window class
β βββ LogInWindow.cs # User authentication UI
β βββ CreateAccountWindow.cs # Registration UI
β βββ Window1.cs # Chatroom list & user info
β βββ Window2.cs # Main chat interface
β βββ Window3.cs # Chatroom management panel
β βββ CreateChatroomWindow.cs # Chatroom creation dialog
β βββ ChangeChatroomNameWindow.cs # Rename chatroom dialog
β βββ ViewPinnedMessagesWindow.cs # Pinned messages viewer
β
βββ π documentation-website/ # Project documentation site
βββ π presentation-website/ # Project presentation site
β
βββ π Banter.csproj # Project configuration
βββ π BanterLogo.txt # ASCII art logo
βββ π Schema.txt # Database schema
βββ π LICENSE # MIT License
βββ π README.md # This file
- .NET 10.0 SDK or later
- Google Cloud Project with Firestore enabled
- Terminal that supports 256 colors (recommended: Windows Terminal, iTerm2, or modern Linux terminals)
-
Clone the repository
git clone https://github.com/dreeyanzz/Banter.git cd Banter -
Configure Firebase Credentials
The project uses an embedded Firebase Admin SDK key. To set up your own:
- Create a Firebase project at console.firebase.google.com
- Enable Firestore Database
- Generate a service account key (JSON)
- Update
FirestoreManager.cs:private const string ProjectId = "your-project-id"; string resourceName = "Banter.your-firebase-key.json";
- Add the JSON file to the project and set its Build Action to
Embedded Resource
-
Restore Dependencies
dotnet restore
-
Build the Project
dotnet build
-
Run Banter
dotnet run
- Launch Banter - The login screen will appear with the ASCII logo
- Create an Account:
- Click "Create Account"
- Enter a username (min. 8 characters)
- Set a password (min. 8 characters)
- Provide your name and email
- Login with your new credentials
Once logged in, you'll see three main windows:
βββββββββββββββ¬βββββββββββββββββββββββββββββββ¬ββββββββββββββ
β Window1 β Window2 β Window3 β
β (People) β (Main Chat) β (Chat Info) β
β β β β
β β’ Chatrooms β β’ Chat History β β’ Settings β
β β’ Search β β’ Message Input β β’ Admin β
β β’ User Info β β’ Pinned Messages β Controls β
βββββββββββββββ΄βββββββββββββββββββββββββββββββ΄ββββββββββββββ
- Mouse: Click buttons, select text, and switch between windows
- Tab/Shift+Tab: Navigate between UI elements
- Enter: Send message or activate focused button
- Esc: Close dialogs
- Ctrl+Q: Quit application (from File menu)
- Click "+ Add Chatroom" in Window1
- Type usernames to add (one at a time)
- Click "Add" after each username
- Click "Create" when done
- Select a chatroom from Window1
- Type your message in the bottom text field of Window2
- Press Enter or click "Send"
- In Window2, click on any message in the chat history
- The message will be pinned (marked with a bullet β’)
- Click "View pinned messages" to see all pinned messages
- Click a pinned message in the viewer to unpin it
If you're an admin of a group chatroom, Window3 will show:
- Change chatroom name: Rename the chatroom
- Clear Messages: Delete all messages (for everyone)
- Delete Chatroom: Permanently remove the chatroom
- Leave Chatroom: Remove yourself from participants
-
Passwords are stored in plaintext in the current implementation
- This is NOT production-ready
- Implement proper password hashing (bcrypt, Argon2) before deployment
-
No input sanitization for SQL injection (Firestore is NoSQL, but still validate inputs)
-
Firebase credentials are embedded in the application
- Use environment variables or secure vaults in production
- Never commit credentials to public repositories
-
Email validation is basic
- Consider sending verification emails for production use
- Implement proper password hashing
- Add file/image sharing capabilities
- Implement emoji support
- Add direct message notifications
- Improve offline message handling
- Add message edit/delete functionality
- Implement typing indicators
- Add voice note support (if feasible in TUI)
- Create comprehensive unit tests
- Add CI/CD pipeline
Contributions are welcome! Whether you want to add new features, fix bugs, or improve documentation, your help is appreciated.
- Fork the repository
- Create a feature branch
git checkout -b feature/AmazingFeature
- Commit your changes
git commit -m 'Add some AmazingFeature' - Push to the branch
git push origin feature/AmazingFeature
- Open a Pull Request
- Follow C# coding conventions
- Add XML documentation comments to public methods
- Test your changes thoroughly
- Update README if you add new features
Users
{
"username": string,
"password": string, // β οΈ Currently plaintext
"name": string,
"email": string,
"chatrooms": string[]
}
Chatrooms
{
"chatroom_name": string,
"participants": string[],
"admins": string[],
"type": "group" | "individual",
"last_chat": string,
"pinned_messages": string[]
}
Messages (subcollection of Chatrooms)
{
"sender_id": string,
"text": string,
"timestamp": Timestamp
}
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2024 dreeyanzz
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
- Terminal.Gui - For the amazing TUI framework
- Google Cloud Firestore - For real-time database capabilities
- Miguel de Icaza - For creating Terminal.Gui
- The open-source community for continuous inspiration
Developer: dreeyanzz
Project Link: https://github.com/dreeyanzz/Banter
Documentation: https://dreeyanzz.github.io/Banter/
If you find Banter useful, please consider giving it a star β on GitHub!
Made with β€οΈ and β by dreeyanzz
Where modernity embraces tradition