File size: 2,620 Bytes
44d22f1
 
 
 
 
 
 
 
 
 
d9a16d6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88452f7
 
d9a16d6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88452f7
 
 
 
44d22f1
88452f7
 
 
 
 
 
44d22f1
88452f7
d9a16d6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88452f7
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
---
title: Crossword Puzzle Generator
emoji: 🧩
colorFrom: blue
colorTo: purple
sdk: docker
pinned: false
license: mit
---

# Crossword Puzzle Generator

A full-stack web application for generating and solving crossword puzzles with various topics.

## Features

- Topic-based crossword generation
- Interactive puzzle grid with proper visual formatting
- Clues display (Across and Down)
- Solution reveal functionality
- Responsive design

## Prerequisites

- Node.js (v14 or higher)
- npm

## Installation & Setup

1. **Clone the repository**
   ```bash
   git clone <your-repo-url>
   cd cross-words
   ```

2. **Install backend dependencies**
   ```bash
   cd crossword-app/backend
   npm install
   ```

3. **Install frontend dependencies**
   ```bash
   cd ../frontend
   npm install
   ```

## Running the Application

### Development Mode

1. **Start the backend server**
   ```bash
   cd crossword-app/backend
   npm run dev
   ```
   The backend will run on `http://localhost:3001`

2. **Start the frontend development server** (in a new terminal)
   ```bash
   cd crossword-app/frontend
   npm run dev
   ```
   The frontend will run on `http://localhost:5173`

3. **Open your browser** and navigate to `http://localhost:5173`

### Docker Deployment

**Build and run with Docker:**
```bash
# From project root
docker build -t crossword-app .
docker run -p 7860:7860 -e NODE_ENV=production crossword-app
```

Open `http://localhost:7860` to access the application.

**For Hugging Face Spaces:** This repository is ready for Docker-based deployment.

## How to Use

1. Select one or more topics from the available options
2. Click "Generate Puzzle" to create a new crossword
3. Fill in the grid using the provided clues
4. Click "Reveal Solution" to see the answers
5. Click "Reset" to clear the grid and start over

## Project Structure

```
cross-words/
β”œβ”€β”€ crossword-app/
β”‚   β”œβ”€β”€ backend/          # Node.js/Express API
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ package.json
β”‚   β”‚   └── ...
β”‚   └── frontend/         # React application
β”‚       β”œβ”€β”€ src/
β”‚       β”œβ”€β”€ package.json
β”‚       └── ...
β”œβ”€β”€ crossword.py          # Original Python implementation
└── README.md
```

## Technology Stack

- **Frontend**: React, Vite, CSS
- **Backend**: Node.js, Express
- **Algorithm**: Backtracking-based crossword generation
- **Deployment**: Docker (ready for Hugging Face Spaces)

## Documentation

For detailed technical documentation, deployment guides, and API specifications, see the [crossword-app README](./crossword-app/README.md).