A modern web application for creating and solving crossword puzzles, built with Laravel and Tailwind CSS.
-
User Authentication
- Custom login and registration with crossword-themed UI
- Admin and regular user roles
- Phone and company information collection
-
Puzzle Management
- Create and manage crossword puzzles (Admin)
- Set puzzle difficulty and time limits
- Automatic puzzle grid generation
- Active/Inactive puzzle status
-
Gameplay
- Interactive crossword puzzle solving
- Real-time answer validation
- Timer functionality
- Auto-save progress
- Mobile-responsive design
-
Scoring System
- Points based on completion time
- Global leaderboard
- Puzzle-specific leaderboards
- User progress tracking
- PHP 8.2+
- MySQL 5.7+
- Composer
- Node.js & NPM
- Laravel 10.x
-
Clone the Repository
git clone <repository-url> cd crossword
-
Install PHP Dependencies
composer install
-
Install Node Dependencies
npm install
-
Environment Setup
cp .env.example .env php artisan key:generate
-
Configure Database
- Update
.env
with your database credentials:
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=crossword DB_USERNAME=your_username DB_PASSWORD=your_password
- Update
-
Run Migrations and Seeders
php artisan migrate php artisan db:seed
-
Create Admin User
php artisan user:make-admin [email protected]
-
Compile Assets
npm run dev
-
Start the Server
php artisan serve
- Login with admin credentials
- Access admin dashboard via
/admin
- Create and manage puzzles
- View global leaderboard
- Register a new account
- Browse available puzzles
- Play puzzles and track progress
- View scores on leaderboard
- Click on cells to enter letters
- Use arrow keys for navigation
- Auto-validation of answers
- Timer tracking for scoring
- Points based on:
- Completion time
- Correct answers
- Puzzle difficulty
- CSRF Protection
- XSS Prevention
- Form Validation
- Secure Password Handling
- Role-based Access Control
- Modify
resources/css/app.css
for styling - Update Tailwind configuration in
tailwind.config.js
- Adjust time limits in puzzle creation
- Modify scoring algorithm in
GameController
- Customize grid sizes
users
- User information and rolespuzzles
- Crossword puzzle dataclues
- Puzzle clues and answersuser_scores
- User progress and scores
# Run tests
php artisan test
# Clear cache
php artisan cache:clear
# Create new puzzle
php artisan make:puzzle
# Update leaderboard
php artisan update:leaderboard
app/Http/Controllers/GameController.php
- Game logicapp/Services/CrosswordGenerator.php
- Puzzle generationresources/views/game/
- Game viewsresources/js/crossword.js
- Frontend logic
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
-
Database Connection
- Verify
.env
credentials - Check MySQL service status
- Verify
-
Compilation Issues
npm run dev -- --clean composer dump-autoload
-
Permission Issues
chmod -R 775 storage bootstrap/cache
This project is licensed under the MIT License - see the LICENSE.md file for details.
- Your Name - Initial work
- Laravel Team
- Tailwind CSS
- All contributors