Modern messaging platform and social hub — inspired by Discord, built with PHP, vanilla JS, and JSON storage.
- User registration and login with secure password hashing
- Server and channel creation
- Real-time messaging via AJAX polling
- Message editing and deletion (owner only)
- Role system: Owner, Admin, Moderator, Member
- User profiles with avatar, bio, status, and music status
- Online user list
- Reputation system (like/dislike messages)
- Daily rewards and achievements
- Custom themes (Dark, Purple, Ocean, Midnight)
- AI bot assistant (Moldy)
- Mini-games:
/coinflip,/dice,/8ball - Focus mode
- Emoji picker
- Search messages and users
- Responsive design (PC, tablet, phone)
- Premium glassmorphism UI
- PHP 7.4 or higher
- Web server (Apache, Nginx, or built-in PHP server)
- No database required — uses JSON files
- Clone or download the project:
git clone https://github.com/yourusername/moldcord.git
cd moldcord- Start the PHP development server:
php -S localhost:8000- Open your browser and go to:
http://localhost:8000
- Register a new account and start using Moldcord.
-
Copy the
moldcordfolder to your web server directory:- XAMPP:
C:\xampp\htdocs\moldcord - WampServer:
C:\wamp64\www\moldcord
- XAMPP:
-
Start Apache from the control panel.
-
Open browser:
http://localhost/moldcord
- Compress the project folder (excluding
.gitif present) into a ZIP archive. - Log in to your InfinityFree account.
- Go to Files → Upload and upload the ZIP file.
- Extract the ZIP in the
htdocsfolder. - Ensure the
data/directory and its contents are writable (usually 755 or 777 permissions). - Visit your domain to access Moldcord.
Note: If you encounter blank pages, check that PHP error reporting is enabled temporarily by adding to
index.php:ini_set('display_errors', 1); error_reporting(E_ALL);
moldcord/
├── index.php # Main application page
├── login.php # Login page
├── register.php # Registration page
├── logout.php # Logout handler
├── server.php # Server redirect
├── api/ # AJAX API endpoints
│ ├── send_message.php
│ ├── get_messages.php
│ ├── create_server.php
│ ├── create_channel.php
│ ├── ai_bot.php
│ ├── reputation.php
│ ├── daily_reward.php
│ ├── save_settings.php
│ ├── get_online_users.php
│ ├── get_user.php
│ ├── search_messages.php
│ └── search_users.php
├── includes/
│ ├── functions.php # Core utility functions
│ ├── auth.php # Authentication logic
│ └── session.php # Session management
├── data/ # JSON data storage
│ ├── users.json
│ ├── servers.json
│ ├── channels.json
│ ├── roles.json
│ ├── settings.json
│ ├── achievements.json
│ └── messages/ # Per-channel message files
├── assets/
│ ├── css/
│ │ ├── auth.css # Login/register styles
│ │ └── main.css # App interface styles
│ └── js/
│ └── chat.js # AJAX chat and interactions
└── README.md
- Registration: Create an account at
/register.php - Create a Server: Click the + button on the server sidebar
- Create Channels: Click the + next to "Text Channels" (Owner/Admin only)
- Chat: Select a channel and start typing
- AI Bot: Mention
@Moldyin your message to get AI responses - Mini-games: Type
/coinflip,/dice, or/8ball - Reputation: Click the up/down arrows on messages
- Daily Reward: Click "Claim" in the right panel
- Focus Mode: Click the expand icon in the channel header
- Custom Theme: Open Settings → choose a theme
- Passwords are hashed with
password_hash()(bcrypt) - Session-based authentication
- Input sanitization with
htmlspecialchars() - JSON files use
LOCK_EXfor write safety
MIT License