Project Summary This document provides a comprehensive summary of the project, detailing the functionality of the backend, the frontend website, and the admin panel. --- Backend API The backend is an Express.js application written in TypeScript. It serves as a REST API for both the frontend website and the admin panel. **API Structure:** - `/api/frontend`: Publicly accessible endpoints for the main website. - Manages tool pages, custom pages, blogs, and settings. - Handles user authentication (registration, login, email verification, password reset). - Processes payments and subscriptions via Stripe. - Provides pricing plan information. - Includes a contact form endpoint. - `/api/tool-api`: A specialized API for a "humanize" tool. - This endpoint is protected by captcha, throttling, logging, and token-checking middleware. - `/api/admin`: Endpoints for the admin panel, requiring authentication. - Provides full CRUD (Create, Read, Update, Delete) functionality for: - Users - Tool Pages - Custom Pages - Blogs - Tool Prompts - Queries - Pricing Plans - Manages application settings, including sitemap generation. - Includes a file manager with capabilities for listing, creating folders, uploading, deleting, renaming, and copying file URLs. - `/api/auth`: Handles authentication for the admin panel (login, logout, and token verification). - `/api/connections`: Provides data for the NYT Connections game. - Fetches the daily puzzle from the NYT website. - Generates hints for each category using the Gemini API. - Caches the results to optimize performance. - `/api/wordle`: Provides data for the Wordle game. - Returns the Wordle of the day by fetching it from the official NYT API. --- Frontend Website (`project` folder) The frontend is a React application (likely using Vite) that serves as the main user-facing website. It is rich in features, primarily focused on word game solvers and hints. **Key Pages and Features:** - **Solvers:** A comprehensive suite of solvers for popular word games, including: - Scrabble Word Finder - Words With Friends Solver - Word Unscrambler - Anagram Solver - Crossword Solver - Jumble Solver - Letter Boxed Solver - Quordle Solver - Spelling Bee Solver - Wordle Solver - **Hint Pages:** A large collection of pages providing daily hints for games like: - Connections - Wordle - Spelling Bee - Strands - LA Times Crossword - and many more. - **Blog:** A fully functional blog with a main blog page and individual post pages. - **Content Pages:** Informational pages on topics like grammar and spelling (e.g., "Affect vs. Effect"). - **Word Lists:** Pages dedicated to lists of words of specific lengths (e.g., "Three Letter Words"). - **Dynamic Content:** - The `ConnectionsHints.tsx` page fetches data from the backend to display the latest puzzle and hints. The API URL is correctly configured to switch between `localhost` for development and the production URL for builds. - The `WordleHints.tsx` page fetches the daily Wordle word from the backend, generates hints in the frontend, and displays them. The API URL is also correctly configured for development and production. --- Admin Panel (`panel` folder) The admin panel is a separate React application used to manage the content and users of the main website. **Key Features:** - **Authentication:** Uses Clerk for user authentication, with dedicated routes for login and protected routes for authenticated users. - **Content Management:** Provides a user interface for managing all the content displayed on the main website, including: - Tool Pages - Custom Pages - Blogs - Tool Prompts - **User Management:** Allows administrators to manage users of the main website. - **Settings:** Provides a way to configure the main website's settings. - **File Manager:** A built-in file manager for handling uploads and other file operations.