CodeDojo is a modern, beginner-friendly web application where users learn HTML by coding directly in the browser. Built with PHP and MySQL, it features live code preview, guided practice tasks, smart hints, and progress tracking.
- π Live HTML Code Editor - Write code on the left, see instant results on the right
- π Practice Tasks - Guided challenges that build HTML skills progressively
- π‘ Smart Hints System - Helpful hints without giving away answers
- πΎ Save & Manage Practice - Full CRUD operations for practice submissions
- π¨ Starter Templates - Pre-built templates for buttons, cards, and forms
- π― Clean, Modern Interface - Professional coding platform design
- π Dark Mode Support - Eye-friendly dark theme for extended coding sessions
- π± Responsive Design - Works seamlessly on desktop and tablets
- β‘ Smooth Animations - Polished transitions and interactions
- π€ Google Fonts & Icons - Beautiful typography with Material Icons
- XAMPP Compatible - Easy local development setup
- MySQL Database - Robust data storage
- Auto-save - Code automatically saved to localStorage
- Keyboard Shortcuts - Ctrl+Enter to run, Ctrl+S to save
- Clean Code - Well-commented, beginner-readable
- XAMPP (includes Apache, PHP 7.4+, MySQL 5.7+)
- Modern web browser (Chrome, Firefox, Edge, Safari)
- Text editor (VS Code, Sublime Text, etc.)
- Download XAMPP from https://www.apachefriends.org/
- Install XAMPP (default installation path is usually
C:\xamppon Windows) - Launch XAMPP Control Panel
-
Extract the
codedojofolder to your XAMPPhtdocsdirectory:C:\xampp\htdocs\codedojo\Your structure should look like:
C:\xampp\htdocs\codedojo\ βββ assets/ βββ config/ βββ includes/ βββ api/ βββ database/ βββ index.php βββ ...
- Open XAMPP Control Panel
- Click Start next to Apache
- Click Start next to MySQL
- Both should show green "Running" status
- Open your browser and go to:
http://localhost/phpmyadmin - Click Import tab
- Click Choose File and select:
codedojo/database/schema.sql - Click Go at the bottom of the page
- You should see a success message
Alternative Method (SQL Tab):
- Go to
http://localhost/phpmyadmin - Click SQL tab
- Copy the contents of
database/schema.sql - Paste into the SQL query box
- Click Go
- Open browser and navigate to:
http://localhost/codedojo - You should see the CodeDojo homepage
- Click Start Coding Now to test the editor
lessons
- Stores HTML learning modules
- Fields: id, title, description, difficulty, order_num, created_at
practice_tasks
- Specific coding challenges for each lesson
- Fields: id, lesson_id, title, instruction, hint, starter_code, solution_code, order_num, created_at
user_practice
- User's saved practice work
- Fields: id, title, html_code, task_id, is_completed, created_at, updated_at
-
Start Coding
- Click "Code Editor" or "Start Coding Now"
- Write HTML in the left panel
- Click "Run" (or press Ctrl+Enter) to see results
- Click "Save" (or press Ctrl+S) to save your work
-
Practice Tasks
- Go to "Lessons" page
- Choose a task based on difficulty
- Read the instruction
- Write code to complete the task
- Click "Show Hint" if stuck
-
Quick Templates
- Use sidebar to access Button, Card, or Form templates
- Modify templates to learn how they work
-
Manage Practice
- Go to "My Practice" page
- View all saved work
- Edit, preview, or delete practices
Ctrl + Enter- Run codeCtrl + S- Save practice
Edit assets/css/style.css and modify CSS variables:
:root {
--color-primary: #667eea; /* Primary brand color */
--color-secondary: #764ba2; /* Secondary brand color */
/* ... more variables ... */
}- Go to
http://localhost/phpmyadmin - Select
codedojodatabase - Open
lessonstable - Click "Insert" to add new lessons
- Then add tasks to
practice_taskstable
Edit the template code in editor.php around line 45-150.
If you need to change database credentials, edit config/database.php:
define('DB_HOST', 'localhost');
define('DB_USER', 'root'); // Your MySQL username
define('DB_PASS', ''); // Your MySQL password
define('DB_NAME', 'codedojo');Solution:
- Make sure MySQL is running in XAMPP
- Check
config/database.phpcredentials - Verify database
codedojoexists in phpMyAdmin
Solution:
- Make sure Apache is running in XAMPP
- Check PHP error logs in
C:\xampp\apache\logs\error.log - Verify all files are in correct locations
Solution:
- Check browser console (F12) for errors
- Verify file paths are correct
- Clear browser cache (Ctrl+F5)
Solution:
- Check browser console for JavaScript errors
- Verify
api/save_practice.phpfile exists - Check MySQL connection and table structure
- User authentication system
- Progress tracking & achievements
- Community-shared practice solutions
- CSS & JavaScript lessons
- Export practice as HTML files
- Collaborative coding sessions
The database includes:
- 6 Lessons (HTML Basics to Semantic HTML)
- 10 Practice Tasks (Beginner to Advanced)
- 2 Sample Practices (for testing)
All sample data is automatically inserted when you import database/schema.sql.
Contributions are welcome! Here's how you can help:
- Add new practice tasks
- Improve UI/UX design
- Fix bugs
- Add new features
- Improve documentation
This project is open source and available under the MIT License.
- Google Fonts - Inter font family
- Google Material Icons - Icon set
- XAMPP - Local development environment
If you encounter any issues or have questions:
- Check the Troubleshooting section above
- Review the code comments for guidance
- Check XAMPP error logs
1. Install XAMPP
2. Extract codedojo to C:\xampp\htdocs\
3. Start Apache & MySQL in XAMPP
4. Import database/schema.sql in phpMyAdmin
5. Visit http://localhost/codedojo
6. Start coding! πBuilt with β€οΈ for aspiring web developers
Happy Coding! π₯π»