Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Moldcord

Modern messaging platform and social hub — inspired by Discord, built with PHP, vanilla JS, and JSON storage.

Features

  • 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

Requirements

  • PHP 7.4 or higher
  • Web server (Apache, Nginx, or built-in PHP server)
  • No database required — uses JSON files

Installation

Local Development

  1. Clone or download the project:
git clone https://github.com/yourusername/moldcord.git
cd moldcord
  1. Start the PHP development server:
php -S localhost:8000
  1. Open your browser and go to:
http://localhost:8000
  1. Register a new account and start using Moldcord.

Windows (XAMPP / WampServer)

  1. Copy the moldcord folder to your web server directory:

    • XAMPP: C:\xampp\htdocs\moldcord
    • WampServer: C:\wamp64\www\moldcord
  2. Start Apache from the control panel.

  3. Open browser:

http://localhost/moldcord

InfinityFree Hosting

  1. Compress the project folder (excluding .git if present) into a ZIP archive.
  2. Log in to your InfinityFree account.
  3. Go to FilesUpload and upload the ZIP file.
  4. Extract the ZIP in the htdocs folder.
  5. Ensure the data/ directory and its contents are writable (usually 755 or 777 permissions).
  6. 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);

File Structure

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

Usage

  1. Registration: Create an account at /register.php
  2. Create a Server: Click the + button on the server sidebar
  3. Create Channels: Click the + next to "Text Channels" (Owner/Admin only)
  4. Chat: Select a channel and start typing
  5. AI Bot: Mention @Moldy in your message to get AI responses
  6. Mini-games: Type /coinflip, /dice, or /8ball
  7. Reputation: Click the up/down arrows on messages
  8. Daily Reward: Click "Claim" in the right panel
  9. Focus Mode: Click the expand icon in the channel header
  10. Custom Theme: Open Settings → choose a theme

Security

  • Passwords are hashed with password_hash() (bcrypt)
  • Session-based authentication
  • Input sanitization with htmlspecialchars()
  • JSON files use LOCK_EX for write safety

License

MIT License

About

Modern messaging platform and social hub — inspired by Discord, built with PHP, vanilla JS, and JSON storage.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages