Available at: https://mint-ample-dodo.ngrok-free.app/
Use artificial intelligence to develop your own crosswords and explore a wide range of customizable options for you.
- About the Project
- Technologies Used
- Features
- How to Run the Project Locally
- Project Structure
- Code Architecture
- How to Contribute
- License
Cruzy is a web platform for playing online crossword puzzles with AI-customized themes. This project was developed with Node.js and offers an interactive experience for word game lovers. With artificial intelligence, it's possible to play at various difficulty levels and diverse themes, making the game fun and educational.
- Emanuel Pedroza @pdrzxzz (Team Leader)
- Bianca Paes @bianca-bpas
- JoΓ£o Pontes @pontesjpp
- LetΓcia Andrade @andrxmedy
- Luma Rios @lumarf
- Vitor Lacerda
- Node.js
- Express.js
- Passport.js
- HTML5
- CSS3
- JavaScript
- Pug.js
- Bootstrap
- Fabric.js
- Mongoose
- MongoDB
- OpenAI API
- Jest
- Render
- User registration and login
- Interactive crossword puzzles
- AI-customized themes
- SinglePlayer Game Mode with room history
- Responsive interface for desktop and mobile devices
-
Make sure you have Node.js installed on your computer
node --version
-
Clone the project repository
git clone https://github.com/pdrzxzz/Projeto-Cruzy.git
-
Access the project directory
cd Projeto-Cruzy -
Install all required dependencies
npm install
-
Install Nodemon globally (for development)
npm install nodemon -g
-
Request the necessary environment variables (as per the .env.example file) from the project creators.
-
Create a .env file in the root directory and fill it with the received information.
-
Run the script.
npm run start
If it doesn't work, you can try:
nodemon app.js
-
After starting the server, access the application in your browser: http://localhost:33322
Projeto-Cruzy/
βββ config/
βββ controllers/ # Application controllers
βββ models/ # Data models (MongoDB)
βββ public/ # Static files
β βββ css/ # CSS styles
β βββ js/ # Client-side JavaScript scripts
β βββ images/ # Images and media
βββ routes/ # Application routes
βββ views/ # Pug templates
β βββ layouts/ # Base layouts
β βββ partials/ # Partial components
β βββ rooms/ # Room-related views
β βββ users/ # User-related views
βββ middleware.js # Middleware functions
βββ app.js # Main application file
βββ package.json # Configurations and dependencies
βββ README.md # Project documentation
The project follows a Model-View-Controller (MVC) architecture:
- Models: Defines data schemas and models using Mongoose for MongoDB
- Views: Renders interfaces using Pug templates
- Controllers: Contains business logic and data handling
-
app.js: Application entry point
- Configures middleware, routes, and MongoDB connection
- Initializes authentication mechanism using Passport.js
-
models/
- user.js: Defines the user model and manages authentication
- room.js: Manages game rooms with schema for theme, words, and settings
-
controllers/
- users.js: Manages login, registration, and authentication
- rooms.js: Handles creation, deletion, and access to rooms
- index.js: Controls main routes
-
routes/
- Defines and organizes API endpoints and application routes
-
public/js/
- Game.js: Main class that manages game logic
- createCrossword.js: Algorithm for creating the crossword puzzle board
- displayGame.js: Renders the game using Fabric.js for interactive canvas
-
views/
- Pug templates organized by functionality
- Layout system and partials for code reuse
- controllers/rooms.js: Integrates with the OpenAI API to generate crossword puzzles with customized themes
- The system sends specific prompts to the API and processes responses to create games
- Implemented using Passport.js with local strategy
- Session management via MongoDB for persistence
- User authenticates β passport-local validates
- User creates a room β OpenAI generates words and clues
- System generates the board β crossword algorithm optimizes layout
- User plays β interaction via Fabric.js and real-time validation
For more details, see our Official Documentation.
This project is under the MIT license.