Skip to content

OnePuzzle is a web application that combines chess training with blockchain technology, offering daily chess puzzles and minting successful solutions as NFTs on Solana

Notifications You must be signed in to change notification settings

aniketsahu115/OnePuzzle

Repository files navigation

OnePuzzle - Daily Chess Puzzles with NFT Rewards

Play Now - Live Website

Watch the video

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.

Home Page Dashboard Blog Section

Features

  • Daily Chess Puzzles
  • Interactive Chess Board
  • NFT Rewards for Puzzle Solutions
  • Progress Tracking Dashboard
  • Learning Resources

Tech Stack

  • Frontend: React, TypeScript, Tailwind CSS, Shadcn/UI
  • Backend: Node.js, Express, TypeScript
  • Database: PostgreSQL with Drizzle ORM
  • Blockchain: Solana Web3.js
  • Development: Vite, ESBuild

Getting Started

  1. Clone the repository
  2. Install dependencies:
npm install
  1. Database Setup

Create a new PostgreSQL database:

create database chess_puzzle

Set up your database connection by creating a .env file:

DATABASE_URL=postgresql://postgres:your_password@localhost:5432/chess_puzzle

Required Database Packages

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 management

These packages are required for database connectivity and management:

  • pg: PostgreSQL driver for Node.js
  • drizzle-orm: Modern TypeScript ORM for better type safety
  • drizzle-kit: Migration and schema management tools
  • dotenv: Loads environment variables from .env file

Initialize the database schema:

npx drizzle-kit push
  1. Start the development server:
npm run dev

The application will be available at http://localhost:5000

Contributing

This Project is under developement so if you want to contribute come up and develop it together!

  1. Fork the repository
  2. Create a new branch
  3. Make your changes
  4. Submit a pull request

Development

# Install dependencies
pnpm install

# Start development server
pnpm dev:all

# Build for production
pnpm build

Deployment

Render Deployment

To deploy to Render, use the following configuration:

Build Command:

pnpm build

Start Command (Option 1 - Recommended):

./start.sh

Start Command (Option 2 - Alternative):

NODE_ENV=production node dist/server/prod.js

Environment 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.0 on the port provided by Render
  • The production server serves static files from the dist/public directory
  • Make sure to set NODE_ENV=production in your environment variables
  • The server includes a health check endpoint at /health for 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

Vercel Deployment

The project is configured for Vercel deployment with the vercel.json file.

Project Structure

  • client/ - React frontend with Vite
  • server/ - Express.js backend
  • shared/ - Shared TypeScript types and schemas
  • dist/ - Production build output

About

OnePuzzle is a web application that combines chess training with blockchain technology, offering daily chess puzzles and minting successful solutions as NFTs on Solana

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages