Pixco is a modern web application designed for sharing local memes with an interactive community. Built with a focus on user experience, the platform features multi-language support, an admin panel, and a modern, responsive interface.
Project Created: December 27, 2024 (LokalKu)
- English (EN) and Indonesian (ID) support
- Language switcher available in the navbar
- User preferences stored in session and browser cookies
- Easy to add more languages without code modifications
- Dashboard: Real-time statistics (total users, memes, votes)
- User Management: Ban/unban users, promote to admin status
- Content Moderation: View and delete inappropriate memes
- Role-Based Access Control: Only admins can access the admin panel
- Built with Tailwind CSS for beautiful, responsive design
- Smooth transitions and hover effects
- Works perfectly on mobile, tablet, and desktop devices
- Modern card-based layouts
- Gradient backgrounds and contemporary color schemes
- User Authentication: Secure login and registration system
- Dashboard: Browse and interact with memes (upvote/downvote/comment)
- Meme Upload: Drag-and-drop interface with file validation
- Leaderboard: Ranking system showing top contributors with badges
- User Profiles: View user information and their meme contributions
- Settings: Change email, password, and profile avatar
- JWT-style authentication with session management
- RESTful API for comments and votes
- Real-time leaderboard rankings
- Avatar upload and image processing
- Responsive comment section with modal interface
| Layer | Technology |
|---|---|
| Backend | PHP 7.4+ |
| Database | MySQL |
| Frontend | HTML5, CSS3, JavaScript |
| Framework/Library | Tailwind CSS, FontAwesome 6 |
| Authentication | PHP Sessions |
| Internationalization | Custom i18n System |
ALTER TABLE users ADD COLUMN role ENUM('user', 'admin') DEFAULT 'user';
ALTER TABLE users ADD COLUMN is_banned BOOLEAN DEFAULT FALSE;
ALTER TABLE users ADD COLUMN avatar VARCHAR(255) DEFAULT NULL;- users: User accounts and authentication
- memes: Meme posts with metadata
- votes: User votes (upvote/downvote)
- comments: User comments on memes
Pixco/
βββ index.php # Home page / Dashboard
βββ admin.php # Admin dashboard
βββ dashboard.php # Modern meme feed
βββ login.php # Login page
βββ register.php # Registration page
βββ leaderboard.php # User rankings
βββ upload.php # Meme upload interface
βββ settings.php # User settings
βββ user.php # User profile page
βββ comment.php # API for comments
βββ logout.php # Logout action
β
βββ includes/ # Backend logic
β βββ db.php # Database connection
β βββ auth.php # Authentication functions
β βββ i18n.php # Internationalization system
β βββ google_auth.php # Google OAuth (optional)
β
βββ lang/ # Language files
β βββ en.php # English translations
β βββ id.php # Indonesian translations
β
βββ templates/ # Reusable templates
β βββ header.php # Navigation and head
β βββ footer.php # Footer section
β
βββ assets/
β βββ css/
β β βββ style.css # Custom styles
β βββ js/ # JavaScript files
β βββ img/ # Images and assets
β
βββ uploads/ # User-generated content
β βββ avatars/ # User profile pictures
β
βββ Documentation
βββ README.md # This file
βββ CHANGELOG.md # Version history
βββ FEATURES.md # Feature documentation
βββ QUICK_START_GUIDE.md # Setup instructions
βββ TESTING_GUIDE.md # Testing procedures
βββ IMPLEMENTATION_SUMMARY.md # Technical details
βββ PROJECT_COMPLETION_REPORT.md # Project report
- PHP 7.4 or higher
- MySQL 5.7 or higher
- Web server (Apache, Nginx, etc.)
- Composer (for dependency management)
-
Clone the repository
git clone <repository-url> cd Pixco
-
Install dependencies
composer install
-
Database setup
-- Create database CREATE DATABASE Pixco; USE Pixco; -- Run schema from templates/mysql.sql SOURCE templates/mysql.sql; -- Add new columns ALTER TABLE users ADD COLUMN role ENUM('user', 'admin') DEFAULT 'user'; ALTER TABLE users ADD COLUMN is_banned BOOLEAN DEFAULT FALSE;
-
Configure database connection
- Edit
includes/db.php - Set your database credentials
- Edit
-
Create admin user
UPDATE users SET role = 'admin' WHERE username = 'your_username';
-
Set file permissions
chmod 755 uploads/ chmod 755 uploads/avatars/
- Register: Create a new account with email and password
- Login: Access your account
- Browse: View memes in the dashboard
- Interact: Upvote, downvote, and comment on memes
- Upload: Share your own memes using the upload page
- Leaderboard: Check rankings and see top contributors
- Settings: Update profile information and preferences
- Language: Switch between English and Indonesian
- Access Admin Panel: Click "Admin Panel" in navbar (admin-only)
- Dashboard: View platform statistics
- Manage Users:
- Ban/unban users
- Promote users to admin status
- Remove admin privileges
- Manage Content: Delete inappropriate memes
- Monitor: Track user activity and platform health
// In PHP files
<?= t('dashboard') ?> // Display translated string
<?= getLang() ?> // Get current language code
// Language switcher (in navbar)
<a href="?lang=en">English</a>
<a href="?lang=id">Indonesian</a>- Create
lang/new_lang.php - Copy structure from
lang/en.php - Translate all strings
- Update supported languages in
includes/i18n.php:$supportedLanguages = ['en', 'id', 'new_lang'];
GET /comment.php?meme_id=ID- Fetch comments for a memePOST /dashboard.php?id=ID&type=upvote- Vote on a memePOST /upload.php- Submit new memePOST /settings.php- Update user settings
- Password Hashing: bcrypt algorithm for secure password storage
- Session Management: Secure PHP sessions
- Input Validation: Sanitize user inputs
- XSS Protection: HTML entity encoding
- CSRF Protection: Form validation
- File Upload Validation: Check file types and sizes
{
"require": {
"firebase/php-jwt": "^5.3",
"google/apiclient": "^2.0",
"monolog/monolog": "^2.0",
"guzzlehttp/guzzle": "^7.0"
}
}1. Database Connection Error
- Check database credentials in
includes/db.php - Ensure MySQL server is running
- Verify database exists
2. Language Not Switching
- Clear browser cache (Ctrl+Shift+Delete)
- Check cookies are enabled
- Verify language files exist in
lang/folder
3. Admin Panel Not Showing
- Verify user has admin role in database
- Re-login after role change
- Check admin.php exists and is readable
4. File Upload Issues
- Check
uploads/folder permissions - Verify file size is under 5MB
- Ensure only image formats are uploaded
For issues, suggestions, or contributions:
- Create an issue in the repository
- Submit a pull request with improvements
- Contact the development team
This project is licensed under the MIT License. See LICENSE file for details.
- Built with Tailwind CSS
- Icons by FontAwesome
- Database management with PHP PDO
Version: 1.0 Status: Active Development