A full-stack application that fetches, caches, and archives official Wordle solutions. It allows users to view the answer for any given date and provides a rich preview for social media sharing.
- Historical Archive: specific navigation to view Wordle answers for any date (past or future).
- Answer Reveal: "Spoiler-free" by default; blurring the answer until revealed.
- Smart Caching: Minimizes requests to the NYT API by caching results in a local SQLite database.
- Social Sharing: Server-side injection of "Yesterday's Answer" into OpenGraph tags for dynamic link previews on Discord and Twitter.
- Rate Limiting & Security: Built-in protection against abuse with rate limiting and security headers.
- Dark Mode: Toggle between light and dark themes.
- Frontend: React, TypeScript, Vite, React Router, Vanilla CSS
- Backend: Node.js, Express, Better-SQLite3
- Database: SQLite (
wordle.db)
- Node.js (v16+ recommended)
- npm or yarn
-
Clone the repository:
git clone <repository-url> cd wordle-answer
-
Install Frontend Dependencies:
npm install
-
Install Backend Dependencies:
cd server npm install
To run the full application in development mode, you need to start both the backend server and the frontend client.
-
Start the Backend Server: Open a terminal, navigate to the
serverdirectory, and run:cd server npm run devThis runs the server at
http://localhost:3000. -
Start the Frontend Client: Open a new terminal, navigate to the project root, and run:
npm run dev
This runs the client at
http://localhost:5173(proxies API requests to port 3000).
-
Build the Frontend:
npm run build
This compiles the React app into the
distfolder. -
Start the Production Server:
cd server npm startThe server will serve the static files from
../distand handle API requests.
GET /api/word/:date- Fetches the Wordle data for a specific date (YYYY-MM-DD).
- Returns:
{ solution, print_date, days_since_launch }.
MIT