Experience daily chess puzzles and earn NFT rewards for your solutions!
OnePuzzle is a web application that combines chess training with blockchain technology, offering daily chess puzzles and minting successful solutions as NFTs on Solana.
- Daily Chess Puzzles
- Interactive Chess Board
- NFT Rewards for Puzzle Solutions
- Progress Tracking Dashboard
- Learning Resources
- Frontend: React, TypeScript, Tailwind CSS, Shadcn/UI
- Backend: Node.js, Express, TypeScript
- Database: PostgreSQL with Drizzle ORM
- Blockchain: Solana Web3.js
- Development: Vite, ESBuild
- Clone the repository
- Install dependencies:
npm install- Database Setup
Create a new PostgreSQL database:
create database chess_puzzleSet up your database connection by creating a .env file:
DATABASE_URL=postgresql://postgres:your_password@localhost:5432/chess_puzzle
npm install pg # PostgreSQL client for Node.js
npm install drizzle-orm # TypeScript ORM
npm install drizzle-kit # CLI tool for Drizzle ORM
npm install dotenv # Environment variable managementThese packages are required for database connectivity and management:
pg: PostgreSQL driver for Node.jsdrizzle-orm: Modern TypeScript ORM for better type safetydrizzle-kit: Migration and schema management toolsdotenv: Loads environment variables from .env file
Initialize the database schema:
npx drizzle-kit push- Start the development server:
npm run devThe application will be available at http://localhost:5000
This Project is under developement so if you want to contribute come up and develop it together!
- Fork the repository
- Create a new branch
- Make your changes
- Submit a pull request
# Install dependencies
pnpm install
# Start development server
pnpm dev:all
# Build for production
pnpm buildTo deploy to Render, use the following configuration:
Build Command:
pnpm buildStart Command (Option 1 - Recommended):
./start.shStart Command (Option 2 - Alternative):
NODE_ENV=production node dist/server/prod.jsEnvironment Variables:
NODE_ENV=production(required)PORT(Render will set this automatically)VITE_SOLANA_RPC_URL- Your Solana RPC endpoint- Database connection variables (DATABASE_URL, etc.)
Health Check URL:
https://your-app.onrender.com/health
Important Notes:
- The server automatically binds to
0.0.0.0on the port provided by Render - The production server serves static files from the
dist/publicdirectory - Make sure to set
NODE_ENV=productionin your environment variables - The server includes a health check endpoint at
/healthfor monitoring
Troubleshooting:
- If you see "No open ports detected on 0.0.0.0", make sure you're using the production start command, not the development one
- Check the logs for any error messages during startup
- Verify that the build completed successfully before deployment
The project is configured for Vercel deployment with the vercel.json file.
client/- React frontend with Viteserver/- Express.js backendshared/- Shared TypeScript types and schemasdist/- Production build output


